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 Web サイトで設定) がその時点でユーザーによって満たされている場合にのみ、評価フローを表示します。

  • インストールからX日後
  • Y回の使用
  • Z重要なイベント
于 2013-10-03T17:25:29.953 に答える