替换UAPush方法appReceivedRemoteNotification?

时间:2016-09-27 15:56:01

标签: ios apple-push-notifications urbanairship.com

尝试升级到Urban Airship 8.0.1时,方法appReceivedRemoteNotification不再可用。

MyClass.swift:55:23: Value of type 'UAPush' has no member 'appReceivedRemoteNotification'

UrbanAirship Library 7.3.0 to 8.0.0文档没有提及该方法。

iOS Changelog中没有提及。

appReceivedRemoteNotification的替代是什么,以便可以实现向8.0.1的迁移?

1 个答案:

答案 0 :(得分:1)

我们在migration guide中提到了它,你总是检查appledocs

我们现在有两种方法可以收到通知:

  • receivedForegroundNotification:completionHandler:
  • receivedBackgroundNotification:completionHandler:

打开通知或点击通知操作按钮时的1种方法:

  • receivedNotificationResponse:completionHandler: