new review link for ios 11

This commit is contained in:
Kyle Spearrin 2017-09-28 23:26:59 -04:00
parent bf76707e92
commit fee993c309

View file

@ -20,6 +20,7 @@ namespace Bit.App.Pages
private readonly IFingerprint _fingerprint; private readonly IFingerprint _fingerprint;
private readonly IPushNotification _pushNotification; private readonly IPushNotification _pushNotification;
private readonly IGoogleAnalyticsService _googleAnalyticsService; private readonly IGoogleAnalyticsService _googleAnalyticsService;
private readonly IDeviceInfoService _deviceInfoService;
// TODO: Model binding context? // TODO: Model binding context?
@ -31,6 +32,7 @@ namespace Bit.App.Pages
_fingerprint = Resolver.Resolve<IFingerprint>(); _fingerprint = Resolver.Resolve<IFingerprint>();
_pushNotification = Resolver.Resolve<IPushNotification>(); _pushNotification = Resolver.Resolve<IPushNotification>();
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>(); _googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
Init(); Init();
} }
@ -328,8 +330,15 @@ namespace Bit.App.Pages
_googleAnalyticsService.TrackAppEvent("OpenedSetting", "RateApp"); _googleAnalyticsService.TrackAppEvent("OpenedSetting", "RateApp");
if(Device.RuntimePlatform == Device.iOS) if(Device.RuntimePlatform == Device.iOS)
{ {
Device.OpenUri(new Uri($"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews" + if(_deviceInfoService.Version < 11)
"?id=1137397744&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software")); {
Device.OpenUri(new Uri("itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews" +
"?id=1137397744&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software"));
}
else
{
Device.OpenUri(new Uri("itms-apps://itunes.apple.com/us/app/id1137397744?action=write-review"));
}
} }
else if(Device.RuntimePlatform == Device.Android) else if(Device.RuntimePlatform == Device.Android)
{ {