[英]Apptentive callback methods
Are there any Apptentive callback methods which inform us what is happening? 是否有任何贴心的回调方法可以通知我们正在发生的事情?
For example, 例如,
[[ATConnect sharedConnection] engage:@"completed_level" fromViewController:viewController];
tells Apptentive an event has occured, and now Apptentive might display an interaction. 告诉Apptentive事件已发生,现在Apptentive可能显示交互。
After an event is logged, I would like to know whether: 记录事件后,我想知道是否:
Is there currently a way to do this? 目前有办法吗?
The return value of engage:fromViewController:
indicates whether or not an interaction was shown for the event: engage:fromViewController:
的返回值指示是否为该事件显示交互:
BOOL interactionShown = [[ATConnect sharedConnection] engage:@"event" fromViewController:vc];
if (interactionShown) {
// Interaction (Survey, Rating Prompt, etc) was shown.
} else {
// No interaction was shown.
}
You can also use the method willShowInteractionForEvent:
to know if an interaction will be shown the next time you engage an event: 您也可以使用方法
willShowInteractionForEvent:
来知道是否在您下次参与某个事件时显示交互:
BOOL availableSurvey = [[ATConnect sharedConnection] willShowInteractionForEvent:@"show_survey_event"];
if (availableSurvey) {
// Show "Show Survey" button.
} else {
// Hide "Show Survey" button.
}
Apptentive also posts some notifications that you can listen for and respond to via NSNotificationCenter
: 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;
Finally, we are working some new features in this area. 最后,我们正在研究该领域的一些新功能。 I will update this answer when those are available.
如果可用,我将更新此答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.