> ## 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 SDK Initialization

## Code Initialization

From plugin version 8.0.0 we support initialization only via code. In the version 8.0.0 we have removed the initialization of SDK support via info.plist which was supported in 7.1.1 and above.

* Call any one of the below-given initialization methods in **application:didFinishLaunchingWithOptions:** method. The method accepts the **MoEngageSDKConfig** instance as its parameter. Refer [doc](/developer-guide/ios-sdk/sdk-integration/basic/sdk-initialization) for more info on all the properties which can be configured using **MoEngageSDKConfig**.

  <CodeGroup>
    ```objective-c Objective-C wrap 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 sdkState Enum indicating if SDK is Enabled/Disabled
    /// @param launchOptions Launch Options dictionary
    - (void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig withMoEngageSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
    ```
  </CodeGroup>
* Sample code to initialise from **application:didFinishLaunchingWithOptions:** method:

<CodeGroup>
  ```objectivec Objective-C wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  #import "AppDelegate.h"
  #import "MainViewController.h"
    
  // Make sure to import "AppDelegate+MoEngage.h"
  #import "AppDelegate+MoEngage.h"

  @implementation AppDelegate

  - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
  {
      self.viewController = [[MainViewController alloc] init];
      
      MoEngageSDKConfig *sdkConfig = [[MoEngageSDKConfig alloc] initWithAppID: @"YOUR Workspace ID"];
      sdkConfig.moeDataCenter = DATA_CENTER_01; // Possible Values DATA_CENTER_01/DATA_CENTER_02/ DATA_CENTER_03
      sdkConfig.appGroupID = "App Group ID";

      // ---
      // Update other Parameters of SDK Config
      [self initializeDefaultSDKConfig:sdkConfig andLaunchOptions:launchOptions];
      return [super application:application didFinishLaunchingWithOptions:launchOptions];
  }

  @end
  ```
</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.

For more information on Data Center, refer [here](/developer-guide/ios-sdk/sdk-integration/basic/data-center).
