I am creating a PhoneGap application for iOS and Android. I have gotten Android to work perfectly fine, but am having trouble switching from Development to Production in iOS. A device token is not being registered for the device with a production adHoc build. I have exhausted every thing I could think of. Here is what I have done so far:
When I run the app for the first time on the device with everything completely redone. This is what I get in the console:
Mon Sep 17 12:48:00 unknown XXXXXXXXX[5039] Warning: Multi-tasking - Device: NO, App: YES
Mon Sep 17 12:48:05 unknown XXXXXXXXX[5039] Warning: Reachability Flag Status: -R -----l- networkStatusForFlags
Mon Sep 17 12:48:06 unknown XXXXXXXXX[5039] Warning: [M] = -[UAPush updateRegistration] [Line 583] Checking registration state
Mon Sep 17 12:48:06 unknown XXXXXXXXX[5039] Warning: [M] = -[UAUser listenForDeviceTokenReg] [Line 969] ListenForDeviceTokenReg
Mon Sep 17 12:48:06 unknown XXXXXXXXX[5039] Warning: [M] = -[UAUser retrieveRequestSucceeded:] [Line 911] User retrieved: 200:{
"user_id" : "XX-XXXXXXXXXXXXXXXXX",
"user_url" : "https://device-api.urbanairship.com/api/user/XX-XXXXXXXXXXXXXXXXX/",
"tags" : [ ],
"device_tokens" : [ ],
"device_pins" : [ ],
"apids" : [ ],
"has_active_subscription" : false,
"subscriptions" : [ ],
"ua_device_ids" : [ "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" ],
"badge" : 0,
"server_time" : "2012-09-17 17:48:02"
}
Mon Sep 17 12:48:06 unknown XXXXXXXXX[5039] Warning: [M] = -[UAUser updateDefaultDeviceToken] [Line 1016] Updating device token
Mon Sep 17 12:48:06 unknown XXXXXXXXX[5039] Warning: [M] = -[UAUser updateDefaultDeviceToken] [Line 1021] Skipping device token update: no token, already up to date, or user is being updated.
Mon Sep 17 12:48:21 unknown XXXXXXXXX[5039] Warning: [M] = +[UAKeychainUtils getDeviceID] [Line 269] Retrieved device id info from keychain.
Mon Sep 17 12:48:21 unknown XXXXXXXXX[5039] Warning: [M] = +[UAKeychainUtils getDeviceID] [Line 273] Device ID result is not nil.
Mon Sep 17 12:48:21 unknown XXXXXXXXX[5039] Warning: [M] = +[UAKeychainUtils getDeviceID] [Line 282] Loaded Device ID: XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Mon Sep 17 12:48:21 unknown XXXXXXXXX[5039] Warning: [M] = +[UAKeychainUtils getDeviceID] [Line 283] Loaded Model Name: iPhone1,2
Mon Sep 17 12:48:21 unknown XXXXXXXXX[5039] Warning: [M] = -[UAAnalytics requestDidSucceed:response:responseData:] [Line 467] Analytics data sent successfully. Status: 200
I blanked out the ID numbers and app name.
This message above "Skipping device token update: no token, already up to date, or user is being updated." seems weird to me. This is a newly created UA Application with new keys and everything. I also loaded it up with my development profile, keys and everything and it works just fine. It just does not register device tokens in a production run.
Any help is appreciated. I have checked every setting and as far as I can tell all of my profiles, keys, entitlements are all set properly. I am running on WiFi since the phone I am using is just a test phone that doesn't have active carrier service.
I've now solved this problem twice, I think, though I'm not 100% sure what the core problem is - i think there's an issue with how you test it.
Try to get the UA Push Sample app to work:
Do you still have the same issue? In my case, both times, it went away and was successfully able to register the token. I think that for some reason the mis-configured certs / provisioning profiles prevented the token from being created properly. When I fixed them - it was too late, because the UA library thought it had registered and was therefore skipping over that part. This line in the log is what made me suspect:
Checking registration on app foreground disabled on app initialization
Now 2 for 2, when I put the correct certs/bundle/provisioning profile in the clean PushSample app, it worked properly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With