MoE-Security-Beta 1.9.6

MoE-Security-Beta 1.9.6

MoEngage Inc 维护。



Logo

MoE-iOS-SDK

Version License

MoEngage 提供了一个平台,使公司能够通过推送通知、应用内活动、邮件活动和其他重新定位渠道向用户提供个性化的互动。

集成

通过 CocoaPods 集成

CocoaPods 是 Objective C & Swift 项目的依赖项管理器,使集成更容易。

  1. 如果你没有安装 CocoaPods,可以在终端中执行以下命令来完成安装。

    sudo gem install cocoapods

  2. 如果你没有 Podfile,可以在 Xcode 项目目录中创建一个名为 Podfile 的纯文本文件,并确保将其平台和版本设置为与您的应用匹配。

    pod 'MoE-iOS-SDK'

  3. 在 Xcode 项目目录中执行以下命令以安装 MoEngage SDK。

    pod install

  4. 现在,打开您的项目工作区,并检查是否已正确添加 MoEngage SDK。

SDK 初始化

登录您的 MoEngage 账户,转到仪表板左侧面板中的 设置。在应用设置下,您将找到您的 APP ID。在以下所示的中使用 initializeTestWithConfig:initializeLiveWithConfig: 方法初始化 SDK 时提供此 APP ID。

Objective-C

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //Create a config object
    MOSDKConfig *sdkConfig = [[MOSDKConfig alloc] initWithAppID:@"Your APP ID"];
    
    // Separate initialization methods for Test and Live Environments
    #ifdef DEBUG
        [[MoEngage sharedInstance] initializeTestWithConfig:sdkConfig andLaunchOptions:launchOptions];
    #else
        [[MoEngage sharedInstance] initializeLiveWithConfig:sdkConfig andLaunchOptions:launchOptions];
    #endif
    
    //Rest of the implementation of method
    //-------
}

Swift

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:     [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    //Create a config object
    let sdkConfig = MOSDKConfig.init(appID: "Your APP ID")
    
    // Separate initialization methods for Test and Live Environments
    #if DEBUG
        MoEngage.sharedInstance().initializeTest(with: sdkConfig, andLaunchOptions: launchOptions)
    #else
        MoEngage.sharedInstance().initializeLive(with: sdkConfig, andLaunchOptions: launchOptions)
    #endif
    
    //Rest of the implementation of method
    //-------
}

到此为止!SDK 已成功集成并初始化到项目中,并准备好使用了。

开发者文档

请参阅我们的开发者文档,了解如何使用 SDK 跟踪事件和用户属性,实现推送通知和在应用内通知:链接

变更日志

有关每个发布版本的信息,请查看 SDK 变更日志

支持

如果您在使用 SDK 时遇到任何问题,或者需要帮助进行集成,请联系我们