objective c - session invalidated with iOS 8 share extension -


i have 2 targets in workspace ios app (bundle id: com.gotit.iphone.gotit, app group: group.com.gotit.iphone.gotit) , share extension (bundle id: group.com.gotit.iphone.gotit.got-it, app group: group.com.gotit.iphone.gotit).

i can use share extension without problem (not time) when directly come ios app have error , app crashes :

attempted create task in session has been invalidated 2015-07-22 16:31:21.999 iphone[6095:717111] *** assertion failure in -[bdboauth1sessionmanager setdelegate:fortask:], /users/gautier/documents/dev/gotit/ios/iphone/trunk/iphone/pods/afnetworking/afnetworking/afurlsessionmanager.m:449 2015-07-22 16:31:22.001 iphone[6095:717111] *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'invalid parameter not satisfying: task' *** first throw call stack: (0x1865a02d8 0x1982140e4 0x1865a0198 0x187454ed4 0x100547340 0x1005476d8 0x100549190 0x100522084 0x100520a38 0x1000c94a8 0x1000d9f9c 0x1000d9d8c 0x18b02ff08 0x18b1bb2bc 0x18b0cde84 0x18b0cdc50 0x18b0cdbd0 0x18b0156f4 0x18a951db8 0x18a94c820 0x18a94c6c4 0x18a94be58 0x18a94bbd8 0x18a945300 0x1865582a4 0x186555230 0x186555610 0x1864812d4 0x18fedf6fc 0x18b07ef40 0x1000d6fac 0x1988bea08) libc++abi.dylib: terminating uncaught exception of type nsexception 

i use afnetworking (with bdboauth1sessionmanager) , how create networkmanager :

+ (instancetype)create {     static dispatch_once_t oncetoken;     dispatch_once(&oncetoken, ^{         _sharedclient = [[[self class] alloc] init];     });     return _sharedclient; }  + (instancetype)sharedclient {     if (!_sharedclient) {         [gotitclient create];     }     return _sharedclient; }  - (id)init {     self = [super init];     if (self) {         nsurl *baseurl = [nsurl urlwithstring:kscgotitclientapiurl];         nsurlsessionconfiguration *sessionconfiguration = [nsurlsessionconfiguration backgroundsessionconfigurationwithidentifier:@"group.com.gotit.iphone.gotit"];         sessionconfiguration.sharedcontaineridentifier = @"group.com.gotit.iphone.gotit";          _networkmanager = [[bdboauth1sessionmanager alloc]                            initwithbaseurl:baseurl                            sessionconfiguration:sessionconfiguration                            consumerkey:kscgotitclientkey                            consumersecret:kscgotitclientsecret                            sharedefaultgroupid:@"group.com.gotit.iphone.gotit"];         _networkmanager.responseserializer = [[afjsonresponseserializer alloc] init];         //4 operations @ same time         [[_networkmanager operationqueue] setmaxconcurrentoperationcount:20];     }     return self; } 

tell me if need more code


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -