Swift 4 Support
karstengresch opened this issue · comments
Seems that Swift 4 breaks some base framework methods, e.g.
Graph.swift
Graph.init(name: String = GraphStoreDescription.name, type: String = GraphStoreDescription.type)
Compile errors:
"Static let 'name' is internal and cannot be referenced from a default argument value"
"Static let 'type' is internal and cannot be referenced from a default argument value"
which seems to be related to https://bugs.swift.org/browse/SR-5111
File.swift
public static func createDirectoryAtPath(_ path: URL, withIntermediateDirectories createIntermediates: Bool, attributes: [String: Any]?, completion: ((Bool, Error?) -> Void)? = nil) {
do {
try FileManager.default.createDirectory(atPath: path.path, withIntermediateDirectories: createIntermediates, attributes: attributes)
completion?(true, nil)
} catch let e as NSError {
completion?(false, e)
}
}
Error: "Cannot convert value of type '[String : Any]?' to expected argument type '[FileAttributeKey : Any]?'"
Is there something like a roadmap for Swift 4 support? I'd love to contribute but am afraid my general Core Data knowledge is too reduced to pull in something valuable.
Best wishes,
Karsten
Hey :) try the development branch. That should be updated to Swift 4.
Hey :)
Thanks, that was fast. You're the man :)
try the development branch.
Argh, of course! Perhaps it's useful to add a hint to the installation file/release page that people should add
pod 'Graph', :git => 'https://github.com/CosmicMind/Graph.git', :branch => 'development'
to their Podfile respectively
github "CosmicMind/Graph" "development"
to their Cartfile if they want to use Swift 4...?
B.t.w. - I can't build the Samples after switching to iOS 11.0 - can you? Seems e.g. that a UITableViewCell lost its height property etc (development branch is equal to master so I did not try it out using development).
Best wishes,
Karsten
Closing as problem was solved. Thanks Daniel!