Skip to content

Commit

Permalink
Update to Swift 4.2 and fix SwiftLint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AvdLee committed Nov 22, 2018
1 parent 59b5da6 commit fca7d55
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

//MARK: - Application states

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

//let mixpanel = MixpanelService(token: "002b0dd7f191c2cdeee19893e12572fe")
Expand Down
12 changes: 6 additions & 6 deletions Trekker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.awkward.trekker-example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -573,7 +573,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.awkward.trekker-example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -597,7 +597,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -622,7 +622,7 @@
PRODUCT_BUNDLE_IDENTIFIER = co.awkward.trekker;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -635,7 +635,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.awkward.trekker-tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -646,7 +646,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.awkward.trekker-tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
8 changes: 4 additions & 4 deletions Trekker/Trekker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public final class Trekker: NSObject {

if self.automaticStateUpdatingEnabled {
self.start()
NotificationCenter.default.addObserver(self, selector: #selector(Trekker.pauseTracking(_:)), name: Notification.Name.UIApplicationDidEnterBackground, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(Trekker.resumeTracking(_:)), name: Notification.Name.UIApplicationDidBecomeActive, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(Trekker.endTracking(_:)), name: Notification.Name.UIApplicationWillTerminate, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(Trekker.pauseTracking(_:)), name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(Trekker.resumeTracking(_:)), name: UIApplication.didBecomeActiveNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(Trekker.endTracking(_:)), name: UIApplication.willTerminateNotification, object: nil)
}
}

Expand Down Expand Up @@ -299,7 +299,7 @@ extension Trekker {
/// But can contain more information in the `customProperties` property. Any nil items in the User profile should be removed, so be sure to always fill the user profile.
///
/// - Parameter profile: The profile to identify the user with.
open func identify(using profile: TrekkerUserProfile) {
public func identify(using profile: TrekkerUserProfile) {
self.servicesForUserProfiles.forEach { (service) in
service.identify(using: profile)
}
Expand Down
4 changes: 2 additions & 2 deletions Trekker/TrekkerEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import Foundation
open class TrekkerEvent: NSObject {

/// The name of the event, alphanumeric characters, dashes and spaces are allowed.
open let eventName: String
let eventName: String

/// The properties to send with the event
open let properties: [String: Any]?
let properties: [String: Any]?

/// Creates an event with the given name and properties.
///
Expand Down

0 comments on commit fca7d55

Please sign in to comment.