VitaleHealthSDK
描述
VitaleHealthSDK 是一个综合的智能、自动和自适应的针对 iOS 和 iPadOS 的 Swift 编程的训练和营养框架。
安装
VitaleHealthSDK 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 即可。
pod 'VitaleHealthSDK', :git => 'https://github.com/miguelmunozfer/VitaleHealthSDK'
将以下行添加到 Podfile 文件末尾
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
用法
需求
需要将 'vitaleCredentials' 文件拖拽到 Xcode 项目中。
您需要在 info.plist 中添加 NSCalendarsUsageDescription, NSCameraUsageDescription, NSHealthUpdateUsageDescription, NSMicrophoneUsageDescription 和 NSHealthShareUsageDescription。
单行配置
使用您的 MyVitale 凭据来初始化 SDK。您的 user_id 必须是永久且唯一的(任何用户 ID 都可以,包括您已经在系统中使用的那些)。
VitaleSDK.shared.startSDKWithConfig(config: "vitaleCredentials", userID: "USER_ID")
显示健康模块
VitaleSDK.shared.showVitale()
自定义导航栏Logo
将您的 App 标志添加到导航栏。
VitaleSDK.shared.setSmallLogo(UIImage(named: "IMAGE_NAME"))
作者
MyVitale, [email protected]
许可
VitaleSDK 在MIT许可下可用。有关更多信息,请参阅LICENSE文件。