diff --git a/iphone/Maps/3party/Flurry/Flurry.h b/iphone/Maps/3party/Flurry/Flurry.h index a4973f9020..0f2a10c8b6 100755 --- a/iphone/Maps/3party/Flurry/Flurry.h +++ b/iphone/Maps/3party/Flurry/Flurry.h @@ -1045,7 +1045,48 @@ typedef enum { * @param verticalAccuracy The accuracy of the altitude value in meters. * */ -+ (void)setLatitude:(double)latitude longitude:(double)longitude horizontalAccuracy:(float)horizontalAccuracy verticalAccuracy:(float)verticalAccuracy; ++ (void)setLatitude:(double)latitude + longitude:(double)longitude + horizontalAccuracy:(float)horizontalAccuracy + verticalAccuracy:(float)verticalAccuracy __attribute__((deprecated)); +; + +//@} + +/** @name Location Reporting + * Opt-out Methods for setting location information. + */ +//@{ +/*! + * @brief Turn on/off location information of the session (default is on). + * @since 8.4.0 + * + * Use CLLocationManager to start the location tracking of the session. Flurry does not + * prompt users for location permission, we fetch the available location in device daemon. + * + * @note Only the last location in cache is captured per session. \n + * Regardless of accuracy specified, the Flurry SDK will only report location at city level or + higher. \n + * Location is aggregated across all users of your app and not available on a per user basis. \n + * This information should only be captured if it is germaine to the use of your app. + * + * @code + CLLocationManager *locationManager = [[CLLocationManager alloc] init]; + [locationManager startUpdatingLocation]; + * @endcode + * + * It is on by default. After starting the location manager, you can turn off + * opt-out location tracking by calling this method. + * + * @code + [Flurry trackPreciseLocation:NO]; + * @endcode + * @param state The boolean to switch on/off for location tracking + * @return a boolean, if the state is YES, it tests device/app permission. If permission + * is granted, it returns NO. If permission is valid, it returns YES. If the + * state is NO, it always returns NO. + */ ++ (BOOL)trackPreciseLocation:(BOOL)state; //@} @@ -1101,13 +1142,16 @@ typedef enum { /*! * @brief Enable custom event logging. * @since 2.7 - * + * + * @deprecated since 7.9.0. + * This method will be removed in a future version of the SDK. + * * Use this method to allow the capture of custom events. The default value is @c YES. * * @param value YES to enable event logging, NO to stop custom logging. * */ -+ (void)setEventLoggingEnabled:(BOOL)value; ++ (void)setEventLoggingEnabled:(BOOL)value __attribute__((deprecated)); #if !TARGET_OS_TV /*! @@ -1152,15 +1196,29 @@ typedef enum { * @since 7.8.0 * * This method needs to be called before a transaction is finished and finalized. - * + * @note: Needs a 'required' dependency on StoreKit for this API to function correctly. * * @param transaction an SKPaymentTransaction. - * @param statusCallback a callback gettign called when the status of ID that is associated with the event + * @param statusCallback a callback gettign called when the status of ID that is associated with + * the event * */ + (void) logPaymentTransaction:(SKPaymentTransaction*)transaction statusCallback:(void(^)(FlurryTransactionRecordStatus))statusCallback; #endif +#if !TARGET_OS_WATCH +/*! + * @brief Enables implicit recording of Apple Store transactions. + * @since 7.9.0 + * + * This method needs to be called before any transaction is finialized. + * @note: Needs a 'required' dependency on StoreKit for this API to function correctly. + * + * @param value YES to enable transaction logging, NO to stop transaction logging. + * + */ ++ (void)setIAPReportingEnabled:(BOOL)value; +#endif #if TARGET_OS_TV /*! diff --git a/iphone/Maps/3party/Flurry/FlurryEmpty.m b/iphone/Maps/3party/Flurry/FlurryEmpty.m new file mode 100755 index 0000000000..f38647f4e7 --- /dev/null +++ b/iphone/Maps/3party/Flurry/FlurryEmpty.m @@ -0,0 +1,6 @@ + +#import "Flurry.h" + +@implementation Flurry (ForceLoad) + +@end \ No newline at end of file diff --git a/iphone/Maps/3party/Flurry/FlurrySessionBuilder.h b/iphone/Maps/3party/Flurry/FlurrySessionBuilder.h index 294c19e169..d38cb09428 100755 --- a/iphone/Maps/3party/Flurry/FlurrySessionBuilder.h +++ b/iphone/Maps/3party/Flurry/FlurrySessionBuilder.h @@ -6,8 +6,6 @@ // Copyright © 2016 Flurry Inc. All rights reserved. // - - /*! * @brief Enum for setting up log output level. * @since 4.2.0 @@ -32,11 +30,10 @@ typedef enum { * * @note There is a maximum of 605 versions allowed for a single app. * - * @param version The custom version name. + * @param value The custom version name. */ - (FlurrySessionBuilder*) withAppVersion:(NSString *)value; - /*! * @brief Set the timeout for expiring a Flurry session. * @since 7.7.0 @@ -45,7 +42,7 @@ typedef enum { * starting a new session upon resume. The default value for the session timeout is 10 * seconds in the background. * - * @param seconds The time in seconds to set the session timeout to. + * @param value The time in seconds to set the session timeout to. */ - (FlurrySessionBuilder*) withSessionContinueSeconds:(NSInteger)value; @@ -97,6 +94,33 @@ typedef enum { */ - (FlurrySessionBuilder*) withShowErrorInLog:(BOOL) value; +#if !TARGET_OS_WATCH +/*! + * @brief Enables implicit recording of Apple Store transactions. + * @since 7.9.0 + * + * @note This method needs to be called before any transaction is finialized. + * + * @param value @c YES to enable transaction logging with the default being @c NO. + * + */ + +- (FlurrySessionBuilder *)withIAPReportingEnabled:(BOOL)value; + +/*! + * @brief Enables opting out of background sessions being counted towards total sessions. + * @since 8.1.0-rc.1 + * + * @note This method must be called prior to invoking #startSession:. + * + * @param value @c NO to opt out of counting background sessions towards total sessions. + * The default value for the session is @c YES + * + */ + +- (FlurrySessionBuilder *)withIncludeBackgroundSessionsInMetrics:(BOOL)value; +#endif + #if TARGET_OS_TV /*! * @brief Sets the minimum duration (in minutes) before a partial session report is sent to Flurry. diff --git a/iphone/Maps/3party/Flurry/libFlurry_7.8.2.a b/iphone/Maps/3party/Flurry/libFlurry_8.3.4.a similarity index 60% rename from iphone/Maps/3party/Flurry/libFlurry_7.8.2.a rename to iphone/Maps/3party/Flurry/libFlurry_8.3.4.a index 7021d8fd9b..1b98443c74 100755 Binary files a/iphone/Maps/3party/Flurry/libFlurry_7.8.2.a and b/iphone/Maps/3party/Flurry/libFlurry_8.3.4.a differ diff --git a/iphone/Maps/Core/BackgroundFetchScheduler/BackgroundFetchScheduler.swift b/iphone/Maps/Core/BackgroundFetchScheduler/BackgroundFetchScheduler.swift index 3d6dedb4db..2879547094 100644 --- a/iphone/Maps/Core/BackgroundFetchScheduler/BackgroundFetchScheduler.swift +++ b/iphone/Maps/Core/BackgroundFetchScheduler/BackgroundFetchScheduler.swift @@ -20,7 +20,8 @@ final class BackgroundFetchScheduler: NSObject { @objc func run() { DispatchQueue.main.async { self.fullfillFrameworkRequirements() - self.performTasks() + let timeout = DispatchTime.now() + UIApplication.shared.backgroundTimeRemaining - Const.timeoutSafetyIndent + self.performTasks(timeout: timeout) } } @@ -32,11 +33,11 @@ final class BackgroundFetchScheduler: NSObject { return tasks.reduce(.none) { max($0, $1.frameworkType) } } - private func performTasks() { + private func performTasks(timeout: DispatchTime) { DispatchQueue.global().async { self.setCompletionHandlers() self.startTasks() - self.waitTasks() + self.waitTasks(timeout: timeout) } } @@ -59,8 +60,7 @@ final class BackgroundFetchScheduler: NSObject { tasksGroup.leave() } - private func waitTasks() { - let timeout = DispatchTime.now() + UIApplication.shared.backgroundTimeRemaining - Const.timeoutSafetyIndent + private func waitTasks(timeout: DispatchTime) { let groupCompletion = tasksGroup.wait(timeout: timeout) DispatchQueue.main.async { switch groupCompletion { diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 87368e3b52..69827f4111 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -17,7 +17,6 @@ 3404165C1E7C29AE00E2B6D6 /* PhotosInteractionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3404165A1E7C29AE00E2B6D6 /* PhotosInteractionAnimator.swift */; }; 340474F11E08199D00C92850 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474DC1E08199D00C92850 /* Crashlytics.framework */; }; 340474F41E08199D00C92850 /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474DD1E08199D00C92850 /* Fabric.framework */; }; - 340475001E08199D00C92850 /* libFlurry_7.8.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474E41E08199D00C92850 /* libFlurry_7.8.2.a */; }; 340475091E08199E00C92850 /* MWMMyTarget.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340474EB1E08199D00C92850 /* MWMMyTarget.mm */; }; 3404750F1E08199E00C92850 /* MyTrackerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474EE1E08199D00C92850 /* MyTrackerSDK.framework */; }; 3404754A1E081A4600C92850 /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340475161E081A4600C92850 /* AppInfo.mm */; }; @@ -156,6 +155,7 @@ 3486B5161E27AD3B0069C126 /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5101E27AD3B0069C126 /* Framework.cpp */; }; 3486B5191E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5131E27AD3B0069C126 /* MWMFrameworkListener.mm */; }; 3486B51E1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */; }; + 34870B78201732E30085A7F6 /* libFlurry_8.3.4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34870B77201732E30085A7F6 /* libFlurry_8.3.4.a */; }; 3488B0131E9D0AEC0068AFD8 /* AdBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3488B0101E9D0AEC0068AFD8 /* AdBanner.swift */; }; 3488B0161E9D0AEC0068AFD8 /* AdBanner.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3488B0111E9D0AEC0068AFD8 /* AdBanner.xib */; }; 3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3488B0181E9D0B230068AFD8 /* UIColor+Modifications.swift */; }; @@ -716,7 +716,6 @@ 340474DD1E08199D00C92850 /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; }; 340474E21E08199D00C92850 /* Flurry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flurry.h; sourceTree = ""; }; 340474E31E08199D00C92850 /* FlurrySessionBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlurrySessionBuilder.h; sourceTree = ""; }; - 340474E41E08199D00C92850 /* libFlurry_7.8.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libFlurry_7.8.2.a; sourceTree = ""; }; 340474EA1E08199D00C92850 /* MWMMyTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMyTarget.h; sourceTree = ""; }; 340474EB1E08199D00C92850 /* MWMMyTarget.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMyTarget.mm; sourceTree = ""; }; 340474EC1E08199D00C92850 /* MWMMyTargetDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMyTargetDelegate.h; sourceTree = ""; }; @@ -948,6 +947,7 @@ 3486B5141E27AD3B0069C126 /* MWMFrameworkObservers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkObservers.h; sourceTree = ""; }; 3486B51B1E27AD590069C126 /* MWMFrameworkHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkHelper.h; sourceTree = ""; }; 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFrameworkHelper.mm; sourceTree = ""; }; + 34870B77201732E30085A7F6 /* libFlurry_8.3.4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libFlurry_8.3.4.a; sourceTree = ""; }; 3488B0101E9D0AEC0068AFD8 /* AdBanner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdBanner.swift; sourceTree = ""; }; 3488B0111E9D0AEC0068AFD8 /* AdBanner.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AdBanner.xib; sourceTree = ""; }; 3488B0181E9D0B230068AFD8 /* UIColor+Modifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Modifications.swift"; sourceTree = ""; }; @@ -1750,7 +1750,6 @@ 3411387D1C15AE73002E3B3E /* libeditor.a in Frameworks */, 6741AABD1BF356BA002C974C /* libagg.a in Frameworks */, 6741AABE1BF356BA002C974C /* libalohalitics.a in Frameworks */, - 340475001E08199D00C92850 /* libFlurry_7.8.2.a in Frameworks */, 6741AAC01BF356BA002C974C /* libapi.a in Frameworks */, 6741AAC11BF356BA002C974C /* libbase.a in Frameworks */, F68BDF061EEA9A830009BB81 /* MyTargetSDK.framework in Frameworks */, @@ -1776,6 +1775,7 @@ 6741AAD31BF356BA002C974C /* librouting.a in Frameworks */, 674A7E281C0DA573003D48E1 /* libstb_image.a in Frameworks */, 6741AAD41BF356BA002C974C /* libsearch.a in Frameworks */, + 34870B78201732E30085A7F6 /* libFlurry_8.3.4.a in Frameworks */, 6741AAD51BF356BA002C974C /* libstorage.a in Frameworks */, 6741AAD61BF356BA002C974C /* libsuccinct.a in Frameworks */, 3466A2D41FB1C83C005494D3 /* FacebookShare.framework in Frameworks */, @@ -1969,7 +1969,7 @@ children = ( 340474E21E08199D00C92850 /* Flurry.h */, 340474E31E08199D00C92850 /* FlurrySessionBuilder.h */, - 340474E41E08199D00C92850 /* libFlurry_7.8.2.a */, + 34870B77201732E30085A7F6 /* libFlurry_8.3.4.a */, ); path = Flurry; sourceTree = "";