StoreReview.m 529 B

123456789101112131415161718
  1. #if PLATFORM_IOS
  2. // This definition is here only for compiler to know about selector requestReview
  3. @interface UnityStoreReviewController
  4. + requestReview;
  5. @end
  6. bool UnityRequestStoreReview()
  7. {
  8. Class classSKStoreReviewController = NSClassFromString(@"SKStoreReviewController");
  9. if (!classSKStoreReviewController || ![classSKStoreReviewController respondsToSelector: @selector(requestReview)])
  10. return false;
  11. [classSKStoreReviewController performSelector: @selector(requestReview)];
  12. return true;
  13. }
  14. #endif