DeenIslamBLSDK
安装
DeenIslamBLSDK 可通过 CocoaPods 获取。要安装它,只需将以下行添加到 Podfile 中:
pod 'DeenIslamBLSDK’
SDK 初始化
在 Appdelegate 中使用 token 和回调代理进行 SDK 初始化过程
import DeenIslamSDK
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
application.beginReceivingRemoteControlEvents()
return true
}
override func remoteControlReceived(with event: UIEvent?) {
if let event = event {
DeenIslamBLSDK.shared.eventRegister(with: event)
}
}
func applicationWillTerminate(_ application: UIApplication) {
DeenIslamBLSDK.shared.terminate()
}
在 Info.plist 文件中
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key> Application can be killed immediately when user is shutting down or logging out</key>
<false/>
DeenIslamSDKNotifier
func errorMessage(error: String)
func tokenStatus(token isValid: Bool, error: String?) {
if isValid{
print("token is valid")
}else{
print(error ?? "error")
}
}
带有 Tabbar、navigationBar、delegate、token 以及是否BL的 SDK 初始化器,isBL 是可选的
DeenIslamBLSDK.shared.initialize(with: UITabBarController?, nav: UINavigationController, delegate: DeenIslamSDKNotifier, token: String, isBL: Bool)
直接打开 sdk
DeenIslamBLSDK.shared.gotoHome()
按功能打开 sdk
DeenIslamBLSDK.shared.goto(feature: .home)
DeenIslamBLSDK.shared.goto(feature: .islamicName)
DeenIslamBLSDK.shared.goto(feature: .tasbeeh)
DeenIslamBLSDK.shared.goto(feature: .dua)
DeenIslamBLSDK.shared.goto(feature: .hadith)
DeenIslamBLSDK.shared.goto(feature: .prayerTime)
DeenIslamBLSDK.shared.goto(feature: .qibla)
DeenIslamBLSDK.shared.goto(feature: .zakat)
DeenIslamBLSDK.shared.goto(feature: .alQuaran)
通过 rcCode 打开 sdk
func openFromRC(code: String)
检查是否启用了祈祷通知
func isPrayerNotificationEnabled() -> Bool
清除所有挂起的通知
func clearAllPrayerNotification()
启用或禁用祈祷通知
func prayerNotification(isEnable: Bool)
NB
适用于 xcode 15
Target -> Build setting -> ENABLE_USER_SCRIPT_SANDBOXING = false
常见问题解答
Rezwan([email protected])(+8801717230976)
公司
许可协议
DeenIslamBLSDK 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。