为什么从不调用beforeInAppMessageDisplayed?

时间:2018-10-22 07:08:52

标签: ios swift

我想使用Braze发送应用内消息通知并显示自定义UI来替换Braze创建的UI。但是beforeInAppMessageDisplayed永远不会被调用。以下是我的工作方式。 我添加了

Appboy.start(withApiKey: apiKey, in: application, withLaunchOptions: launchOptions, withAppboyOptions: [ ABKInAppMessageControllerDelegateKey: self ]) in func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool

并添加了

func beforeInAppMessageDisplayed(inAppMessage: ABKInAppMessage!) -> ABKInAppMessageDisplayChoice
AppDelegate类中的

1 个答案:

答案 0 :(得分:0)

我通过在func beforeInAppMessageDisplayed(inAppMessage:ABKInAppMessage!)-> ABKInAppMessageControllerDelegate中放置ABKInAppMessageDisplayChoice解决了此问题。