1

由于无法识别的选择器,在 Apptentive API 中调用以下方法会崩溃。

ATAppRatingFlow *ratingFlow = [ATAppRatingFlow sharedRatingFlowWithAppID:kApptentiveAppID];
[ratingFlow appDidLaunch:YES viewController:self.navigationController];

这会产生以下错误日志:

*2013-10-03 10:32:08.089 YourApp[39841:a0b] -[ATAppRatingFlow appDidLaunch:viewController:]: unrecognized selector sent to instance 0xc5aee60*
*2013-10-03 10:32:08.144 YourApp[39841:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ATAppRatingFlow appDidLaunch:viewController:]: unrecognized selector sent to instance 0xc5aee60'*
**** First throw call stack:*
*(*
* 0 CoreFoundation 0x0257f5e4 __exceptionPreprocess + 180*
* 1 libobjc.A.dylib 0x022ee8b6 objc_exception_throw + 44*
* 2 CoreFoundation 0x0261c903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275*
* 3 CoreFoundation 0x0256f90b ___forwarding___ + 1019 
4

1 回答 1

1

以前版本的 Apptentive 使用以下 3 种方法来显示评分流程:

- (void)appDidLaunch:(BOOL)canPromptForRating viewController:(UIViewController *)viewController;

- (void)appDidEnterForeground:(BOOL)canPromptForRating viewController:(UIViewController *)viewController;

- (void)userDidPerformSignificantEvent:(BOOL)canPromptForRating viewController:(UIViewController *)viewController;

在较新版本的应用程序中,它们已被一种方法取代:

- (void)showRatingFlowFromViewControllerIfConditionsAreMet:(UIViewController *)viewController;

像这样称呼它:

[[ATAppRatingFlow sharedRatingFlow] showRatingFlowFromViewControllerIfConditionsAreMet:viewController];

showRatingFlowFromViewControllerIfConditionsAreMet方法仅在用户满足您的评分条件(在 Apptentive 网站上设置)时才会显示评分流程。

  • 安装后X
  • Y使用次数
  • Z重大事件
于 2013-10-03T17:25:29.953 回答