Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private const string kUniRateiOSAppStoreURLFormat = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=";
- private const string kUniRateiOS7AppStoreURLFormat = @"itms-apps://itunes.apple.com/app/id";
- public void RateNowNative()
- {
- #if UNITY_IOS
- if (!Device.RequestStoreReview())
- RateNowNonNative();
- #endif
- }
- public void RateNowNonNative()
- {
- #if UNITY_IOS
- Debug.Log("Apple Native Request Store Review");
- var iOSAppId = Main.main.Config.Publisher == Publisher.iOSFree
- ? Main.main.Config.iOSAppIDFree
- : Main.main.Config.iOSAppIDFull;
- var url = instance.iOSVersion >= 7.0f
- ? kUniRateiOS7AppStoreURLFormat + iOSAppId
- : kUniRateiOSAppStoreURLFormat + iOSAppId;
- Debug.Log("Rate iOS - " + url);
- Application.OpenURL(url);
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement