Urban Air Airship phonegap 3.5 with Phonegap Build

时间:2015-10-28 19:06:01

标签: cordova push-notification phonegap-plugins phonegap-build urbanairship.com

我正在尝试使用Phonegap Build的Phonegap应用程序使用最新版本的Urban Airship Javscript SDK(3.5)。官方Phonegap构建文档仅链接到2.7.0的托管版本

https://build.phonegap.com/plugins/1353

我在NPM上找到了3.5.0版,但我似乎无法使用Phonegap Build正确安装。难道我做错了什么?我的config.xml文件如下:

<gap:plugin name="urbanairship-cordova" source="npm" version="3.5.0" />
<!-- Urban Airship app credentials -->
<preference name="com.urbanairship.production_app_key" value="Your Production App Key" />
<preference name="com.urbanairship.production_app_secret" value="Your Production App Secret" />
<preference name="com.urbanairship.development_app_key" value="********" />
<preference name="com.urbanairship.development_app_secret" value="********" />

<!-- Required for Android. -->
<preference name="com.urbanairship.gcm_sender" value="Your GCM Sender ID" />

<!-- If the app is in production or not -->
<preference name="com.urbanairship.in_production" value="false" />

<!-- Optional config values -->

<!-- Enable push when the application launches -->
<preference name="com.urbanairship.enable_push_onlaunch" value="true" />

<!-- Override the Android notification icon -->
<preference name="com.urbanairship.notification_icon" value="ic_notification" />

<!-- Specify the notification accent color for Android API 21+ (Lollipop) -->
<preference name="com.urbanairship.notification_accent_color" value="#0000ff" />

<!-- Clear the iOS badge on launch -->
<preference name="com.urbanairship.clear_badge_onlaunch" value="true" />

1 个答案:

答案 0 :(得分:1)

您是否通过以下链接?

Documentation of Urbanairship integration

您是否在项目中安装了以下插件?

Urban Airship PhoneGap/Cordova Plugin

然后,如果您仍然遇到错误,请在Urbanairship console中输入错误日志或尝试查找错误。