diff --git a/iphone/Maps/Bridging-Header.h b/iphone/Maps/Bridging-Header.h index 6a8833aeeb..394752ea36 100644 --- a/iphone/Maps/Bridging-Header.h +++ b/iphone/Maps/Bridging-Header.h @@ -6,9 +6,6 @@ #import "AuthenticationServices/AuthenticationServices.h" #import "CarPlay/CarPlay.h" -#import "FBAudienceNetwork/FBAudienceNetwork.h" -#import "FBSDKLoginKit/FBSDKLoginKit.h" -#import "GoogleSignIn/GIDSignIn.h" #import "UIKit/UIKit.h" #import "3party/Alohalytics/src/alohalytics_objc.h" diff --git a/iphone/Maps/Categories/UIKitCategories.m b/iphone/Maps/Categories/UIKitCategories.m index 1219d04b06..f311d05cb9 100644 --- a/iphone/Maps/Categories/UIKitCategories.m +++ b/iphone/Maps/Categories/UIKitCategories.m @@ -2,7 +2,6 @@ #import "UIButton+RuntimeAttributes.h" #import "UIImageView+Coloring.h" -#import #import @implementation NSObject (Optimized) @@ -175,25 +174,12 @@ if (!url) { NSAssert(false, @"URL is nil!"); - NSError *err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain - code:0 - userInfo:@{ - @"Trying to open nil url" : @YES - }]; - [[FIRCrashlytics crashlytics] recordError:err]; return; } NSString * scheme = url.scheme; if (!([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"])) { NSAssert(false, @"Incorrect url's scheme!"); - NSString *urlString = url.absoluteString; - NSError *err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain - code:0 - userInfo:@{ - @"Trying to open incorrect url" : urlString - }]; - [[FIRCrashlytics crashlytics] recordError:err]; return; } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager+Entity.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager+Entity.mm index 6e4cb03d6f..782e119721 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager+Entity.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager+Entity.mm @@ -5,6 +5,8 @@ #import "MWMRouterTransitStepInfo.h" #import "SwiftBridge.h" +#import + #include "routing/following_info.hpp" #include "routing/turns.hpp" diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 2ee146ffda..7ea7b09554 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -16,7 +16,7 @@ #import "MapsAppDelegate.h" #import "SwiftBridge.h" -#include +#import #import #import @@ -24,8 +24,6 @@ #include "geometry/mercator.hpp" -#import - // If you have a "missing header error" here, then please run configure.sh script in the root repo // folder. #import "../../../private.h" @@ -730,12 +728,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; - (void)processCountryEvent:(NSString *)countryId { if (countryId.length == 0) { -#ifdef OMIM_PRODUCTION - auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain - code:1 - userInfo:@{@"Description": @"attempt to get info from empty countryId"}]; - [[FIRCrashlytics crashlytics] recordError:err]; -#endif return; } diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index c1bf2a2345..a70cb72f0f 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -23,13 +23,9 @@ #import #import #import -#import #import -#import -#import - -#include +#import #import #include "map/framework_light.hpp" @@ -78,18 +74,10 @@ void InitCrashTrackers() { #ifdef OMIM_PRODUCTION if ([MWMSettings crashReportingDisabled]) return; - - NSString *googleConfig = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; - if ([[NSFileManager defaultManager] fileExistsAtPath:googleConfig]) { - [FIRApp configure]; - } #endif } void ConfigCrashTrackers() { -#ifdef OMIM_PRODUCTION - [[FIRCrashlytics crashlytics] setUserID:[Alohalytics installationId]]; -#endif } void OverrideUserAgent() { @@ -104,7 +92,6 @@ using namespace osm_auth_ios; @interface MapsAppDelegate () @property(nonatomic) NSInteger standbyCounter; @@ -214,8 +201,6 @@ using namespace osm_auth_ios; } [self enableTTSForTheFirstTime]; - [GIDSignIn sharedInstance].clientID = @(GOOGLE_WEB_CLIENT_ID); - self.notificationManager = [[NotificationManager alloc] init]; self.notificationManager.delegate = self; [UNUserNotificationCenter currentNotificationCenter].delegate = self.notificationManager; @@ -296,24 +281,11 @@ using namespace osm_auth_ios; } - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { -#ifdef OMIM_PRODUCTION - auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain - code:1 - userInfo:@{@"Description": @"applicationDidReceiveMemoryWarning"}]; - [[FIRCrashlytics crashlytics] recordError:err]; -#endif } - (void)applicationWillTerminate:(UIApplication *)application { [self.mapViewController onTerminate]; -#ifdef OMIM_PRODUCTION - auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain - code:2 - userInfo:@{@"Description": @"applicationWillTerminate"}]; - [[FIRCrashlytics crashlytics] recordError:err]; -#endif - // Global cleanup DeleteFramework(); } @@ -493,15 +465,6 @@ using namespace osm_auth_ios; - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { - BOOL isGoogleURL = [[GIDSignIn sharedInstance] handleURL:url - sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] - annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; - if (isGoogleURL) - return YES; - - BOOL isFBURL = [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]; - if (isFBURL) - return YES; return [DeepLinkHandler.shared applicationDidOpenUrl:url]; } @@ -689,9 +652,6 @@ using namespace osm_auth_ios; } - (void)onConversionDataRequestFailure:(NSError *)error { - dispatch_async(dispatch_get_main_queue(), ^{ - [[FIRCrashlytics crashlytics] recordError:error]; - }); } #pragma mark - CPApplicationDelegate implementation diff --git a/iphone/Maps/Common/Statistics/MWMCustomFacebookEvents.mm b/iphone/Maps/Common/Statistics/MWMCustomFacebookEvents.mm index 58b4447798..764cf90adc 100644 --- a/iphone/Maps/Common/Statistics/MWMCustomFacebookEvents.mm +++ b/iphone/Maps/Common/Statistics/MWMCustomFacebookEvents.mm @@ -1,8 +1,6 @@ #import "MWMCustomFacebookEvents.h" #import "3party/Alohalytics/src/alohalytics_objc.h" -#import - #include #include "platform/downloader_defines.hpp" @@ -13,11 +11,11 @@ static NSString * const kEnableCustomFBEventsForNewUsers = @"FBEnableCustomEventsForNewUsers"; // Special one-time events to improve marketing targeting. // NOTE: Event names are using some default FB names by Alexander Bobko's request. -static NSString * const kFirstSessionIsLongerThanXMinutesEvent = FBSDKAppEventNameAchievedLevel; +static NSString * const kFirstSessionIsLongerThanXMinutesEvent = @"FBSDKAppEventNameAchievedLevel"; static NSInteger const kFirstSessionLengthInSeconds = 5 * 60; -static NSString * const kNextLaunchAfterHoursInterval = FBSDKAppEventNameCompletedRegistration; +static NSString * const kNextLaunchAfterHoursInterval = @"FBSDKAppEventNameCompletedRegistration"; static NSInteger const kNextLaunchMinHoursInterval = 6; -static NSString * const kDownloadedSecondMapEvent = FBSDKAppEventNameUnlockedAchievement; +static NSString * const kDownloadedSecondMapEvent = @"FBSDKAppEventNameUnlockedAchievement"; static constexpr int kNotSubscribed = -1; static int gStorageSubscriptionId = kNotSubscribed; @@ -33,10 +31,7 @@ static int gStorageSubscriptionId = kNotSubscribed; + (void)applicationDidEnterBackgroundOnlyOnceInAnAppLifeTimeAtTheEndOfVeryFirstSession:(NSNotification *)notification { [NSNotificationCenter.defaultCenter removeObserver:[MWMCustomFacebookEvents class]]; - NSInteger const seconds = [Alohalytics totalSecondsSpentInTheApp]; - if (seconds >= kFirstSessionLengthInSeconds) - [FBSDKAppEvents logEvent:kFirstSessionIsLongerThanXMinutesEvent - parameters:@{FBSDKAppEventParameterNameLevel : [NSNumber numberWithInteger:(seconds / 60)]}]; + [MWMCustomFacebookEvents markEventAsAlreadyFired:kFirstSessionIsLongerThanXMinutesEvent]; } @@ -73,7 +68,6 @@ static int gStorageSubscriptionId = kNotSubscribed; (-[Alohalytics firstLaunchDate].timeIntervalSinceNow) / 3600; if (hoursFromFirstLaunch >= kNextLaunchMinHoursInterval) { - [FBSDKAppEvents logEvent:kNextLaunchAfterHoursInterval]; [MWMCustomFacebookEvents markEventAsAlreadyFired:kNextLaunchAfterHoursInterval]; } } @@ -86,7 +80,6 @@ static int gStorageSubscriptionId = kNotSubscribed; [](storage::CountryId const &) { if (GetFramework().GetStorage().GetDownloadedFilesCount() >= 2) { - [FBSDKAppEvents logEvent:kDownloadedSecondMapEvent]; [MWMCustomFacebookEvents markEventAsAlreadyFired:kDownloadedSecondMapEvent]; // We can't unsubscribe from this callback immediately now, it will crash Storage's // observers notification. diff --git a/iphone/Maps/Common/Statistics/Statistics.mm b/iphone/Maps/Common/Statistics/Statistics.mm index a0fadb2d6b..97dd8b2b83 100644 --- a/iphone/Maps/Common/Statistics/Statistics.mm +++ b/iphone/Maps/Common/Statistics/Statistics.mm @@ -4,8 +4,7 @@ #import "3party/Alohalytics/src/alohalytics.h" #import "3party/Alohalytics/src/alohalytics_objc.h" -#import -#import + #import #include "platform/platform.hpp" @@ -38,8 +37,8 @@ NSInteger convertToAlohalyticsChannel(StatisticsChannel cnannel) { [Alohalytics setup:@[@(ALOHALYTICS_URL), [NSString stringWithFormat:@"%@/%@", @(ALOHALYTICS_URL), @"realtime"]] withLaunchOptions:launchOptions]; } - // Always call Facebook method, looks like it is required to handle some url schemes and sign on scenarios. - return [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; + + return YES; } - (void)logEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters @@ -91,7 +90,7 @@ NSInteger convertToAlohalyticsChannel(StatisticsChannel cnannel) { - (void)applicationDidBecomeActive { if (![MWMSettings statisticsEnabled]) return; - [FBSDKAppEvents activateApp]; + // Special FB events to improve marketing campaigns quality. [MWMCustomFacebookEvents optimizeExpenses]; } diff --git a/iphone/Maps/Common/Statistics/fabric_logging_ios.mm b/iphone/Maps/Common/Statistics/fabric_logging_ios.mm index 2fbb04c093..0097a9e01d 100644 --- a/iphone/Maps/Common/Statistics/fabric_logging_ios.mm +++ b/iphone/Maps/Common/Statistics/fabric_logging_ios.mm @@ -1,5 +1,3 @@ -#import - #include "fabric_logging.hpp" #include "base/assert.hpp" @@ -10,20 +8,6 @@ namespace platform { void LogMessageFabric(base::LogLevel level, base::SrcPoint const & srcPoint, std::string const & msg) { - std::string recordType; - switch (level) - { - case LINFO: recordType.assign("INFO "); break; - case LDEBUG: recordType.assign("DEBUG "); break; - case LWARNING: recordType.assign("WARN "); break; - case LERROR: recordType.assign("ERROR "); break; - case LCRITICAL: recordType.assign("FATAL "); break; - case NUM_LOG_LEVELS: CHECK(false, ()); break; - } - - std::string const srcString = recordType + DebugPrint(srcPoint) + " " + msg + "\n"; - - [[FIRCrashlytics crashlytics] logWithFormat:@"%@", @(srcString.c_str())]; } void IosLogMessage(base::LogLevel level, base::SrcPoint const & srcPoint, std::string const & msg) diff --git a/iphone/Maps/Core/DeepLink/Strategies/DeepLinkRouteStrategyAdapter.mm b/iphone/Maps/Core/DeepLink/Strategies/DeepLinkRouteStrategyAdapter.mm index 162c705a70..00e758e97c 100644 --- a/iphone/Maps/Core/DeepLink/Strategies/DeepLinkRouteStrategyAdapter.mm +++ b/iphone/Maps/Core/DeepLink/Strategies/DeepLinkRouteStrategyAdapter.mm @@ -1,6 +1,5 @@ #import "DeepLinkRouteStrategyAdapter.h" #import -#import #import "MWMCoreRouterType.h" #import "MWMRoutePoint+CPP.h" @@ -21,10 +20,6 @@ intermediateIndex:0]; _type = routerType(parsedData.m_type); } else { - NSError *err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain - code:5 - userInfo:@{@"Description": @"Invalid number of route points", @"URL": url}]; - [[FIRCrashlytics crashlytics] recordError:err]; return nil; } } diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm index d304364622..6c7608e90a 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.mm +++ b/iphone/Maps/Core/Routing/MWMRouter.mm @@ -1,5 +1,4 @@ #import "MWMRouter.h" -#import #import "MWMAlertViewController+CPP.h" #import "MWMCoreRouterType.h" #import "MWMFrameworkListener.h" @@ -148,12 +147,6 @@ void logPointEvent(MWMRoutePoint *point, NSString *eventType) { kStatToLocation: makeLocationEventValue(p2.latitude, p2.longitude) } atLocation:[MWMLocationManager lastLocation]]; - } else { - auto err = [[NSError alloc] - initWithDomain:kMapsmeErrorDomain - code:5 - userInfo:@{@"Description": @"Invalid number of taxi route points", @"Count": @(routePoints.size())}]; - [[FIRCrashlytics crashlytics] recordError:err]; } [taxiDataSource taxiURL:^(NSURL *url) { @@ -466,12 +459,6 @@ void logPointEvent(MWMRoutePoint *point, NSString *eventType) { } needToRebuild:needToRebuild]; } - } else { - auto err = [[NSError alloc] - initWithDomain:kMapsmeErrorDomain - code:5 - userInfo:@{@"Description": @"Invalid number of route points", @"Count": @(routePoints.size())}]; - [[FIRCrashlytics crashlytics] recordError:err]; } }; diff --git a/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm b/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm index 39eed0b35e..0d6fbd81f3 100644 --- a/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm +++ b/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm @@ -1,5 +1,4 @@ #import -#import #import #import #import "MWMSearch+CoreSpotlight.h" @@ -59,7 +58,6 @@ if (error) { NSError * err = error; - [[FIRCrashlytics crashlytics] recordError:err]; LOG(LERROR, ("addCategoriesToSpotlight failed: ", err.localizedDescription.UTF8String)); } diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index e3fdaee041..37ba99aa29 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -36,7 +36,6 @@ 340416541E7C09C200E2B6D6 /* PhotoScalingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340416521E7C09C200E2B6D6 /* PhotoScalingView.swift */; }; 340416581E7C0D4100E2B6D6 /* PhotosOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340416561E7C0D4100E2B6D6 /* PhotosOverlayView.swift */; }; 3404165C1E7C29AE00E2B6D6 /* PhotosInteractionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3404165A1E7C29AE00E2B6D6 /* PhotosInteractionAnimator.swift */; }; - 340474F41E08199D00C92850 /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474DD1E08199D00C92850 /* Fabric.framework */; }; 3404754D1E081A4600C92850 /* MWMKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 340475191E081A4600C92850 /* MWMKeyboard.m */; }; 340475501E081A4600C92850 /* fabric_logging_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340475201E081A4600C92850 /* fabric_logging_ios.mm */; }; 340475531E081A4600C92850 /* MWMCustomFacebookEvents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340475221E081A4600C92850 /* MWMCustomFacebookEvents.mm */; }; @@ -107,8 +106,6 @@ 3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B31E07F045004AF2AD /* UITextField+RuntimeAttributes.m */; }; 3454D7E31E07F045004AF2AD /* UITextView+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.m */; }; 3457C4261F680F1900028233 /* String+BoundingRect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3457C4241F680F1900028233 /* String+BoundingRect.swift */; }; - 345E8F4E1F83984500A826CC /* GoogleSignIn.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 347D15C71F82362900E86251 /* GoogleSignIn.framework */; }; - 345E8F4F1F83984500A826CC /* GoogleSignInDependencies.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 347D15C81F82362900E86251 /* GoogleSignInDependencies.framework */; }; 3462258F1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3462258D1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm */; }; 346225921DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = 346225901DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib */; }; 3463BA671DE81DB90082417F /* MWMTrafficButtonViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3463BA641DE81DB90082417F /* MWMTrafficButtonViewController.mm */; }; @@ -533,9 +530,7 @@ 67B78B3F1E422C110018E590 /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B3E1E422C110018E590 /* SafariServices.framework */; }; 67B78B411E422C360018E590 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B401E422C360018E590 /* CoreSpotlight.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 67B78B431E422C620018E590 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B421E422C620018E590 /* MessageUI.framework */; }; - 67B78B451E422C970018E590 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B441E422C970018E590 /* iAd.framework */; }; 67B78B471E422E0A0018E590 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B461E422E0A0018E590 /* MobileCoreServices.framework */; }; - 67B78B551E42333C0018E590 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B541E42333C0018E590 /* AdSupport.framework */; }; 6B9978361C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; }; 7BD07E4A8D71CA41F082BEC7 /* Pods_MAPS_ME.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58E5736C23FC4E77509C9946 /* Pods_MAPS_ME.framework */; }; 99012847243F0D6900C72B10 /* UIViewController+alternative.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99012846243F0D6900C72B10 /* UIViewController+alternative.swift */; }; @@ -2189,8 +2184,6 @@ 1DA7908820762CEB008BDD6B /* libopen_location_code.a in Frameworks */, 45CBCCBA20590AAB006B55C2 /* libkml.a in Frameworks */, 56EE14D11FE804550036F20C /* libtransit.a in Frameworks */, - 345E8F4E1F83984500A826CC /* GoogleSignIn.framework in Frameworks */, - 345E8F4F1F83984500A826CC /* GoogleSignInDependencies.framework in Frameworks */, 4586D0E71F4813AB00DF9CE5 /* libmwm_diff.a in Frameworks */, 4586D0C41F48121A00DF9CE5 /* libbsdiff.a in Frameworks */, 34E6F2DB1F459C05008E14F9 /* GLKit.framework in Frameworks */, @@ -2199,9 +2192,7 @@ 45FFD65D1E965EBE00DB854E /* liblocal_ads.a in Frameworks */, 34D1B6F11E95096B0057E9C7 /* libicu.a in Frameworks */, 671E78D31E6A423300B2859B /* librouting_common.a in Frameworks */, - 67B78B551E42333C0018E590 /* AdSupport.framework in Frameworks */, 67B78B471E422E0A0018E590 /* MobileCoreServices.framework in Frameworks */, - 67B78B451E422C970018E590 /* iAd.framework in Frameworks */, 67B78B431E422C620018E590 /* MessageUI.framework in Frameworks */, 67B78B411E422C360018E590 /* CoreSpotlight.framework in Frameworks */, 67B78B3F1E422C110018E590 /* SafariServices.framework in Frameworks */, @@ -2219,7 +2210,6 @@ 6741AAC21BF356BA002C974C /* libcoding.a in Frameworks */, 6741AAC31BF356BA002C974C /* libexpat.a in Frameworks */, 6741AAC41BF356BA002C974C /* libfreetype.a in Frameworks */, - 340474F41E08199D00C92850 /* Fabric.framework in Frameworks */, 6741AAC61BF356BA002C974C /* libgeometry.a in Frameworks */, 674A7E291C0DA576003D48E1 /* libsdf_image.a in Frameworks */, 6741AAC91BF356BA002C974C /* libindexer.a in Frameworks */, @@ -4945,7 +4935,6 @@ 6741A9411BF340DE002C974C /* Resources */, 6741A9A01BF340DE002C974C /* Sources */, 6741AA311BF340DE002C974C /* Frameworks */, - AED76F73852BBAF00EEF9E66 /* [CP] Embed Pods Frameworks */, 4740184523F5BDE900A93C81 /* Embed Frameworks */, ); buildRules = ( @@ -5264,36 +5253,6 @@ shellPath = /bin/sh; shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n../../tools/unix/check_cert.sh\n"; }; - AED76F73852BBAF00EEF9E66 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MAPS.ME/Pods-MAPS.ME-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework", - "${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework", - "${BUILT_PRODUCTS_DIR}/Flurry-iOS-SDK/Flurry_iOS_SDK.framework", - "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", - "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", - "${BUILT_PRODUCTS_DIR}/mopub-ios-sdk/MoPub.framework", - "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flurry_iOS_SDK.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MoPub.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MAPS.ME/Pods-MAPS.ME-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; DC18E8E671D9B333180B1B98 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/iphone/Maps/Podfile b/iphone/Maps/Podfile index 3cca2853d0..397c157689 100644 --- a/iphone/Maps/Podfile +++ b/iphone/Maps/Podfile @@ -8,14 +8,4 @@ target 'MAPS.ME' do # Pods for MAPS.ME -pod 'AppsFlyerFramework', '4.9.0' -pod 'Pushwoosh', '5.16.0' -pod 'FBSDKCoreKit', '5.15.1' -pod 'FBSDKLoginKit', '5.15.1' -pod 'Flurry-iOS-SDK/FlurrySDK', '11.1' -pod 'mopub-ios-sdk', '5.12' -pod 'MoPub-FacebookAudienceNetwork-Adapters', '5.9.0' -pod 'Firebase/Crashlytics', '6.26.0' -pod 'Firebase/Analytics', '6.26.0' - end diff --git a/iphone/Maps/UI/Authorization/AuthorizationViewController.swift b/iphone/Maps/UI/Authorization/AuthorizationViewController.swift index 558f5a779f..d34a8b23a8 100644 --- a/iphone/Maps/UI/Authorization/AuthorizationViewController.swift +++ b/iphone/Maps/UI/Authorization/AuthorizationViewController.swift @@ -1,9 +1,5 @@ -import FBSDKCoreKit -import FBSDKLoginKit -import GoogleSignIn import SafariServices import AuthenticationServices -import Firebase @objc enum AuthorizationError: Int { case cancelled @@ -66,15 +62,6 @@ final class AuthorizationViewController: MWMViewController { } @IBAction func googleSignIn() { - let gid = GIDSignIn.sharedInstance()! - if var scopes = gid.scopes { - scopes.append("https://www.googleapis.com/auth/plus.login") - gid.scopes = scopes - } - gid.delegate = self - gid.uiDelegate = self - gid.signIn() - logStatStart(type: .google) } @IBOutlet private var facebookButton: UIButton! { @@ -84,15 +71,6 @@ final class AuthorizationViewController: MWMViewController { } @IBAction func facebookSignIn() { - let fbLoginManager = LoginManager() - fbLoginManager.logIn(permissions: ["public_profile", "email"], from: self) { [weak self] (result, error) in - if let error = error { - self?.process(error: error, type: .facebook) - } else if let token = result?.token { - self?.process(token: token.tokenString, type: .facebook) - } - } - logStatStart(type: .facebook) } @IBAction private func phoneSignIn() { @@ -276,7 +254,6 @@ final class AuthorizationViewController: MWMViewController { kStatError: error.localizedDescription ]) textLabel.text = L("profile_authorization_error") - Crashlytics.crashlytics().record(error: error) } private func process(token: String, @@ -322,19 +299,6 @@ final class AuthorizationViewController: MWMViewController { } } -extension AuthorizationViewController: GIDSignInUIDelegate { -} - -extension AuthorizationViewController: GIDSignInDelegate { - func sign(_: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) { - if let error = error { - process(error: error, type: .google) - } else { - process(token: user.authentication.idToken, type: .google) - } - } -} - extension AuthorizationViewController: UITextViewDelegate { func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -> Bool { let safari = SFSafariViewController(url: URL)