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.