From c7d831b2c6086fa00c8b4795b6458e43918039e7 Mon Sep 17 00:00:00 2001 From: Young Fan Date: Wed, 28 Dec 2016 19:33:33 -0800 Subject: [PATCH] Update AnalyticsKitWatchExtensionFlurryProvider to Swift 3 --- .../AnalyticsKit.xcodeproj/project.pbxproj | 4 ++++ ...yticsKitWatchExtensionFlurryProvider.swift | 22 +++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/AnalyticsKit/AnalyticsKit.xcodeproj/project.pbxproj b/AnalyticsKit/AnalyticsKit.xcodeproj/project.pbxproj index d2c3009..ce84439 100644 --- a/AnalyticsKit/AnalyticsKit.xcodeproj/project.pbxproj +++ b/AnalyticsKit/AnalyticsKit.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 14DA91921B7D680E000F194D /* Adjust.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14DA91911B7D680E000F194D /* Adjust.framework */; }; 2E80B4831C526EFC00F8AD7A /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E80B4821C526EFC00F8AD7A /* libicucore.tbd */; }; 2EE8B81C1C52CAF300DC2534 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E80B4821C526EFC00F8AD7A /* libicucore.tbd */; }; + 3EB9DA5C1E14BA2D0054FF4A /* AnalyticsKitWatchExtensionFlurryProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EB9DA5B1E14BA2D0054FF4A /* AnalyticsKitWatchExtensionFlurryProvider.swift */; }; 8B0964DD1D53D25500F7762D /* AnalyticsKitUnitTestProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B0964DC1D53D25400F7762D /* AnalyticsKitUnitTestProvider.swift */; }; 8B0964DF1D53DE8E00F7762D /* AnalyticsKitEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B0964DE1D53DE8E00F7762D /* AnalyticsKitEvent.swift */; }; 8B0964E11D53E13C00F7762D /* AnalyticsKitTimedEventHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B0964E01D53E13C00F7762D /* AnalyticsKitTimedEventHelper.swift */; }; @@ -250,6 +251,7 @@ /* Begin PBXFileReference section */ 14DA91911B7D680E000F194D /* Adjust.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Adjust.framework; sourceTree = ""; }; 2E80B4821C526EFC00F8AD7A /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; + 3EB9DA5B1E14BA2D0054FF4A /* AnalyticsKitWatchExtensionFlurryProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsKitWatchExtensionFlurryProvider.swift; sourceTree = ""; }; 8B0964DC1D53D25400F7762D /* AnalyticsKitUnitTestProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsKitUnitTestProvider.swift; sourceTree = ""; }; 8B0964DE1D53DE8E00F7762D /* AnalyticsKitEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AnalyticsKitEvent.swift; path = ../../AnalyticsKitEvent.swift; sourceTree = ""; }; 8B0964E01D53E13C00F7762D /* AnalyticsKitTimedEventHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsKitTimedEventHelper.swift; sourceTree = ""; }; @@ -1504,6 +1506,7 @@ isa = PBXGroup; children = ( 8BA2B7991D52A3D8008F5E60 /* AnalyticsKitFlurryProvider.swift */, + 3EB9DA5B1E14BA2D0054FF4A /* AnalyticsKitWatchExtensionFlurryProvider.swift */, ); path = Flurry; sourceTree = ""; @@ -1820,6 +1823,7 @@ 8B3CDE9B1DAC3FEA0085F45D /* MPABTestDesignerChangeResponseMessage.m in Sources */, 9C379A0E18183A6B00488101 /* NSNumber+Buckets.m in Sources */, 8B0966D51D53EBBC00F7762D /* MPDataModelAbstract.m in Sources */, + 3EB9DA5C1E14BA2D0054FF4A /* AnalyticsKitWatchExtensionFlurryProvider.swift in Sources */, 8B3CDED51DAC3FEA0085F45D /* MPUITableViewBinding.m in Sources */, 8B09671C1D53EBBC00F7762D /* MPZip.cpp in Sources */, 8B3B60411D51597600B9A17D /* AnalyticsKit.swift in Sources */, diff --git a/Providers/Flurry/AnalyticsKitWatchExtensionFlurryProvider.swift b/Providers/Flurry/AnalyticsKitWatchExtensionFlurryProvider.swift index 4d41e21..9be0bc7 100644 --- a/Providers/Flurry/AnalyticsKitWatchExtensionFlurryProvider.swift +++ b/Providers/Flurry/AnalyticsKitWatchExtensionFlurryProvider.swift @@ -6,46 +6,46 @@ class AnalyticsKitWatchExtensionFlurryProvider: NSObject, AnalyticsKitProvider { func applicationWillEnterForeground() { } func applicationDidEnterBackground() { } func applicationWillTerminate() { } - func uncaughtException(exception: NSException) { } + func uncaughtException(_ exception: NSException) { } // Logging - func logScreen(screenName: String) { + func logScreen(_ screenName: String) { FlurryWatch.logWatchEvent("Screen - \(screenName)") } - func logScreen(screenName: String, withProperties properties: [String : AnyObject]) { + func logScreen(_ screenName: String, withProperties properties: [String: Any]) { FlurryWatch.logWatchEvent("Screen - \(screenName)", withParameters: properties) } - func logEvent(event: String) { + func logEvent(_ event: String) { FlurryWatch.logWatchEvent(event) } - func logEvent(event: String, withProperty key: String, andValue value: String) { + func logEvent(_ event: String, withProperty key: String, andValue value: String) { FlurryWatch.logWatchEvent(event, withParameters: [value: key]) } - func logEvent(event: String, withProperties properties: [String: AnyObject]) { + func logEvent(_ event: String, withProperties properties: [String: Any]) { FlurryWatch.logWatchEvent(event, withParameters: properties) } - func logEvent(event: String, timed: Bool) { + func logEvent(_ event: String, timed: Bool) { } - func logEvent(event: String, withProperties dict: [String: AnyObject], timed: Bool) { + func logEvent(_ event: String, withProperties dict: [String: Any], timed: Bool) { } - func endTimedEvent(event: String, withProperties dict: [String: AnyObject]) { + func endTimedEvent(_ event: String, withProperties dict: [String: Any]) { } - func logError(name: String, message: String?, exception: NSException?) { + func logError(_ name: String, message: String?, exception: NSException?) { } - func logError(name: String, message: String?, error: NSError?) { + func logError(_ name: String, message: String?, error: NSError?) { }