Xcode 6.1: Snapshot of a snapshot that was not displayed

I use a storyboard for my sample project. The architecture is the login controller and the Home PageView controller. The user presses a button on the Home PageView controller to trigger a local notification.

-(IBAction)startLocalNotification { // Bind this method to UIButton action NSLog(@"startLocalNotification"); UILocalNotification *notification = [[UILocalNotification alloc] init]; notification.fireDate = [NSDate dateWithTimeIntervalSinceNow:7]; notification.alertBody = @"This is local notification!"; notification.timeZone = [NSTimeZone defaultTimeZone]; notification.soundName = UILocalNotificationDefaultSoundName; notification.applicationIconBadgeNumber = 10; [[UIApplication sharedApplication] scheduleLocalNotification:notification]; } 

This code is in the AppDelegate file:

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]){ [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]]; } [launchOptions valueForKey:UIApplicationLaunchOptionsLocalNotificationKey]; // Override point for customization after application launch. return YES; } - (void)applicationDidBecomeActive:(UIApplication *)application { [UIApplication sharedApplication].applicationIconBadgeNumber = 0; NSLog(@"didReceiveLocalNotification"); } 

Now after clicking the application in the background, I get the message below in the console, but the local notification works fine, as expected.

A snapshot of a snapshot that was not displayed results in blank snapshots. Make sure your view has been viewed at least once before the snapshot or after snapshots.

What is the reason for this message?

+7
objective-c ios8 snapshot
source share
1 answer

I have something that, I believe, can simply stand up as an β€œanswer” ... And this is almost certainly not the case, but there may be a problem with iOS (8.1.3 / 8.2). As far as I can tell, this is harmless.

I played with this and found that it is related to UITextField / Keyboard.

So, one application with one text field, follow these steps (iPad only):

  • Assembly and launch
  • Put focus in the text box
  • Close the keyboard (it should have opened)
  • Press the home button (application is included in the background)
  • Return to app
  • Press the home button (application is included in the background)
  • Observe the output of the log.

Here is an example project: https://github.com/duttski/TestForStrangeSnapshotMessage .

Filed as an error and is trying to get some information through the dev forums.

UPDATE: I think this can be fixed in later versions. But I did not check it. Speaking at Dev forums, I was told that there was nothing to worry about.

+3
source share

All Articles