CloudBoost可通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile
pod "CloudBoost"
通过以下方式安装
pod install
关闭当前项目并打开.xcworkspace中的项目
将CloudBoost添加到您的项目中
在swift文件中导入CloudBoost
import CloudBoost
在代码中使用CloudBoost
// Creating a new CloudApp with your appID and appKey
let app = CloudApp(appID: "Your-app-ID", appKey: "Your-app-key")
// Enable Logging, defaults to false
app.setIsLogging(true)
// Create a new table
let obj = CloudObject(tableName: "Student")
// Set attributes
obj.set("name", value: "Randhir")
obj.set("marks", value: 99)
// Save the table, with a callback. response is in the form of CloudBoostResponse
obj.save({ response in
response.log()
})
Randhir Singh, [email protected]
CloudBoost可在MIT许可证下获取。有关更多信息,请参阅LICENSE文件。