ios - Google Cloud messaging crash only on app upgrade -


i facing strange issue google cloud messaging ios. app crashing few seconds after calling

[[gglcontext sharedinstance] configurewitherror:&configureerror];

this happens when xcode installs new app google/cloudmessaging sdk when older version of app downloaded app store installed.

however if run on fresh install, works smoothly.

what reason crash? , how solve it?

// google gcm sample app // https://github.com/googlesamples/google-services/blob/master/ios/gcm/gcmexample/appdelegate.m - (void)configuregcm {     nslog(@"start configuregcm");     nserror* configureerror;     [[gglcontext sharedinstance] configurewitherror:&configureerror];     nsassert(!configureerror, @"error configuring google services: %@", configureerror);     _gcmsenderid = [[[gglcontext sharedinstance] configuration] gcmsenderid];     nslog(@"gcmsenderid : %@, configureerror: %@", _gcmsenderid, configureerror);     gcmconfig *gcmconfig = [gcmconfig defaultconfig];     gcmconfig.receiverdelegate = self;     [[gcmservice sharedinstance] startwithconfig:gcmconfig];      __weak typeof(self) weakself = self;      _gcmregistrationhandler = ^(nsstring *registrationtoken, nserror *error){         if (registrationtoken != nil) {             nslog(@"gcm registration token: %@", registrationtoken);             if(![weakself.user hassyncedgcmtoken]) {                 [weakself.user syncgcmtokenwithserver:registrationtoken];             }         } else {             nslog(@"registration gcm failed error: %@", error.localizeddescription);         }     };     nslog(@"end configuregcm"); } 

here logs:

] start configuregcm ] configured [cloudmessaging]. ] failed configure []. ] subspecs not present, not configured [analytics, admob, signin, appinvite, maps]. ] subspecs expected present [cloudmessaging, measurement]. ] <gmr/info> app measurement v.1100000 started ] <gmr/error> exception on worker queue: data parameter nil ] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'data parameter nil'  *** first throw call stack: (0x30cb3e83 0x3b0106c7 0x30cb3dc5 0x315f127f 0x122b73 0x1222ad 0x123bcb 0x129d9f 0x3b4f50c3 0x3b4f9e7b 0x3b4f6f93 0x3b4fa745 0x3b4fa9c5 0x3b624dff 0x3b624cc4) libc++abi.dylib: terminating uncaught exception of type nsexception 

here screenshot of stacktrace enter image description here

enter image description here

update

this issue not seem happening on ios8 or above. me , crash on iphone 5 ios 7.0.4

update-2

for now, using push notification ios 8+ users. still waiting google's reply on github

update-3

fixed in latest versions of gcm

update

this issue has been fixed gcm


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -