SHARE
TWEET

Untitled

a guest May 22nd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     private const string kUniRateiOSAppStoreURLFormat =         @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=";
  2.     private const string kUniRateiOS7AppStoreURLFormat = @"itms-apps://itunes.apple.com/app/id";
  3.  
  4.     public void RateNowNative()
  5.     {
  6. #if UNITY_IOS
  7.         if (!Device.RequestStoreReview())
  8.             RateNowNonNative();
  9. #endif
  10.     }
  11.  
  12.     public void RateNowNonNative()
  13.     {
  14. #if UNITY_IOS
  15.         Debug.Log("Apple Native Request Store Review");
  16.  
  17.         var iOSAppId = Main.main.Config.Publisher == Publisher.iOSFree
  18.             ? Main.main.Config.iOSAppIDFree
  19.             : Main.main.Config.iOSAppIDFull;
  20.         var url = instance.iOSVersion >= 7.0f
  21.             ? kUniRateiOS7AppStoreURLFormat + iOSAppId
  22.             : kUniRateiOSAppStoreURLFormat + iOSAppId;
  23.         Debug.Log("Rate iOS - " + url);
  24.         Application.OpenURL(url);
  25. #endif
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top