> ## 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.

# iOS

For initializing the project, you'll need to provide the Workspace ID of your MoEngage App.

<Info>
  Login to your MoEngage account, go to Settings in the left panel of the dashboard. Under App Settings, you will find your Workspace ID.
</Info>

## Code Initialisation

To initialize MoEngageSDK from ***application:didfinishlaunchingwithoptions*** call any one of the below initialization methods by passing MoEngageSDKConfig as parameter. Refer [doc](/developer-guide/ios-sdk/sdk-integration/basic/sdk-initialization) for more info on all the properties that can be configured using ***MoEngageSDKConfig*** 

Objective-C

<CodeGroup>
  ```objectivec Objective-C theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /// @param sdkConfig MoEngageSDKConfig instance for SDK configuration
  /// @param launchOptions Launch Options dictionary
  - (void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions;
  /// @param sdkConfig MoEngageSDKConfig instance for SDK configuration
  /// @param isSdkEnabled Bool indicating if SDK is Enabled/Disabled
  /// @param launchOptions Launch Options dictionary
  - (void)initializeDefaultSDKConfigWithState:(MoEngageSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
  ```
</CodeGroup>

Sample code to initialize from ***application:didFinishLaunchingWithOptions:*** method:

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import MoEngageSDK  
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        //Add your MoEngage Workspace ID and Data center.
         let sdkConfig = MoEngageSDKConfig(appId: "YOUR WorkspaceID", dataCenter: MoEngageDataCenter.data_center_0x)       sdkConfig.consoleLogConfig = MoEngageConsoleLogConfig(isLoggingEnabled: true, loglevel: .verbose)
         MoEngageInitializer.sharedInstance().initializeDefaultSDKConfig(sdkConfig, andLaunchOptions: launchOptions)
        //Rest of the implementation of method
        //-------
        return true
  }
  ```

  ```objectivec Objective-C theme={"theme":{"light":"github-light","dark":"github-dark"}}
  #import <ReactNativeMoEngage/MoEngageInitializer.h>
  #import <MoEngageSDK/MoEngageSDK.h>@implementation AppDelegate
  - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
  {    
      MoEngageSDKConfig* sdkConfig = [[MoEngageSDKConfig alloc] initWithAppId:@"YOUR Workspace ID" dataCenter: MoEngageDataCenterData_center_0x];
      sdkConfig.consoleLogConfig = [[MoEngageConsoleLogConfig alloc] initWithIsLoggingEnabled:true loglevel:MoEngageLoggerTypeVerbose];
      [[MoEngageInitializer sharedInstance] initializeDefaultSDKConfig:sdkConfig andLaunchOptions:launchOptions];
      return YES;
  }
  ```
</CodeGroup>

# Data Center

In case your app wants to redirect data to a specific zone due to any data regulation policy please configure the zone in the MOSDKConfig object.

Refer to the Data Center documentation for more information.

* [Android](/developer-guide/android-sdk/sdk-integration/basic-integration/data-center)
* [iOS](/developer-guide/ios-sdk/sdk-integration/basic/data-center)
