MCPcopy Create free account
hub / github.com/Iterable/react-native-sdk / initialize

Method initialize

src/core/classes/Iterable.ts:156–166  ·  view source on GitHub ↗

* 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()
  )

Source from the content-addressed store, hash-verified

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.

Callers 5

IterableAppProviderFunction · 0.80
initializeWithApiKeyMethod · 0.80
initialize2WithApiKeyMethod · 0.80
Iterable.test.tsFile · 0.80

Calls 3

setupIterableMethod · 0.95
initializeWithApiKeyMethod · 0.65

Tested by

no test coverage detected