-(BOOL)application:(UIApplication*)applicationcontinueUserActivity:(NSUserActivity*)userActivityrestorationHandler:(void(^)(NSArray*))restorationHandler{BOOLhandled=NO;// Extract the payloadNSString*type=[userActivityactivityType];NSString*title=[userActivitytitle];NSDictionary*userInfo=[userActivityuserInfo];// Assume the app delegate has a text field to display the activity informationNSLog(@"User activity is of type %@, has title %@, and user info %@",type,title,userInfo);restorationHandler(@[self.window.rootViewController]);handled=YES;returnhandled;}