ActivityBuilder
public class ActivityBuilder<ActionType> where ActionType : Action
A builder used to set required properties on an NSUserActivity
-
This provides access to the input value for this activity
Declaration
Swift
public let input: ActionType.InputType
-
Undocumented
Declaration
Swift
public private(set) var metadata: ActivityMetadata?
-
Set this to a title to use in the
NSUserActivity
, shown in search results and suggestions.Declaration
Swift
public var title: String?
-
Set this to a title to use in the
NSUserActivity
, shown in search results and suggestions.Declaration
Swift
public var subtitle: String?
-
Set this to optional keywords to use spotlight indexing of this activity by key words
Declaration
Swift
public var keywords: Set<String> { get set }
-
Set to a thumbnail to show when displaying this activity
-
Set to a thumbnail to show when displaying this activity
Declaration
Swift
public var thumbnail: UIImage?
-
Set to thumbnail data to show when displaying this activity
Declaration
Swift
public var thumbnailData: Data?
-
Set to URL pointing at local thumbnail data to show when displaying this activity
Declaration
Swift
public var thumbnailURL: URL?
-
Set this to the userInfo keys required to continue the activity later.
Note
You must specify this if you want Siri prediction to work and you have arguments. This is so Siri can learn which variations of the activity your users are performing, e.g. which document they are opening.Note
If you are using Flint’s automatic URLs you can use this to store extra values, but any data not included in the URL will not be placed into the Input when continuing your action.Declaration
Swift
public var requiredUserInfoKeys: Set<String>
-
Set this to the keys and values that the action needs to reconstruct its Input when continuing later.
Declaration
Swift
public var userInfo: [AnyHashable : Any]
-
Lazily created search attributes. Amend these to provide extra search proeprties.
Declaration
Swift
public var searchAttributes: CSSearchableItemAttributeSet { get }
-
Set to the suggested phrase for creating a Siri shortcut to perform this activity
Declaration
Swift
@available(iOS 12, watchOS 5, *) public var suggestedInvocationPhrase: String? { get set }
-
Set to an app-unique identifier to allow this activity to be deleted at a later point, to prevent further Siri suggestions.
Declaration
Swift
@available(iOS 12, watchOS 5, *) public var persistentIdentifier: String? { get set }
-
Set to override the default activity type set by Flint
Declaration
Swift
public var activityType: String?
-
Call to cancel the activity and not have anything published
Declaration
Swift
public func cancel()
-
Call to indicate that your activity configuration created with the builder will not require Flint’s ability to auto-continue activities received from the system.
If your action’s feature has a URL mapping for the action, or the action’s input type conforms to
ActivitytCodable
, your application delegate can just allFlint.continueActivity
to automatically dispatch incoming activities.If neither of those is the case, you must use your own logic in your app delegate to establish what action needs to be performed. If this is want you want, you must call this function to stop Flint applying footgun defences that will terminate your app with a warning.
Declaration
Swift
public func bypassFlintContinueActivity()