File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -103,13 +103,18 @@ public final class IterableAPI: NSObject {
103103 launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? ,
104104 config: IterableConfig = IterableConfig ( ) ,
105105 apiEndPointOverride: String ? = nil ,
106- linksEndPointOverride: String ? = nil ) {
106+ linksEndPointOverride: String ? = nil ,
107+ callback: ( ( Bool ) -> Void ) ? = nil ) {
107108 internalImplementation = IterableAPIInternal ( apiKey: apiKey,
108109 launchOptions: launchOptions,
109110 config: config,
110111 apiEndPointOverride: apiEndPointOverride,
111112 linksEndPointOverride: linksEndPointOverride)
112- _ = internalImplementation? . start ( )
113+ _ = internalImplementation? . start ( ) . onSuccess { _ in
114+ callback ? ( true )
115+ } . onError { _ in
116+ callback ? ( false )
117+ }
113118 }
114119
115120 // MARK: - SDK
You can’t perform that action at this time.
0 commit comments