Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Belouosv <aleksey@maps.me>2018-09-28 17:40:47 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2018-09-28 17:50:12 +0300
commita36d03d9dbe13acfbabc4963515d1f3a546c0c6e (patch)
tree49c19357d8c4b4b0d3b9768470a44b06fb848084
parentef8b34323561793945f22fdd7b55a460d129aeb1 (diff)
[iOS] disable third party tracking sdk when "Limit ad tracking" option checked
-rw-r--r--iphone/Maps/Classes/MapsAppDelegate.mm3
-rw-r--r--iphone/Maps/Common/Statistics/Statistics.mm26
2 files changed, 18 insertions, 11 deletions
diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm
index 0d9218ed2f..9561f77fa2 100644
--- a/iphone/Maps/Classes/MapsAppDelegate.mm
+++ b/iphone/Maps/Classes/MapsAppDelegate.mm
@@ -1011,6 +1011,9 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
- (MWMMyTarget *)myTarget
{
+ if (![ASIdentifierManager sharedManager].advertisingTrackingEnabled)
+ return nil;
+
if (!_myTarget)
_myTarget = [[MWMMyTarget alloc] init];
return _myTarget;
diff --git a/iphone/Maps/Common/Statistics/Statistics.mm b/iphone/Maps/Common/Statistics/Statistics.mm
index fd5d6c31d2..75c3935d8d 100644
--- a/iphone/Maps/Common/Statistics/Statistics.mm
+++ b/iphone/Maps/Common/Statistics/Statistics.mm
@@ -8,6 +8,7 @@
#import <MyTrackerSDK/MRMyTracker.h>
#import <MyTrackerSDK/MRMyTrackerParams.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
+#import <AdSupport/ASIdentifierManager.h>
#include "platform/platform.hpp"
#include "platform/settings.hpp"
@@ -39,17 +40,20 @@ void checkFlurryLogStatus(FlurryEventRecordStatus status)
// _enabled should be already correctly set up in init method.
if ([MWMSettings statisticsEnabled])
{
- auto sessionBuilder = [[[FlurrySessionBuilder alloc] init]
- withAppVersion:[AppInfo sharedInfo].bundleVersion];
- [Flurry startSession:@(FLURRY_KEY) withSessionBuilder:sessionBuilder];
- [Flurry logAllPageViewsForTarget:application.windows.firstObject.rootViewController];
-
- [MRMyTracker createTracker:@(MY_TRACKER_KEY)];
-#ifdef DEBUG
- [MRMyTracker setDebugMode:YES];
-#endif
- [MRMyTracker trackerParams].trackLaunch = YES;
- [MRMyTracker setupTracker];
+ if ([ASIdentifierManager sharedManager].advertisingTrackingEnabled)
+ {
+ auto sessionBuilder = [[[FlurrySessionBuilder alloc] init]
+ withAppVersion:[AppInfo sharedInfo].bundleVersion];
+ [Flurry startSession:@(FLURRY_KEY) withSessionBuilder:sessionBuilder];
+ [Flurry logAllPageViewsForTarget:application.windows.firstObject.rootViewController];
+
+ [MRMyTracker createTracker:@(MY_TRACKER_KEY)];
+ #ifdef DEBUG
+ [MRMyTracker setDebugMode:YES];
+ #endif
+ [MRMyTracker trackerParams].trackLaunch = YES;
+ [MRMyTracker setupTracker];
+ }
[Alohalytics setup:@(ALOHALYTICS_URL) withLaunchOptions:launchOptions];
}