NSLog documentation says:
Logs an error message to the Apple System Log facility.
Does this mean that if I want to test what my app does when killed, I can use XCode->Devices and look at the logs?
I am testing BLE state restoration, which supposedly restarts the app for a short amount of time when specific BLE events occur (see code below). However I am unable to see any messages in the device logs (see image below).
Am I missing something? How can I log these events?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// The system provides the restoration identifiers only for central managers that had active or pending peripheral connections or were scanning for peripherals.
NSArray * centralManagerIdentifiers = launchOptions[UIApplicationLaunchOptionsBluetoothCentralsKey];
if (centralManagerIdentifiers != nil) {
for (int i=0; i<[centralManagerIdentifiers count]; i++) {
NSString * identifier = [centralManagerIdentifiers objectAtIndex:i];
NSLog(@"bluetooth central key identifier %@", identifier);
self.centralManagerDelegates = [BluetoothStatePreservationSync sharedInstance];
}
}
// Override point for customization after application launch.
return YES;
}