* Initializes the Iterable React Native SDK in your app's Javascript or Typescript code. * * Pass in a mobile API key distributed with the mobile app. * Warning: never user server-side API keys with the React Native SDK, mobile API keys have minimal access for security purposes. * * P
(
apiKey: string,
config: IterableConfig = new IterableConfig()
)
| 154 | * ``` |
| 155 | */ |
| 156 | static initialize( |
| 157 | apiKey: string, |
| 158 | config: IterableConfig = new IterableConfig() |
| 159 | ): Promise<boolean> { |
| 160 | Iterable.savedConfig = config; |
| 161 | this.setupIterable(config); |
| 162 | |
| 163 | const version = this.getVersionFromPackageJson(); |
| 164 | |
| 165 | return IterableApi.initializeWithApiKey(apiKey, { config, version }); |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * DO NOT CALL THIS METHOD. |
no test coverage detected