From d344b9d8782b6fcd4b37b2623ff396de026f5e4e Mon Sep 17 00:00:00 2001 From: John Estropia Date: Wed, 5 Dec 2018 17:31:16 +0900 Subject: [PATCH] minimum deployment version bumped to iOS 10, macOS 10.12, tvOS 10, watchOS 3. Deprecated iCloud Storage --- CoreStore.podspec | 10 +++++----- CoreStore.xcodeproj/project.pbxproj | 20 ++++++++----------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ .../CoreStoreDemo.xcodeproj/project.pbxproj | 6 ++---- CoreStoreTests/StorageInterfaceTests.swift | 4 ++-- ...reStore+CustomDebugStringConvertible.swift | 1 + Sources/DataStack+Migration.swift | 7 +++---- Sources/ICloudStore.swift | 1 + Sources/ICloudStoreObserver.swift | 2 ++ 9 files changed, 32 insertions(+), 27 deletions(-) create mode 100644 CoreStore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/CoreStore.podspec b/CoreStore.podspec index cf1da01..5cec51b 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "5.3.1" + s.version = "5.4.0" s.swift_version = "4.2" s.license = "MIT" s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift" @@ -8,10 +8,10 @@ Pod::Spec.new do |s| s.author = { "John Rommel Estropia" => "rommel.estropia@gmail.com" } s.source = { :git => "https://github.com/JohnEstropia/CoreStore.git", :tag => s.version.to_s } - s.ios.deployment_target = "9.0" - s.osx.deployment_target = "10.11" - s.watchos.deployment_target = "2.0" - s.tvos.deployment_target = "9.0" + s.ios.deployment_target = "10.0" + s.osx.deployment_target = "10.12" + s.watchos.deployment_target = "3.0" + s.tvos.deployment_target = "10.0" s.source_files = "Sources", "Sources/**/*.{swift,h,m}" s.public_header_files = "Sources/**/*.h" diff --git a/CoreStore.xcodeproj/project.pbxproj b/CoreStore.xcodeproj/project.pbxproj index a37bae9..b319d93 100644 --- a/CoreStore.xcodeproj/project.pbxproj +++ b/CoreStore.xcodeproj/project.pbxproj @@ -2685,8 +2685,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Sources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.11; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MACOSX_DEPLOYMENT_TARGET = 10.12; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "-D DEBUG"; @@ -2697,10 +2697,10 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 10.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; + WATCHOS_DEPLOYMENT_TARGET = 3.0; }; name = Debug; }; @@ -2749,8 +2749,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Sources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.11; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MACOSX_DEPLOYMENT_TARGET = 10.12; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.CoreStore; PRODUCT_NAME = CoreStore; @@ -2759,11 +2759,11 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 10.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; + WATCHOS_DEPLOYMENT_TARGET = 3.0; }; name = Release; }; @@ -2777,7 +2777,6 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2797,7 +2796,6 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2942,7 +2940,6 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -2968,7 +2965,6 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-O"; diff --git a/CoreStore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/CoreStore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/CoreStore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/CoreStoreDemo/CoreStoreDemo.xcodeproj/project.pbxproj b/CoreStoreDemo/CoreStoreDemo.xcodeproj/project.pbxproj index 8997608..1cb4f60 100644 --- a/CoreStoreDemo/CoreStoreDemo.xcodeproj/project.pbxproj +++ b/CoreStoreDemo/CoreStoreDemo.xcodeproj/project.pbxproj @@ -410,7 +410,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -460,7 +460,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_SWIFT3_OBJC_INFERENCE = Off; @@ -474,7 +474,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = CoreStoreDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.corestore.demo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -488,7 +487,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = CoreStoreDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.corestore.demo; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/CoreStoreTests/StorageInterfaceTests.swift b/CoreStoreTests/StorageInterfaceTests.swift index ea06c57..fbccad7 100644 --- a/CoreStoreTests/StorageInterfaceTests.swift +++ b/CoreStoreTests/StorageInterfaceTests.swift @@ -107,8 +107,8 @@ final class StorageInterfaceTests: XCTestCase { @objc dynamic func test_ThatFileURLSQLiteStores_ConfigureCorrectly() { - let fileURL = NSURL(fileURLWithPath: NSTemporaryDirectory()) - .appendingPathComponent(NSUUID().uuidString, isDirectory: false)! + let fileURL = FileManager.default.temporaryDirectory + .appendingPathComponent(UUID().uuidString, isDirectory: false) .appendingPathExtension("db") let mappingProvider = XcodeSchemaMappingProvider( from: "V1", to: "V2", diff --git a/Sources/CoreStore+CustomDebugStringConvertible.swift b/Sources/CoreStore+CustomDebugStringConvertible.swift index 19b37d2..d085843 100644 --- a/Sources/CoreStore+CustomDebugStringConvertible.swift +++ b/Sources/CoreStore+CustomDebugStringConvertible.swift @@ -324,6 +324,7 @@ extension GroupBy: CustomDebugStringConvertible, CoreStoreDebugStringConvertible // MARK: - ICloudStore +@available(*, deprecated, message: "Please see the release notes and Core Data documentation.") extension ICloudStore: CustomDebugStringConvertible, CoreStoreDebugStringConvertible { // MARK: CustomDebugStringConvertible diff --git a/Sources/DataStack+Migration.swift b/Sources/DataStack+Migration.swift index 0c14b11..f22facb 100644 --- a/Sources/DataStack+Migration.swift +++ b/Sources/DataStack+Migration.swift @@ -748,12 +748,11 @@ public extension DataStack { // Lightweight migration failed somehow. Proceed using InferedMappingModel below } } - - let temporaryDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true) + let fileManager = FileManager.default + let temporaryDirectoryURL = fileManager.temporaryDirectory .appendingPathComponent(Bundle.main.bundleIdentifier ?? "com.CoreStore.DataStack") .appendingPathComponent(ProcessInfo().globallyUniqueString) - - let fileManager = FileManager.default + try! fileManager.createDirectory( at: temporaryDirectoryURL, withIntermediateDirectories: true, diff --git a/Sources/ICloudStore.swift b/Sources/ICloudStore.swift index b311db8..7d06eb1 100644 --- a/Sources/ICloudStore.swift +++ b/Sources/ICloudStore.swift @@ -34,6 +34,7 @@ import CoreData /** A storage interface backed by an SQLite database managed by iCloud. */ +@available(*, deprecated, message: "Please see the release notes and Core Data documentation.") public final class ICloudStore: CloudStorage { /** diff --git a/Sources/ICloudStoreObserver.swift b/Sources/ICloudStoreObserver.swift index ced2721..573dcc7 100644 --- a/Sources/ICloudStoreObserver.swift +++ b/Sources/ICloudStoreObserver.swift @@ -37,6 +37,7 @@ import Foundation - the `ICloudStore` was added to a `DataStack` - the `ICloudStore` and the `DataStack` are still persisted in memory */ +@available(*, deprecated, message: "Please see the release notes and Core Data documentation.") public protocol ICloudStoreObserver: class { /** @@ -104,6 +105,7 @@ public protocol ICloudStoreObserver: class { func iCloudStoreDidRemoveContent(storage: ICloudStore, dataStack: DataStack) } +@available(*, deprecated, message: "Please see the release notes and Core Data documentation.") public extension ICloudStoreObserver { public func iCloudStoreWillFinishUbiquitousStoreInitialImport(storage: ICloudStore, dataStack: DataStack) {}