I have been using the following shortcut since iOS 12 with no issue. But in iOS 14.3 it has stopped showing up in the Shortcuts app. In iOS 14.2 it does show up. This can be tested with the simulator:
Is this a bug in iOS 14.3? Am I missing something?
Thank you.
Code Block NSString * title = NSLocalizedStringFromTableInBundle(@"Traffic status", nil, [LanguageModel sharedInstance].languageBundle, nil); NSString * activityType = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] stringByAppendingString:kUserActivityTrafficMap]; NSUserActivity * userActivity = [[NSUserActivity alloc] initWithActivityType:activityType]; userActivity.eligibleForSearch = YES; userActivity.title = title; userActivity.eligibleForPrediction = YES; userActivity.suggestedInvocationPhrase = title; CSSearchableItemAttributeSet * attributeSet; if (@available(iOS 14, *)) attributeSet = [[CSSearchableItemAttributeSet alloc] initWithContentType:UTTypeItem]; else attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString *)kUTTypeItem]; attributeSet.thumbnailData = UIImagePNGRepresentation([UIImage imageNamed:@"UserActivityMapa"]); attributeSet.contentDescription = NSLocalizedStringFromTableInBundle(@"Shows the traffic around you", nil, [LanguageModel sharedInstance].languageBundle, nil); userActivity.contentAttributeSet = attributeSet; self.mapViewController.userActivity = userActivity;
Is this a bug in iOS 14.3? Am I missing something?
Thank you.