[iOS] validate subscription only if WiFi connection available

https://jira.mail.ru/browse/MAPSME-10906
This commit is contained in:
Aleksey Belouosv 2019-06-21 18:44:50 +03:00 committed by Aleksey Belousov
parent a53557c073
commit 13c1ec8d82
3 changed files with 8 additions and 1 deletions

View file

@ -238,7 +238,7 @@ using namespace osm_auth_ios;
self.notificationManager.delegate = self;
[UNUserNotificationCenter currentNotificationCenter].delegate = self.notificationManager;
if ([MWMFrameworkHelper canUseNetwork]) {
if ([MWMFrameworkHelper isWiFiConnected]) {
[[SubscriptionManager shared] validate];
self.pendingTransactionHandler = [InAppPurchase pendingTransactionsHandler];
__weak __typeof(self) ws = self;

View file

@ -16,6 +16,8 @@
+ (BOOL)isNetworkConnected;
+ (BOOL)isWiFiConnected;
+ (MWMMarkGroupID)invalidCategoryId;
@end

View file

@ -110,6 +110,11 @@
return GetPlatform().ConnectionStatus() != Platform::EConnectionType::CONNECTION_NONE;
}
+ (BOOL)isWiFiConnected
{
return GetPlatform().ConnectionStatus() == Platform::EConnectionType::CONNECTION_WIFI;
}
+ (MWMMarkGroupID)invalidCategoryId { return kml::kInvalidMarkGroupId; }
@end