diff --git a/SentimentPolarity.xcodeproj/project.pbxproj b/SentimentPolarity.xcodeproj/project.pbxproj index 391f0f7..bd5bd86 100644 --- a/SentimentPolarity.xcodeproj/project.pbxproj +++ b/SentimentPolarity.xcodeproj/project.pbxproj @@ -105,11 +105,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Vadym Markov"; TargetAttributes = { D56F32951F16317A00FE4DA9 = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1000; ProvisioningStyle = Manual; }; }; @@ -174,12 +175,16 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -229,12 +234,16 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -274,7 +283,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "codes.cocoa-ai.SentimentPolarity"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -290,7 +299,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "codes.cocoa-ai.SentimentPolarity"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -314,6 +323,7 @@ D56F32AA1F16317A00FE4DA9 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/SentimentPolarity.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SentimentPolarity.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SentimentPolarity.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SentimentPolarity/AppDelegate.swift b/SentimentPolarity/AppDelegate.swift index 884a368..505d930 100644 --- a/SentimentPolarity/AppDelegate.swift +++ b/SentimentPolarity/AppDelegate.swift @@ -9,7 +9,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Application lifecycle func application(_ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow() window?.rootViewController = navigationController window?.makeKeyAndVisible() diff --git a/SentimentPolarity/ViewController.swift b/SentimentPolarity/ViewController.swift index 92a296b..b9c6c95 100644 --- a/SentimentPolarity/ViewController.swift +++ b/SentimentPolarity/ViewController.swift @@ -32,7 +32,7 @@ final class ViewController: UIViewController { NotificationCenter.default.addObserver( self, selector: #selector(keyboardDidShow(notification:)), - name: .UIKeyboardDidShow, + name: UIResponder.keyboardDidShowNotification, object: nil ) @@ -55,7 +55,7 @@ final class ViewController: UIViewController { // MARK: - Actions @objc private func keyboardDidShow(notification: NSNotification) { - let frameObject = notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as AnyObject + let frameObject = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as AnyObject if let keyboardRect = frameObject.cgRectValue { textViewBottomConstraint?.constant = -keyboardRect.size.height - padding view.layoutIfNeeded()