我正在研究phonegap-push-plugin,我已经在Android上使用它了。我正在使用基于phonegap的平台DevExtreme。
我看到刚刚发布了cordova 7.0.1,我希望这可以帮助我,因为推送不适用于iOS。
但是,现在,我有问题。使用在线工具(https://build.phonegap.com),当我尝试增加模板时,推送插件不包含在apk文件中(我选中此项将其打开为zip文件)并且ipa文件未构建因为我收到了错误。
这是日志的摘录:
Blockquote无法打开“GoogleService-Info.plist”文件,因为没有此类文件。
Blockquote [...] Blockquote“** ARCHIVE 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次失败)命令的错误代码65: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相同。
答案 0 :(得分:0)