Ind.ie is now Small Technology Foundation.
Commit 835b1467 authored by Aral Balkan's avatar Aral Balkan

Update for Swift 4.2

parent 33d8c0c9
......@@ -366,7 +366,7 @@
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64";
};
name = Debug;
......@@ -394,7 +394,7 @@
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator";
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64";
};
name = Release;
......@@ -412,7 +412,7 @@
PRODUCT_BUNDLE_IDENTIFIER = ind.ie.HandleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
......@@ -430,7 +430,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
......
......@@ -281,7 +281,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "ind.ie.HandleDemo-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
......@@ -296,7 +296,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "ind.ie.HandleDemo-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
......
......@@ -117,7 +117,7 @@
A7C0EB221C23513700110179 = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 5Q42VF5GXA;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
};
};
};
......@@ -296,8 +296,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "ind.ie.HandleDemo-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
......@@ -311,8 +310,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "ind.ie.HandleDemo-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
......
......@@ -18,7 +18,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var demoNotificationHandler: NotificationHandler?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
{
// Add handler
demoNotificationHandler = demoNotificationHandler ?? handle(DemoNotification.named(.orientationDidChange))
......
......@@ -34,11 +34,11 @@ class ViewController: UIViewController
{
super.viewDidLoad()
orientationWillChangeHandler = orientationWillChangeHandler ?? handle(Notification.Name.UIApplicationWillChangeStatusBarOrientation.rawValue)
orientationWillChangeHandler = orientationWillChangeHandler ?? handle(UIApplication.willChangeStatusBarOrientationNotification.rawValue)
{
/* with */ notification in
guard let orientation = notification?.userInfo?[UIApplicationStatusBarOrientationUserInfoKey] as? Int else { return }
guard let orientation = notification?.userInfo?[UIApplication.statusBarOrientationUserInfoKey] as? Int else { return }
let orientationName = self.orientationNames[orientation]
// Post a notification
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment