> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Framework Initialization

# Initialize Plugin

Initialize the MoEngage Plugin by calling the **`MoECapacitorCore.initialize({ appId: "YOUR_WORKSPACE_ID", initConfig: initConfig});`**. In the case of Ionic-React initialize the plugin in the **`useIonViewWillEnter()`** callback, for Ionic-Angular initialize the plugin in **`ngOnInit()`**.

For more information, read [Ionic React Lifecycle](https://ionicframework.com/docs/react/lifecycle).

## iOS

Starting from version 5.x.x of **capacitor-moengage-core**, the default tracking for the custom boolean attribute will be changed to bool from double. To configure this, use ***MoEAnalyticsConfig*** and pass true to track the boolean as double or pass false to track it as bool.

<CodeGroup>
  ```typescript Typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { MoECapacitorCore, MoEAnalyticsConfig, MoEInitConfig} from 'capacitor-moengage-core'
        
  const analyticsConfig: MoEAnalyticsConfig = {shouldTrackUserAttributeBooleanAsNumber: true};
  const initConfig: MoEInitConfig = {analyticsConfig: analyticsConfig};

  MoECapacitorCore.initialize({ appId: "YOUR_WORKSPACE_ID", initConfig: initConfig });
  ```
</CodeGroup>

Refer to the [doc](/developer-guide/capacitor-sdk/data-tracking/tracking-user-attributes) for more info

<Warning>
  Make sure you are setting the Push/InApp callback listeners before calling the **`initialize({ appId: "YOUR_WORKSPACE_ID", initConfig: initConfig })`**.
</Warning>
