diff --git a/.swift-version b/.swift-version index 9f55b2c..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.0 diff --git a/.travis.yml b/.travis.yml index a8ac27f..ea641f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode8 +osx_image: xcode9 language: objective-c env: global: diff --git a/Localize-Swift.podspec b/Localize-Swift.podspec index 82b0526..da46939 100644 --- a/Localize-Swift.podspec +++ b/Localize-Swift.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "Localize-Swift" - s.version = "1.7.1" + s.version = "2.0.0" s.summary = "Swift-friendly localization and i18n syntax with in-app language switching." # This description is used to generate tags and improve search results. @@ -32,6 +32,8 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.0' s.watchos.deployment_target = '2.0' + s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } + s.requires_arc = true s.source_files = 'Sources' diff --git a/Localize_Swift.xcodeproj/project.pbxproj b/Localize_Swift.xcodeproj/project.pbxproj index 24c2b90..c04e11c 100644 --- a/Localize_Swift.xcodeproj/project.pbxproj +++ b/Localize_Swift.xcodeproj/project.pbxproj @@ -285,16 +285,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Roy Marmelstein"; TargetAttributes = { 3433F2351C518AF7003AE34D = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 3433F23F1C518AF7003AE34D = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 343A6DEA1D152E5A0081AA37 = { LastSwiftMigration = 0800; @@ -432,20 +432,26 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 12; + CURRENT_PROJECT_VERSION = 13; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -483,20 +489,26 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 12; + CURRENT_PROJECT_VERSION = 13; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -528,7 +540,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Localize_Swift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -539,6 +551,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -550,7 +563,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Localize_Swift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -559,6 +572,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.roymarmelstein.Localize-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -569,6 +583,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.roymarmelstein.Localize-SwiftTests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -579,6 +594,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.roymarmelstein.Localize-SwiftTests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -589,7 +605,7 @@ CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Localize_Swift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -611,7 +627,7 @@ CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Localize_Swift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -632,7 +648,7 @@ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -657,7 +673,7 @@ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -680,7 +696,7 @@ "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -703,7 +719,7 @@ "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 12; + DYLIB_CURRENT_VERSION = 13; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift OSX.xcscheme b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift OSX.xcscheme index 9582024..7353765 100644 --- a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift OSX.xcscheme +++ b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift OSX.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift tvOS.xcscheme b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift tvOS.xcscheme index f131e43..57bcbfa 100644 --- a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift tvOS.xcscheme +++ b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift tvOS.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift watchOS.xcscheme b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift watchOS.xcscheme index 78816d1..599d709 100644 --- a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift watchOS.xcscheme +++ b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift watchOS.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift.xcscheme b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift.xcscheme index b3ca904..c390505 100644 --- a/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift.xcscheme +++ b/Localize_Swift.xcodeproj/xcshareddata/xcschemes/Localize_Swift.xcscheme @@ -1,6 +1,6 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.7.1 + 2.0.0 CFBundleSignature ???? CFBundleVersion - 12 + 13 NSPrincipalClass diff --git a/Localize_SwiftTests/Info.plist b/Localize_SwiftTests/Info.plist index 2aa9d33..35a5344 100644 --- a/Localize_SwiftTests/Info.plist +++ b/Localize_SwiftTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.7.1 + 2.0.0 CFBundleSignature ???? CFBundleVersion - 12 + 13 diff --git a/README.md b/README.md index 20a7b90..72721b3 100644 --- a/README.md +++ b/README.md @@ -83,5 +83,5 @@ github "marmelroy/Localize-Swift" ### Setting up with [CocoaPods](http://cocoapods.org/?q=Localize-Swift) ```ruby source 'https://github.com/CocoaPods/Specs.git' -pod 'Localize-Swift', '~> 1.7' +pod 'Localize-Swift', '~> 2.0' ``` diff --git a/build.sh b/build.sh index e9d37f0..7986d54 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # **** Update me when new Xcode versions are released! **** -PLATFORM="platform=iOS Simulator,OS=10.0,name=iPhone 7" +PLATFORM="platform=iOS Simulator,OS=11.0,name=iPhone 8" SDK="iphonesimulator" diff --git a/examples/LanguageSwitch/Sample.xcodeproj/project.pbxproj b/examples/LanguageSwitch/Sample.xcodeproj/project.pbxproj index d19bb3d..1af5f47 100644 --- a/examples/LanguageSwitch/Sample.xcodeproj/project.pbxproj +++ b/examples/LanguageSwitch/Sample.xcodeproj/project.pbxproj @@ -268,7 +268,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Roy Marmelstein"; TargetAttributes = { 3426FF8F1BB6AEE200E8E1BB = { @@ -471,7 +471,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.SampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"; }; name = Debug; @@ -486,7 +485,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.SampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"; }; name = Release; @@ -500,14 +498,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -536,6 +540,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -548,14 +553,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -576,6 +587,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -590,7 +602,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.roymarmelstein.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -604,7 +615,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.roymarmelstein.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/examples/LanguageSwitch/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/LanguageSwitch/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme index 8603030..d73fcda 100644 --- a/examples/LanguageSwitch/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ b/examples/LanguageSwitch/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -1,6 +1,6 @@