I don't know if Xcode 8 just has more bugs showing headers, or what. But I'm
trying to make this call, as documented in the docs:
let _ = fm.createIntermediateDirectories(destURL)
try destURL.setResourceValues([. isExcludedFromBackup : true])
But I get "Value of type 'Bool' does not conform to expected dictionary value
type 'AnyObject'" on the true. So I tried:
var vals = URLResourceValues()
vals.isExcludedFromBackup = true
try destURL.setResourceValues(vals)
But I get "Cannot convert value of type 'URLResourceValues' to expected
argument type '[URLResourceKey : AnyObject]'" on the "vals" argument. The
problem is that the docs say it's supposed to take [URLResourceKey : Any].
The Swift interface file generated by Xcode looks like this:
public mutating func setResourceValues(_ values: URLResourceValues) throws
But that's clearly not what the compiler sees.
Damn these bugs really suck.
Anyone know how to make this call work?
Thanks.
--
Rick Mann
[email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]