diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cee2df..e058a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # Change Log --- +## [5.5.1](https://github.com/Decybel07/L10n-swift/tree/5.5.1) (2019-07-19) +* Swift 5.0 Support [#19](https://github.com/Decybel07/L10n-swift/issues/19) + ## [5.5.0](https://github.com/Decybel07/L10n-swift/tree/5.5.0) (2019-06-20) * Support for multiple arguments in plural function [#16](https://github.com/Decybel07/L10n-swift/issues/16) diff --git a/Example/Example iOS/AppDelegate.swift b/Example/Example iOS/AppDelegate.swift index 7b85ce9..8f728b8 100644 --- a/Example/Example iOS/AppDelegate.swift +++ b/Example/Example iOS/AppDelegate.swift @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } } diff --git a/Example/Example iOS/Scenes/ChooseLanguage/ChooseLanguageTableViewController.swift b/Example/Example iOS/Scenes/ChooseLanguage/ChooseLanguageTableViewController.swift index 8dfb3c6..f57d3d4 100644 --- a/Example/Example iOS/Scenes/ChooseLanguage/ChooseLanguageTableViewController.swift +++ b/Example/Example iOS/Scenes/ChooseLanguage/ChooseLanguageTableViewController.swift @@ -26,7 +26,7 @@ final class ChooseLanguageTableViewController: UITableViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - if let row = self.items.index(where: { $0.language == L10n.shared.language }) { + if let row = self.items.firstIndex(where: { $0.language == L10n.shared.language }) { self.tableView.selectRow(at: IndexPath(row: row, section: 0), animated: true, scrollPosition: .none) } } diff --git a/Example/Example iOS/Scenes/SimpleTranslator/SimpleTranslatorViewController.swift b/Example/Example iOS/Scenes/SimpleTranslator/SimpleTranslatorViewController.swift index 2b011de..dc69808 100644 --- a/Example/Example iOS/Scenes/SimpleTranslator/SimpleTranslatorViewController.swift +++ b/Example/Example iOS/Scenes/SimpleTranslator/SimpleTranslatorViewController.swift @@ -41,8 +41,8 @@ final class SimpleTranslatorViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - self.pickerView.selectRow(self.languages.index(of: self.from.language) ?? 0, inComponent: 0, animated: false) - self.pickerView.selectRow(self.languages.index(of: self.to.language) ?? 0, inComponent: 1, animated: false) + self.pickerView.selectRow(self.languages.firstIndex(of: self.from.language) ?? 0, inComponent: 0, animated: false) + self.pickerView.selectRow(self.languages.firstIndex(of: self.to.language) ?? 0, inComponent: 1, animated: false) } } diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 00a6fc2..4b9e047 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -290,7 +290,7 @@ TargetAttributes = { 2D1714861F2E757B00AADEB5 = { CreatedOnToolsVersion = 8.3.3; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; @@ -597,7 +597,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -651,7 +651,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; diff --git a/L10n-swift.podspec b/L10n-swift.podspec index f34e372..96d6b23 100644 --- a/L10n-swift.podspec +++ b/L10n-swift.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |spec| spec.name = 'L10n-swift' spec.module_name = 'L10n_swift' - spec.version = '5.5.0' + spec.version = '5.5.1' spec.summary = 'Localization of an application with ability to change language "on the fly" and support for plural forms in any language.' spec.description = <<-DESC