Instance Method


Adds the contents of the specified dictionary to the user info dictionary.


func addUserInfoEntries(from otherDictionary: [AnyHashable : Any])



The dictionary containing entries to be added.


Use this method to add the keys from otherDictionary into the dictionary in the userInfo property. If the same key is in both dictionaries, the value of the key is set to the value in the otherDictionary parameter.

It is recommended that you keep the userInfo dictionary as small as possible. The larger the dictionary, the longer it takes to deliver that payload and resume the activity.

See Also

Accessing Activity Information

var activityType: String

The activity type with which the user activity object was created.

var title: String?

An optional, user-visible title for this activity, such as a document name or web page title.

var requiredUserInfoKeys: Set<String>?

A set of keys that represent the minimal information about the activity that should be stored for later restoration.

var userInfo: [AnyHashable : Any]?

A dictionary containing app-specific state information needed to continue an activity on another device.

var needsSave: Bool

Indicates that the state of the activity needs to be updated.

var contentAttributeSet: CSSearchableItemAttributeSet?

A set of properties that describe the activity.

var keywords: Set<String>

A set of localized keywords that can help users find the activity in search results.

var persistentIdentifier: NSUserActivityPersistentIdentifier?

A value used to identify the user activity.