Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  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.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement