Posts

Post marked as solved
2 Replies
584 Views
I have a watch app which is receiving location updates every second, so it is being executed in the background even if the wrist is down. I thought this would qualify the app to update the user interface every second, but it is not working. I set a breakpoint where the user interface is updated, and the code is being executed but I get no update in the user interface. I have tested this both in the simulator and in the device. Should this work with an app which gets locations updates? I thought it would make sense for an app like this. The app is written in objective-C if that makes it any different. Thank you.
Posted Last updated
.
Post marked as solved
3 Replies
769 Views
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: 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.
Posted Last updated
.