iOS 公共日历 SDK
这是 iOS 公共日历 SDK 的 Swift 实现。
安装
您可以通过 CocoaPods 安装 SDK。
pod 'SchedJoulesSDK'
使用方法
要展示日历存储,您必须先使用我们提供的 API 密钥对其进行初始化。
如果您还没有个人 API 密钥,请通过电子邮件 [email protected] 发送邮件请求。在此之前,您可以使用测试 API 密钥 0443a55244bb2b6224fd48e0416f0d9c
示例
如果您想展示我们的完整功能日历存储,请使用 CalendarStoreViewController
类
// Presenting the Calendar Store View Controller
let calendarVC = CalendarStoreViewController(apiKey: "YOUR_API_KEY")
present(calendarVC, animated: true, completion: nil)
可选地,如果您只想使用日历存储来展示单页,请使用 CalendarStoreSinglePageViewController
类
let calendarVC = CalendarStoreSinglePageViewController(apiKey: "YOUR_API_KEY", pageIdentifer: "115673", title: "Featured")
present(calendarVC, animated: true, completion: nil)
遗留版本
如果您要使用支持包括 Alamofire 和 Result 的早期版本,可以在 pod 文件中指定 legacy-0.7.8
分支。
pod 'SchedJoulesApiClient', :git => 'https://github.com/schedjoules/ios-public-calendars-sdk.git', :branch => 'legacy-0.9.4'