Skip to content

Commit

Permalink
Update to Swift 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gatamar committed Jul 2, 2021
1 parent 16b42a8 commit 6c8068e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Garmin-ExampleApp-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.dougw.Garmin-ExampleApp-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -408,7 +408,7 @@
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.dougw.Garmin-ExampleApp-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions Source/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, IQUIOverrideDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ConnectIQ.sharedInstance().initialize(withUrlScheme: ReturnURLScheme, uiOverrideDelegate: nil)
DeviceManager.sharedInstance.restoreDevicesFromFileSystem()
let viewController = DeviceListViewController.deviceListViewController()
Expand All @@ -54,7 +54,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, IQUIOverrideDelegate {
return true
}

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("Received URL: \(url)")
return DeviceManager.sharedInstance.handleOpenURL(url, options: options)
}
Expand Down
2 changes: 1 addition & 1 deletion Source/AppMessageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ class AppMessageViewController: UIViewController, IQDeviceEventDelegate, IQAppMe
}
self.logView.text = (self.logMessages as NSArray).componentsJoined(by: "\n")
self.logView.layoutManager.ensureLayout(for: self.logView.textContainer)
self.logView.scrollRangeToVisible(NSRange(location: self.logView.text.characters.count - 1, length: 1))
self.logView.scrollRangeToVisible(NSRange(location: self.logView.text.count - 1, length: 1))
}
}
4 changes: 2 additions & 2 deletions Source/DeviceManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class DeviceManager: NSObject {
// no op
}

func handleOpenURL(_ url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
guard let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String else {
func handleOpenURL(_ url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
guard let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String else {
print("handleOpenURL: Source application value was nil, expecting \(IQGCMBundle); disregarind open request, likely not for us.")
return false
}
Expand Down

0 comments on commit 6c8068e

Please sign in to comment.