-
Notifications
You must be signed in to change notification settings - Fork 9
Iterate
msingleton edited this page Jan 16, 2023
·
18 revisions
The Iterate class is the primary class of the SDK, the main entry point is the shared singleton property
public final class Iterate
The shared singleton instance is the primary entrypoint into the Iterate iOS SDK. Unless you have uncommon needs you should use this singleton to call methods on the Iterate class.
public static let shared
Query parameter used to set the preview mode
public static let PreviewParameter = "iterate_preview"
Default API host
public static let DefaultAPIHost = "https://iteratehq.com"
Send event to determine if a survey should be shown
public func sendEvent(name: String, complete: ((Survey?, Error?) -> Void)? = nil)
- name: Event name
- complete: optional callback with the results of the request
Configure sets the necessary configuration properties. This should be called before any other methods.
public func configure(apiKey: String, apiHost: String? = Iterate.DefaultAPIHost, surveyTextFontName: String? = nil, buttonFontName: String? = nil)
- apiKey: Your Iterate API Key, you can find this on your settings page
Preview processes the custom scheme url that was used to open the app and sets the preview mode to the surveyId passed in
public func preview(url: URL)
- url: The URL that opened the application
Preview a specific survey using it's id
public func preview(surveyId: String)
- surveyId: The id of the survey to preview
public func identify(userProperties: UserProperties?)
public func identify(responseProperties: ResponseProperties?)
public func reset()
Generated at 2023-09-20T16:41:01+0000 using swift-doc 1.0.0-rc.1.