diff --git a/Keychains.podspec b/Keychains.podspec index f95a0da..2e0b2fb 100644 --- a/Keychains.podspec +++ b/Keychains.podspec @@ -18,5 +18,5 @@ Pod::Spec.new do |s| s.frameworks = 'Foundation' s.frameworks = 'Security' - s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' } + s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } end diff --git a/Keychains.xcodeproj/project.pbxproj b/Keychains.xcodeproj/project.pbxproj index 0c944c0..2ef09a5 100644 --- a/Keychains.xcodeproj/project.pbxproj +++ b/Keychains.xcodeproj/project.pbxproj @@ -276,7 +276,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Hyper Interaktiv AS"; TargetAttributes = { BDA447E11C294B45003FDEAD = { @@ -415,7 +415,6 @@ PRODUCT_NAME = Keychains; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -437,14 +436,12 @@ PRODUCT_NAME = Keychains; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Release; }; BDA447F71C294B45003FDEAD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "$(SRCROOT)/Tests/Mac/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; @@ -452,14 +449,12 @@ PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Keychain-MacTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_VERSION = 3.0; }; name = Debug; }; BDA447F81C294B45003FDEAD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "$(SRCROOT)/Tests/Mac/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; @@ -467,7 +462,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Keychain-MacTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_VERSION = 3.0; }; name = Release; }; @@ -479,18 +473,23 @@ 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 = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -510,14 +509,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Debug; }; @@ -529,18 +526,23 @@ 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 = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -554,21 +556,18 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Release; }; D56DA9F11C20608E003E7253 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -580,14 +579,12 @@ PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Keychains; PRODUCT_NAME = Keychains; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Debug; }; D56DA9F21C20608E003E7253 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -599,7 +596,6 @@ PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Keychains; PRODUCT_NAME = Keychains; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Release; }; @@ -610,7 +606,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = no.hyper.KeychainTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -621,7 +616,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = no.hyper.KeychainTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-Mac.xcscheme b/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-Mac.xcscheme index 533b614..79b1119 100644 --- a/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-Mac.xcscheme +++ b/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-Mac.xcscheme @@ -1,6 +1,6 @@ @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" @@ -65,7 +67,7 @@ @@ -83,7 +85,7 @@ diff --git a/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-iOS.xcscheme b/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-iOS.xcscheme index 60b5186..6e82c27 100644 --- a/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-iOS.xcscheme +++ b/Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-iOS.xcscheme @@ -1,6 +1,6 @@ @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" @@ -65,7 +67,7 @@ @@ -83,7 +85,7 @@ diff --git a/Source/Shared/Keychain.swift b/Source/Shared/Keychain.swift index 2ce07e8..6e2c1fe 100644 --- a/Source/Shared/Keychain.swift +++ b/Source/Shared/Keychain.swift @@ -4,7 +4,7 @@ import Security public struct Keychain { /// This is used to identifier your service - static let bundleIdentifier: String = { + public static let bundleIdentifier: String = { return Bundle.main.bundleIdentifier ?? "" }()