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

Method initializeWithApiKey

src/core/classes/IterableApi.ts:34–46  ·  view source on GitHub ↗

* Initializes the Iterable React Native SDK in your app's Javascript or Typescript code. * * @param apiKey - The [*mobile* API * key](https://support.iterable.com/hc/en-us/articles/360043464871-API-Keys) * for your application * @param config - Configuration object for the SDK * @p

(
    apiKey: string,
    {
      config = new IterableConfig(),
      version,
    }: {
      config: IterableConfig;
      version: string;
    }
  )

Source from the content-addressed store, hash-verified

32 * @param version - Version of the SDK, derived from the package.json file
33 */
34 static initializeWithApiKey(
35 apiKey: string,
36 {
37 config = new IterableConfig(),
38 version,
39 }: {
40 config: IterableConfig;
41 version: string;
42 }
43 ): Promise<boolean> {
44 IterableLogger.log('initializeWithApiKey: ', apiKey);
45 return RNIterableAPI.initializeWithApiKey(apiKey, config.toDict(), version);
46 }
47
48 /**
49 * DO NOT CALL THIS METHOD.

Callers

nothing calls this directly

Calls 3

logMethod · 0.80
toDictMethod · 0.80
initializeWithApiKeyMethod · 0.65

Tested by

no test coverage detected