urban airship cordova plugin integration

434 views Asked by At

I have followed the phonegap integration of Urban Airship from their website, but for some reason I am getting errors

here is my xcode error log

2015-06-15 11:08:32.104 TubrTest[73807:2760310] Apache Cordova native platform version 3.8.0 is starting.
2015-06-15 11:08:32.104 TubrTest[73807:2760310] Multi-tasking -> Device: YES, App: YES
2015-06-15 11:08:32.107 TubrTest[73807:2760310] Unlimited access to network resources
2015-06-15 11:08:32.108 TubrTest[73807:2760310] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file

2015-06-15 11:08:32.207 TubrTest[73807:2760310] [CDVTimer][statusbar] 17.539978ms
2015-06-15 11:08:32.207 TubrTest[73807:2760310] [CDVTimer][localnotification] 0.038981ms
2015-06-15 11:08:32.207 TubrTest[73807:2760310] [CDVTimer][localnotification] 0.003994ms
2015-06-15 11:08:32.214 TubrTest[73807:2760310] [CDVTimer][file] 7.194996ms
2015-06-15 11:08:32.227 TubrTest[73807:2760310] [CDVTimer][splashscreen] 12.713015ms
2015-06-15 11:08:32.227 TubrTest[73807:2760310] [W] -[UAConfig validate] [Line 170] Development App Secret is not valid.
2015-06-15 11:08:32.228 TubrTest[73807:2760310] [E] -[UAConfig validate] [Line 187] Current App Secret (dBWt4mUaR2K5xiTthy92pgt) is not valid.
2015-06-15 11:08:32.228 TubrTest[73807:2760310] [E] +[UAirship executeUnsafeTakeOff:] [Line 169] The AirshipConfig.plist file is missing and no application credentials were specified at runtime.
2015-06-15 11:08:32.229 TubrTest[73807:2760310] [CDVTimer][uairship] 1.401007ms
2015-06-15 11:08:32.229 TubrTest[73807:2760310] [CDVTimer][TotalPluginStartup] 39.427996ms
2015-06-15 11:08:32.294 TubrTest[73807:2760310] [E] __52+[UAirship handleAppDidFinishLaunchingNotification:]_block_invoke [Line 296] [UAirship takeOff] was not called in application:didFinishLaunchingWithOptions:
2015-06-15 11:08:32.294 TubrTest[73807:2760310] [E] __52+[UAirship handleAppDidFinishLaunchingNotification:]_block_invoke [Line 297] Please ensure that [UAirship takeOff] is called synchronously before application:didFinishLaunchingWithOptions: returns
2015-06-15 11:08:32.319 TubrTest[73807:2760310] Resetting plugins due to page load.
2015-06-15 11:08:33.227 TubrTest[73807:2760310] THREAD WARNING: ['DFPPlugin'] took '55.412109' ms. Plugin should use a background thread.
2015-06-15 11:08:33.228 TubrTest[73807:2760310] <Google> To get test ads on this device, call: request.testDevices = @[ GAD_SIMULATOR_ID ];
2015-06-15 11:08:33.361 TubrTest[73807:2760310] THREAD WARNING: ['DFPPlugin'] took '133.538086' ms. Plugin should use a background thread.
2015-06-15 11:08:33.810 TubrTest[73807:2760310] <Google:HTML> You are currently using version 6.8.0 of the SDK. Please consider updating your SDK to the most recent sdk version to get the latest features and bug fixes. The latest SDK can be downloaded from http://goo.gl/iGzfsP. A full list of release notes is available at https://developers.google.com/mobile-ads-sdk/docs/admob/ios/rel-notes.
2015-06-15 11:08:34.094 TubrTest[73807:2760310] adViewDidReceiveAd
2015-06-15 11:08:37.441 TubrTest[73807:2760310] Finished load of: http://192.168.1.65:9000/

here is the javascript I am running on device ready

document.addEventListener('deviceready', function(evt) {
  //Urban airship code
  // Register for any Urban Airship events
  document.addEventListener("urbanairship.registration", function (event) {
   if (event.error) {
    console.log('There was an error registering for push notifications');
   } else {
    console.log("Registered with ID: " + event.channelID);
   }
  });

  document.addEventListener("urbanairship.push", function (event) {
   console.log("Incoming push: " + event.message);
  });

  // Set tags on a device, that you can push to
  UAirship.setTags(["loves_cats", "shops_for_games"], function () {
   UAirship.getTags(function (tags) {
    tags.forEach(function (tag) {
     console.log("Tag: " + tag);
    });
   });
  });

  // Set an alias, this lets you tie a device to a user in your system
  UAirship.setAlias("TubrUser", function () {
   UAirship.getAlias(function (alias) {
    console.log("The user formerly known as " + alias);
   });
  });

  // Enable user notifications (will prompt the user to accept push notifications)
  UAirship.setUserNotificationsEnabled(true, function (enabled) {
   console.log("User notifications are enabled! Fire away!");
  }); 
 
 });

here is my config settings

<!-- Urban Airship app credentials -->
    <preference name="com.urbanairship.production_app_key" value="mykey" />
    <preference name="com.urbanairship.production_app_secret" value="mykey" />
    <preference name="com.urbanairship.development_app_key" value="mykey" />
    <preference name="com.urbanairship.development_app_secret" value="mykey" />

    <!-- 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="true" />

    <!-- Optional config values -->

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

    <!-- 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" />

0

There are 0 answers