We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5a81f5 commit a479086Copy full SHA for a479086
swift-sdk/IterableAPI.swift
@@ -105,13 +105,18 @@ public final class IterableAPI: NSObject {
105
launchOptions: [UIApplication.LaunchOptionsKey: Any]?,
106
config: IterableConfig = IterableConfig(),
107
apiEndPointOverride: String? = nil,
108
- linksEndPointOverride: String? = nil) {
+ linksEndPointOverride: String? = nil,
109
+ callback: ((Bool) -> Void)? = nil) {
110
internalImplementation = IterableAPIInternal(apiKey: apiKey,
111
launchOptions: launchOptions,
112
config: config,
113
apiEndPointOverride: apiEndPointOverride,
114
linksEndPointOverride: linksEndPointOverride)
- _ = internalImplementation?.start()
115
+ _ = internalImplementation?.start().onSuccess { _ in
116
+ callback?(true)
117
+ }.onError { _ in
118
+ callback?(false)
119
+ }
120
}
121
122
// MARK: - SDK
0 commit comments