Mapp SDK
这个仓库包含了 Mapp iOS SDK。
集成
使用 CocoaPods
target 'project_name' do
pod 'MappSDK'
end
或者
target 'project_name' do
pod 'MappSDK', :git => 'https://github.com/MappCloud/MappSDK.git', :tag => '6.0.7'
end
手动
- 将
AppoxeeSDK.xcframework
拖动到你的项目中。 - 将
AppoxeeSDKResources.bundle
拖动到你的项目中。 - 将
UserNotifications.framework
链接到你的项目中。
配置文件
请务必提供 AppoxeeConfig.plist
文件。
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>inapp</key>
<dict>
<key>custom_fields</key>
<array>
<string>customString</string>
<string>customNumber</string>
<string>customDate</string>
</array>
<key>media_timeout</key>
<integer>5</integer>
</dict>
<key>sdk</key>
<dict>
<key>app_id</key>
<string>263177</string>
<key>dmc_system_id</key>
<integer>55</integer>
<key>sdk_key</key>
<string>5c59a5b6b52eb2.62524838</string>
<key>jamie_url</key>
<string>jamie-test.shortest-route.com</string>
<key>is_eu</key>
<true/>
<key>open_landing_page_inside_app</key>
<false/>
</dict>
</dict>
</plist>
实现
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[Appoxee shared] engageAndAutoIntegrateWithLaunchOptions:launchOptions andDelegate:nil with:EMC_US];
return YES;
}
Swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Appoxee.shared()?.engageAndAutoIntegrate(launchOptions: launchOptions, andDelegate: nil, with: .EMC_US)
return true
}