Will restore state delegate method is not called when system kills the app in background i am using the below code in button action to check system kill
kill(getpid(), SIGKILL);
When i kill the app using this function but willrestore state delegate method is not called in my application i am using the below code to connect to the central manager.
dispatch_queue_t centralQueue = dispatch_queue_create("mycentral", DISPATCH_QUEUE_SERIAL);// or however you want to create your dispatch_queue_t
NSDictionary *options = @{
CBCentralManagerOptionRestoreIdentifierKey:@"restoremyapp",
CBCentralManagerOptionShowPowerAlertKey:[NSNumber numberWithBool:YES],
};
self.CM = [[CBCentralManager alloc] initWithDelegate:self queue:centralQueue options:options];
i have searched stack overflow and in some link they said if we use dispatch queue it will works but for me its not working.