gpt4 book ai didi

android - 贴心的回调方法

转载 作者:行者123 更新时间:2023-11-29 12:36:17 25 4
gpt4 key购买 nike

是否有任何 Apptentive 回调方法可以通知我们发生了什么?

例如,

[[ATConnect sharedConnection] engage:@"completed_level" fromViewController:viewController];

告诉 Apptentive 一个事件已经发生,现在 Apptentive 可能会显示一个交互。

记录事件后,我想知道是否:

  • 将显示一个交互
  • 正在显示交互
  • 交互完成

目前有办法做到这一点吗?

最佳答案

engage:fromViewController: 的返回值指示是否为事件显示交互:

BOOL interactionShown = [[ATConnect sharedConnection] engage:@"event" fromViewController:vc];
if (interactionShown) {
// Interaction (Survey, Rating Prompt, etc) was shown.
} else {
// No interaction was shown.
}

您也可以use方法 willShowInteractionForEvent: 了解下次您参与事件时是否会显示交互:

BOOL availableSurvey = [[ATConnect sharedConnection] willShowInteractionForEvent:@"show_survey_event"];
if (availableSurvey) {
// Show "Show Survey" button.
} else {
// Hide "Show Survey" button.
}

Apptentive 还发布了一些通知,您可以通过 NSNotificationCenter 收听和响应:

/** Notification sent when Message Center unread messages count changes. */
extern NSString *const ATMessageCenterUnreadCountChangedNotification;

/** Notification sent when the user has agreed to rate the application. */
extern NSString *const ATAppRatingFlowUserAgreedToRateAppNotification;

/** Notification sent when a survey is shown. */
extern NSString *const ATSurveyShownNotification;

/** Notification sent when a survey is submitted by the user. */
extern NSString *const ATSurveySentNotification;

最后,我们正在开发该领域的一些新功能。当这些可用时,我会更新这个答案。

关于android - 贴心的回调方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26244481/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com