【问题标题】:Push notification with Engage Digital (formerly Dimelo) didReceiveRemoteNotification never called使用 Engage Digital(以前称为 Dimelo)推送通知 didReceiveRemoteNotification 从未调用过
【发布时间】:2020-10-13 20:28:22
【问题描述】:

我发送通知我在手机上收到没问题;

现在我想自定义图像滴度...

问题是委托上的这个函数从未被调用过didReceiveRemoteNotification

在 appDelegate didFinishLaunchingWithOptions:

            // Dimelo: Push Notif and Badge
    dimelo?.updateAppBadgeNumber = true
    dimelo?.developmentAPNS = true
    dimelo?.initialize(withApiSecret: BuildConfig.GetInstance().getDimeloApiSecret(), domainName: BuildConfig.GetInstance().getDimeloDomainName(), delegate: self)



     func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    // Register the device token.
    Dimelo.sharedInstance().deviceToken = deviceToken
}

func dimeloDidBeginNetworkActivity(_ dimelo: Dimelo?) {
    UIApplication.shared.isNetworkActivityIndicatorVisible = true
}

func dimeloDidEndNetworkActivity(_ dimelo: Dimelo?) {
    UIApplication.shared.isNetworkActivityIndicatorVisible = false
}

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    dimelo?.consumeReceivedRemoteNotification(userInfo)
}

我已经在背景模式下激活了远程通知

但函数didReceiveRemoteNotification 从未被调用:(

我正在集成此 RingCentral Engage Digital / Dimelo 库:

https://github.com/ringcentral/engage-digital-messaging-ios/issues

【问题讨论】:

标签: swift xcode apple-push-notifications push


【解决方案1】:

我已经使用 Dimelo iOS SDK 实现了这个演示应用程序:https://github.com/tylerlong/GrandTravel-iOS/blob/master/GrandTravel/AppDelegate.swift 能否请您检查我的代码并找出其中的差异?

我建议您打印handleActionWithIdentifierdidReceiveRemoteNotification 的日志。

如果还是不行,请发邮件到devsupport@ringcentral.com,我们会进行调查。

【讨论】:

    猜你喜欢
    • 2015-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-13
    相关资源
    最近更新 更多