OneMarket 1.0.1

OneMarket 1.0.1

Leonardo FormaggioOneMarket Network LLC维护。



OneMarket 1.0.1

  • OneMarket Network LLC

要求

  1. Cocoapods
  2. iOS 8.0及以上

安装

CocoaPods

  1. 将以下行添加到您的Podfile
pod 'OneMarket'
  1. 运行pod install

手动

  1. OneMarket.framework拖入您的Xcode项目(目标设置 -> 一般 -> 嵌入的二进制文件)

  2. 确保在添加文件对话框中选择"需要时复制项目"

设置

在开始之前,请确保遵循以下步骤,以便使您的项目准备就绪

  1. 如果这些属性不存在,请将以下属性添加到您的Info.plist文件中
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
  <string>Your location usage description goes here.</string>
  <key>NSLocationAlwaysUsageDescription</key>
  <string>Your location usage description goes here.</string>
  <key>NSLocationWhenInUseUsageDescription</key>
  <string>Your location usage description goes here.</string>
  <key>UIBackgroundModes</key>
  <array>
  	<string>bluetooth-central</string>
  </array>
  1. 不要忘记更新上述描述,以更好地反映您的应用功能。
  2. 确保目标设置中能力选项卡中的后台模式开关是打开的。

使用方法

Swift

  1. 在您的应用程序代理文件中导入框架
import OneMarket
  1. 将以下行添加到您的 application(_:didFinishLaunchingWithOptions:) 方法中
OneMarket.start(withAppId: "Your-App-ID", appKey: "Your-App-Key")
  1. "Your-App-ID" 替换为提供的 AppID。
  2. "Your-App-Key" 替换为提供的 AppKey。

Objective-C

  1. 在您的应用程序代理实现文件中导入框架
@import OneMarket;
  1. 将以下行添加到您的 application:didFinishLaunchingWithOptions: 方法中
[OneMarket startWithAppId:@"Your-App-ID" appKey:@"Your-App-Key"];
  1. @"Your-App-ID" 替换为提供的 AppID。
  2. @"Your-App-Key" 替换为提供的 AppKey。