objective c - Every 2nd invocation of API call enableDataSharingWithApplicationGroupIdentifier in iOS Share extension crashes with the error -


every 2nd invocation of ios share extension crashes.

uncaught exception: 'enabledatasharingwithapplicationgroupidentifier:containingapplication:' must called before 'setapplicationid:clientkey'

i'm using parse ios sdk 1.7.4

my code follows

[parse enabledatasharingwithapplicationgroupidentifier:@"group.abc.xyz"                                  containingapplication:@"com.abc.xyz"];     [parse setapplicationid:@"xxxxx" clientkey:@"yyyyy"]; 

any thoughts wrong?

thanks

try this:

if(![parse applicationgroupidentifierfordatasharing]) {     [parse enabledatasharingwithapplicationgroupidentifier:@"group.abc.xyz"                                      containingapplication:@"com.abc.xyz"];     [parse setapplicationid:@"xxxxx" clientkey:@"yyyyy"]; } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -