forked from organicmaps/organicmaps
[iOS] validate subscription only if WiFi connection available
https://jira.mail.ru/browse/MAPSME-10906
This commit is contained in:
parent
a53557c073
commit
13c1ec8d82
3 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
+ (BOOL)isNetworkConnected;
|
||||
|
||||
+ (BOOL)isWiFiConnected;
|
||||
|
||||
+ (MWMMarkGroupID)invalidCategoryId;
|
||||
|
||||
@end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue