测试已测试 | ✓ |
语言语言 | SwiftSwift |
许可 | MIT |
发布最后发布 | 2017年2月 |
SwiftSwift版本 | 3.0 |
SPM支持SPM | ✗ |
由Josh woodcock维护。
依赖 | |
AFNetworking | ~> 2.6.3 |
libPhoneNumber-iOS | ~> 0.8.17 |
SCrypto | >= 0 |
安装使用
pod 'OpenTimeSDK', '~> 1.1.0'
您必须在iOS 9.0或更高版本,并在Pods文件中指定如下:
platform :ios, '9.0'
您必须在Pods文件的spec中指定框架,如下所示:
use_frameworks!
要获取API密钥,请通过[email protected]发送电子邮件
git update-index --assume-unchanged Example/Tests/Config.plist
开始的最佳方式是运行测试以确保一切正常
在您任何地方使用OpenTime之前初始化它
OpenTimeSDK.initSession("Your really awesome test key goes here", inTestMode: true);
按以下方式设置用户的凭证
OpenTimeSDK.session.setPlainTextCredentials(1, password: "ilovetesting");
按以下方式获取当前用户的可用性
OTAvailabilityAPI.getAllMyAvailability { (response: GetAllMyAvailabilityResponse) -> Void in
if(response.success == true){
print("Yippee!")
}
}
当测试完成时,您可以取消测试模式,如下所示
OpenTimeSDK.initSession("Your realy awesome live key goes here");
如果您想要更改服务器,请使用
OpenTimeSDK.session.setServer("https://myotherawesomeserver.opentimeapp.com")
OpenTimeSDK在MIT许可下发布。有关详细信息,请参阅LICENSE。