Phonegap 推送插件:building iOS 模板错误
Phonegap push plugin: builgind iOS template error
我正在为 Android 和 iOS 使用 FCM 在我的应用程序上开发推送通知功能。
,我试图在 iOS 上做同样的事情。
所以,我开始创建模板,就像我为 Android 做的一样。
但是,创建模板时出现错误:
Build for ios is started
Uploading iOS keys...
Completed
Uploading an application template...
Completed
Building status: pending (13 attempts)
Building status: error ("plugman install --platform ios --project /tmp/gimlet/2719563/project --plugin phonegap-plugin-push@1.9.0": Fetching plugin "phonegap-plugin-push@1.9.0" via npm
Installing "phonegap-plugin-push" at "1.9.0" for ios
Failed to install 'phonegap-plugin-push':undefined
undefined
)
Removing iOS keys...
Completed
Removing the application template...
Completed
Error: Building status: error ("plugman install --platform ios --project /tmp/gimlet/2719563/project --plugin phonegap-plugin-push@1.9.0": Fetching plugin "phonegap-plugin-push@1.9.0" via npm
Installing "phonegap-plugin-push" at "1.9.0" for ios
Failed to install 'phonegap-plugin-push':undefined
undefined
)
这是我的 config.xml 文件:
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<preference name="phonegap-version" value="cli-6.4.0" />
<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-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 name="phonegap-plugin-push" spec="1.9.0"/>
<access origin="*" />
</widget>
config.xml 文件在项目 APP.mobile 中(不在 APP.shared 中)。我不明白为什么我可以为 Android 构建本机模板(而且它就像一个魅力)而在 iOS 中不能。
更新:在此处总结了所有步骤:https://programmingistheway.wordpress.com/2017/07/19/devextremephonegap-how-to-manage-push-notifications-with-fcm/
要使用 FCM,您应该使用 v2.x.x 版本的插件
最新发布的版本是 v2.0.0-rc5
,尝试使用它,甚至从 github 使用 cordova plugin add https://github.com/phonegap/phonegap-plugin-push/
安装
在您的 config.xml 中,您必须像这样添加 google-services json 和 plist 文件
<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
在你的另一个问题中,你似乎在使用 github url,不确定你为什么回到 1.9.0
我正在为 Android 和 iOS 使用 FCM 在我的应用程序上开发推送通知功能。
所以,我开始创建模板,就像我为 Android 做的一样。
但是,创建模板时出现错误:
Build for ios is started
Uploading iOS keys...
Completed
Uploading an application template...
Completed
Building status: pending (13 attempts)
Building status: error ("plugman install --platform ios --project /tmp/gimlet/2719563/project --plugin phonegap-plugin-push@1.9.0": Fetching plugin "phonegap-plugin-push@1.9.0" via npm
Installing "phonegap-plugin-push" at "1.9.0" for ios
Failed to install 'phonegap-plugin-push':undefined undefined )
Removing iOS keys...
Completed
Removing the application template...
Completed
Error: Building status: error ("plugman install --platform ios --project /tmp/gimlet/2719563/project --plugin phonegap-plugin-push@1.9.0": Fetching plugin "phonegap-plugin-push@1.9.0" via npm
Installing "phonegap-plugin-push" at "1.9.0" for ios
Failed to install 'phonegap-plugin-push':undefined undefined )
这是我的 config.xml 文件:
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<preference name="phonegap-version" value="cli-6.4.0" />
<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-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 name="phonegap-plugin-push" spec="1.9.0"/>
<access origin="*" />
</widget>
config.xml 文件在项目 APP.mobile 中(不在 APP.shared 中)。我不明白为什么我可以为 Android 构建本机模板(而且它就像一个魅力)而在 iOS 中不能。
更新:在此处总结了所有步骤:https://programmingistheway.wordpress.com/2017/07/19/devextremephonegap-how-to-manage-push-notifications-with-fcm/
要使用 FCM,您应该使用 v2.x.x 版本的插件
最新发布的版本是 v2.0.0-rc5
,尝试使用它,甚至从 github 使用 cordova plugin add https://github.com/phonegap/phonegap-plugin-push/
在您的 config.xml 中,您必须像这样添加 google-services json 和 plist 文件
<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
在你的另一个问题中,你似乎在使用 github url,不确定你为什么回到 1.9.0