是否有任何Apptentive回调方法可以告诉我们发生了什么?
例如,
[[ATConnect sharedConnection] engage:@"completed_level" fromViewController:viewController];
告诉Apptentive发生了一个事件,现在Apptentive可能会显示一个交互。
记录事件后,我想知道是否:
目前有办法做到这一点吗?
答案 0 :(得分:1)
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;
最后,我们正在研究这方面的一些新功能。如果有答案,我会更新这个答案。