We started noticing this error today upon running our app. We haven't been able to find anything related to this on the interwebs. Is this just an issue with GCM or some order of operations we need to sort out?
2015-12-23 11:44:01.411: GGLInstanceID | Invalid last checkin timestamp in future.
2015-12-23 11:44:01.471: GGLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 "(null)"
Not 100% sure this is the be-all-end-all fix to this but I am no longer seeing the issue and I believe its just due to order of operations. Below is the order I'm using that seems to be doing ok.
In AppDelegate didFinishLaunchingWithOptions:
let instanceIDConfig = GGLInstanceIDConfig.defaultConfig();
instanceIDConfig.delegate = self
GGLInstanceID.sharedInstance().startWithConfig(instanceIDConfig)
In AppDelegate didRegisterForRemoteNotificationsWithDeviceToken:
gcmRegistrationOptions = [kGGLInstanceIDRegisterAPNSOption:deviceToken, kGGLInstanceIDAPNSServerTypeSandboxOption:true];
GGLInstanceID.sharedInstance().tokenWithAuthorizedEntity(gcmSenderID,
scope: kGGLInstanceIDScopeGCM,
options: gcmRegistrationOptions,
handler: gcmRegistrationHandler);
In AppDelegate gcmRegistrationHandler:
if let _ = registrationToken {
//REGISTER TOKEN WITH BACKEND
}
In AppDelegate onTokenRefresh:
GGLInstanceID.sharedInstance().tokenWithAuthorizedEntity(gcmSenderID,
scope: kGGLInstanceIDScopeGCM,
options: gcmRegistrationOptions,
handler: gcmRegistrationHandler)
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