Phonegap 构建模板问题
Phonegap building template issues
我正在研究 phonegap-push-plugin,我已经在 Android 上使用它了。我正在使用基于 phonegap 的平台 DevExtreme。
我看到刚刚发布了 cordova 7.0.1,我希望这可以帮助我,因为推送在 iOS 上不起作用。
但是,现在,我遇到了问题。使用在线工具 (https://build.phonegap.com),当我尝试构建模板时,推送插件未包含在 apk 文件中(我检查过它作为 zip 文件打开)并且未构建 ipa 文件因为我得到一个错误。
这里是日志的摘录:
Blockquote The file “GoogleService-Info.plist” couldn’t be opened because there is no such file.
Blockquote [...]
Blockquote "** ARCHIVE FAILED **
The following build commands failed: CopyPlistFile
/Users/phonegap/Library/Developer/Xcode/DerivedData/Selfnet-cuvcjbwqnhuixzdmlmoklhnfmyqf/Build/Intermediates/ArchiveIntermediates/Selfnet/InstallationBuildProductsLocation/Applications/Selfnet.app/GoogleService-Info.plist
/tmp/private/tmp/gimlet/2726929/project/Selfnet/Resources/GoogleService-Info.plist
(1 failure) Error code 65 for command: xcodebuild [...]"
这是我的 config.xml 文件:
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<preference name="phonegap-version" value="cli-7.0.1" />
<preference name="permissions" value="none" />
<preference name="prerendered-icon" value="true" />
<preference name="android-windowSoftInputMode" value="adjustPan" />
<preference name="SplashScreen" value="splash" />
<preference name="SplashScreenDelay" value="60000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="android-minSdkVersion" value="15" />
<preference name="android-targetSdkVersion" value="22" />
<!--<plugin name="cordova-plugin-file" />-->
<plugin name="cordova-plugin-geolocation" />
<plugin name="cordova-plugin-splashscreen" onload="true" />
<plugin name="cordova-plugin-whitelist" />
<plugin name="cordova-plugin-ios-longpress-fix" />
<plugin name="cordova-plugin-statusbar" onload="true" />
<plugin spec="https://github.com/phonegap/phonegap-plugin-push.git" source="git" />
<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
<access origin="*" />
</widget>
GoogleService 文件(iOS 和 Android)都在根文件夹中,与文件 config.xml.
相同
我正在研究 phonegap-push-plugin,我已经在 Android 上使用它了。我正在使用基于 phonegap 的平台 DevExtreme。
我看到刚刚发布了 cordova 7.0.1,我希望这可以帮助我,因为推送在 iOS 上不起作用。
但是,现在,我遇到了问题。使用在线工具 (https://build.phonegap.com),当我尝试构建模板时,推送插件未包含在 apk 文件中(我检查过它作为 zip 文件打开)并且未构建 ipa 文件因为我得到一个错误。
这里是日志的摘录:
Blockquote The file “GoogleService-Info.plist” couldn’t be opened because there is no such file.
Blockquote [...] Blockquote "** ARCHIVE FAILED **
The following build commands failed: CopyPlistFile /Users/phonegap/Library/Developer/Xcode/DerivedData/Selfnet-cuvcjbwqnhuixzdmlmoklhnfmyqf/Build/Intermediates/ArchiveIntermediates/Selfnet/InstallationBuildProductsLocation/Applications/Selfnet.app/GoogleService-Info.plist /tmp/private/tmp/gimlet/2726929/project/Selfnet/Resources/GoogleService-Info.plist (1 failure) Error code 65 for command: xcodebuild [...]"
这是我的 config.xml 文件:
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<preference name="phonegap-version" value="cli-7.0.1" />
<preference name="permissions" value="none" />
<preference name="prerendered-icon" value="true" />
<preference name="android-windowSoftInputMode" value="adjustPan" />
<preference name="SplashScreen" value="splash" />
<preference name="SplashScreenDelay" value="60000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="android-minSdkVersion" value="15" />
<preference name="android-targetSdkVersion" value="22" />
<!--<plugin name="cordova-plugin-file" />-->
<plugin name="cordova-plugin-geolocation" />
<plugin name="cordova-plugin-splashscreen" onload="true" />
<plugin name="cordova-plugin-whitelist" />
<plugin name="cordova-plugin-ios-longpress-fix" />
<plugin name="cordova-plugin-statusbar" onload="true" />
<plugin spec="https://github.com/phonegap/phonegap-plugin-push.git" source="git" />
<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
<access origin="*" />
</widget>
GoogleService 文件(iOS 和 Android)都在根文件夹中,与文件 config.xml.
相同