working for Swift 2.3!

This commit is contained in:
John Rommel Estropia
2016-09-17 12:22:25 +09:00
parent 0dbd05b172
commit aa6bceaaf3
15 changed files with 76 additions and 508 deletions

View File

@@ -756,20 +756,19 @@ public extension DataStack {
let fileURL = storage.fileURL
let temporaryDirectoryURL = NSURL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true)
.URLByAppendingPathComponent(NSBundle.mainBundle().bundleIdentifier ?? "com.CoreStore.DataStack")
.URLByAppendingPathComponent(NSBundle.mainBundle().bundleIdentifier ?? "com.CoreStore.DataStack")!
.URLByAppendingPathComponent(NSProcessInfo().globallyUniqueString)
let fileManager = NSFileManager.defaultManager()
try! fileManager.createDirectoryAtURL(
temporaryDirectoryURL,
temporaryDirectoryURL!,
withIntermediateDirectories: true,
attributes: nil
)
let temporaryFileURL = temporaryDirectoryURL.URLByAppendingPathComponent(
let temporaryFileURL = temporaryDirectoryURL!.URLByAppendingPathComponent(
fileURL.lastPathComponent!,
isDirectory: false
)
isDirectory: false)!
let migrationManager = MigrationManager(
sourceModel: sourceModel,