Push-уведомление с Engage Digital (ранее Dimelo) didReceiveRemoteNotification никогда не вызывалось

я отправляю уведомление я получаю его на телефон без проблем;

Теперь я хочу настроить заголовок изображения ...

проблема в том, что эта функция делегата никогда не вызывалась 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


person tamtoum1987    schedule 23.06.2020    source источник
comment
может это поможет? stackoverflow.com/ вопросы/37839171/   -  person Mat    schedule 23.06.2020


Ответы (1)


Я реализовал это демонстрационное приложение с помощью Dimelo iOS SDK: https://github.com/tylerlong/GrandTravel-iOS/blob/master/GrandTravel/AppDelegate.swift Не могли бы вы проверить мой код и выяснить различия?

Я предлагаю вам распечатать журналы для handleActionWithIdentifier и didReceiveRemoteNotification.

Если это по-прежнему не работает, отправьте электронное письмо по адресу [email protected], и мы проведем расследование.

person Tyler Long    schedule 27.02.2021