IOS GCM - GGLInstanceID | Invalid last timestamp for future verification

We started to notice this error today when launching our application. We could not find anything related to this on intercountries. Is it just a problem with GCM or some sort of operation order that we need to figure 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)" 
+5
source share
1 answer

I’m not 100% sure that this is all the same to fix it, but I no longer see the problem, and I believe that this is simply due to the order of operations. Below is the order I'm using, which seems to work fine.

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) 
+1
source

Source: https://habr.com/ru/post/1239074/


All Articles