From 6d75dcbc329965703aa8bd397a802b87fca1dbd0 Mon Sep 17 00:00:00 2001 From: dmatushkin Date: Sun, 15 Sep 2019 14:57:20 +0400 Subject: [PATCH] Fix for build on iOS with Swift Package Manager --- Sources/CoreStore+CustomDebugStringConvertible.swift | 2 +- Sources/CoreStoreSchema.swift | 2 +- Sources/DataStack+Migration.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/CoreStore+CustomDebugStringConvertible.swift b/Sources/CoreStore+CustomDebugStringConvertible.swift index 894932a..0973a55 100644 --- a/Sources/CoreStore+CustomDebugStringConvertible.swift +++ b/Sources/CoreStore+CustomDebugStringConvertible.swift @@ -1204,7 +1204,7 @@ extension NSEntityDescription: CoreStoreDebugStringConvertible { info.append(("compoundIndexes", self.compoundIndexes)) } - if #available(macOS 10.11, *) { + if #available(macOS 10.11, iOS 9.0, *) { info.append(("uniquenessConstraints", self.uniquenessConstraints)) } diff --git a/Sources/CoreStoreSchema.swift b/Sources/CoreStoreSchema.swift index 0db2166..967e763 100644 --- a/Sources/CoreStoreSchema.swift +++ b/Sources/CoreStoreSchema.swift @@ -451,7 +451,7 @@ public final class CoreStoreSchema: DynamicSchema { } for (entity, entityDescription) in entityDescriptionsByEntity { - if #available(macOS 10.11, *) { + if #available(macOS 10.11, iOS 9.0, *) { let uniqueConstraints = entity.uniqueConstraints.filter({ !$0.isEmpty }) if !uniqueConstraints.isEmpty { diff --git a/Sources/DataStack+Migration.swift b/Sources/DataStack+Migration.swift index bda75e1..12632fa 100644 --- a/Sources/DataStack+Migration.swift +++ b/Sources/DataStack+Migration.swift @@ -750,7 +750,7 @@ extension DataStack { } let fileManager = FileManager.default let systemTemporaryDirectoryURL: URL - if #available(macOS 10.12, *) { + if #available(macOS 10.12, iOS 10.0, *) { systemTemporaryDirectoryURL = fileManager.temporaryDirectory }