Questions tagged [nsuseractivity]

An NSUserActivity object provides a lightweight way to capture app state so that it can be restored later. NSUserActivity supports activity restoration from Handoff, which lets users begin an activity on one device and continue it on another, and from search results.

Using Handoff, for example, a user who is editing a document on a Mac can continue editing that document on an iPhone. A person watching a movie on an iPad can continue watching on a Mac. In both cases, the users resume the activity at the point at which they stopped on the original device. Your apps should work to make this experience as seamless as possible. In iOS 9 and later, an NSUserActivity object can be indexed and made available to users in search results when they perform on-device searches in Spotlight. To ensure that users get rich search results, you can provide metadata that fully describes the activity. When users select your activity from a list of search results, the system passes that activity and result to your app as it is launched, so that you can restore app state appropriately.

91 questions
0
votes
0 answers

Open iOS app from Safari after downloaded

How do you configure your app to open from safari after it has already been downloaded? In the screenshot below when clicking "Open" it opens the app in the App Store, even after the app is downloaded. I've implemented continue userActivity in the…
ShedSports
  • 541
  • 2
  • 7
  • 14
0
votes
0 answers

Continuing userActivity not working when app isn't in background

I am trying to implement universal linking in an app, and everything works well when the app is in the background. But when the app isn't loaded already, it will flash the correct screen for like a tenth of a second before it goes back to the root…
Noah Iarrobino
  • 1,435
  • 1
  • 10
  • 31
0
votes
1 answer

Manually saving scene NSUserActivity on iOS/iPadOS 13

I have implemented iOS/iPadOS 13 state restoration using NSUserActivity, mainly because my app supports multiple scenes. The problem is that when I'm running the Simulator with two side-by-side scenes and force restart the app by rebuilding the…
Rivera
  • 10,792
  • 3
  • 58
  • 102
0
votes
1 answer

In Xcode 11.4/iOS 13.4 I'm finding that NSUserActivity doesn't always respond to setSuggestedInvocationPhrase

I have a project that used to successfully create and update NSUserActivity objects to provide Siri shortcuts and Handoff. I returned to this code for the first time in a while today and was a little surprised to find that if I have a debug build on…
Timothy Sanders
  • 206
  • 3
  • 7
0
votes
0 answers

How do you display a view controller from a universal link userActivity?

How can I present a view controller in my UserActionManager class from a userActivity? I am using Universal Links and have set up the apple-app-site-association file. When I have found the userActivity.webPageURL.lastPathComponent equal to…
Han
  • 74
  • 1
  • 10
0
votes
1 answer

Is it possible to change NSUserActivity's userInfo from another app?

I am trying to open app B, from app A using universal links as below: @IBAction func openButtonPressed(_ sender: Any) { if let appURL = URL(string: "https://website.com/section/Paris") { UIApplication.shared.open(appURL) { success in …
tiw
  • 535
  • 1
  • 6
  • 22
0
votes
0 answers

Get and Set NSUserActivity in objectiveC

I tried below code to set and get NSUserActivity but it does not work for me. I am not able to get the data for nsuseractivity I am testing below code in device with iOS version 10 and above. Set NSUserActivity in callkit: NSUserActivity *activity…
ios developer
  • 3,363
  • 3
  • 51
  • 111
0
votes
1 answer

NSUserActivity vs. Core Spotlight deep link

I am using both NSUserActivity and Core Spotlight to index content on my app. The reason I am using Core Spotlight is because I want to index this content before the user access (opens) it. The problem I am facing is in the AppDelegate…
Victor
  • 222
  • 1
  • 6
  • 15
0
votes
1 answer

Spotlight Search UserActivity is crashing

I am getting crash logs from Crashlytics for Spotlight Search which is implemented by using CoreSpotlight framework and UserActivity. I am not able find reason behind crash. Please help
Savitha
  • 561
  • 6
  • 19
0
votes
0 answers

How to delete group of NSUserActivity according to activityType

I created bunch of NSUserActivity with different activityType as documentation advices with reverse dns format. Here is example of some activityType: com.myCompany.myEditor.editing. Now I want to delete all activities with this activityType, but I…
jendan
  • 271
  • 4
  • 14
0
votes
0 answers

NSUserActivity : indexing multiple NSUserActivities using loop

I want to index multiple NSUserActivities of same type. The code for the same is given below: -(void)createActivityForEachCity:(NSNotification *)notification { NSArray *nameList = @[@"name1",@"name2",@"name3",@"name4"]; if (nameList) { …
PGDev
  • 23,751
  • 6
  • 34
  • 88
0
votes
3 answers

iOS 9 NSUserActivity for search does not update it's thumbnail

I use NSUSerActivity and CoreSpotlight for indexing. I set the thumbnailURL in the contentAttributesSet property as usual. Images are downloaded from a server and the activity object is created before the image get's downloaded. So I set a…
i-konov
  • 842
  • 1
  • 7
  • 19
0
votes
2 answers

Core spotlight description get truncated

I have noticed that core spotlight description get truncated even if description character length is under 150. Apple says : As with titles, long descriptions can also get truncated, so it’s best to limit your description to 300 characters. I was…
V V
  • 774
  • 1
  • 9
  • 29
0
votes
1 answer

iOS Spotlight Search - show extra app information?

If you search for Pixelmator or Snapseed in iOS spotlight search. It indeed shows the Apps but also write their category which is "Photography" on the right. I am wondering how to achieve this? Nothing major but I am trying to get my head around…
philouuuu
  • 983
  • 1
  • 10
  • 19
0
votes
1 answer

Duplicate search results in spotlight

I have a requirement where I need to use NSUSerActivity and Corespotlight together. I see duplicate search results in spotlight even after I set relatedUniqueIdentifier =uniqueidentifer. Here is the steps I implemented in my project. 1) Create all…
V V
  • 774
  • 1
  • 9
  • 29