Motti 2.0.1

xMotti 2.0.1

Daniel Fernandez 维护。



xMotti 2.0.1

  • 作者
  • Motti

Motti SDK

Motti SDK 是一个用于基于接近触发内容库的 Swift 编写的库。您可以在 motti.com 上了解更多关于 Motti SDK 的信息。

要求

集成

CocoaPods

您可以使用 CocoaPods 在您的 Podfile 中添加 xMotti 进行安装

platform :ios, '10.0'
use_frameworks!

target 'MyApp' do
    pod 'xMotti'
end

手动

下载 xMotti.framework 并将其拖拽到您的项目中。

配置

  • 请将 NSCameraUsageDescriptionNSLocationAlwaysAndWhenInUseUsageDescriptionNSLocationAlwaysUsageDescriptionNSLocationWhenInUseUsageDescription 包含到您的 Info.plist 文件中。
  • 启用 location 背景模式。

用法

将以下代码行包含在您的 AppDelegate.swift 中。

import xMotti
xMotti.initialize(apiKey: "XXXXXXXXXXXXXXXXXXXX", delegate: nil);
xMotti.requestLocationAlwaysPermission();
xMotti.requestNotificationPermission();
xMotti.start();

关于应用商店构建

我们的框架包括模拟器和设备架构的切片。但Xcode存在一个问题,在上传您的构建时不会正确地从 'fat binary' 框架中删除不必要的架构。为此,我们建议您将以下shell 脚本(由Realm项目提供)作为项目的编译阶段包含进来,从而从应用中删除不必要的切片。

https://github.com/realm/realm-cocoa/blob/d59c86f11525f346c8e8db277fdbf2d9ff990d98/scripts/strip-frameworks.sh

支持

请随时通过以下邮箱联系我们:[email&protected]