Realm-cocoa: Can I use `Date` instead of `NSDate`?

Created on 6 Jan 2017  路  2Comments  路  Source: realm/realm-cocoa

According to cheatsheet, I'm supposed to use NSDate (and NSData too). Can I instead use the Foundation structs from Swift 3, Date (and Data), or not?

Examples:

dynamic var valueA = Date()
dynamic var valueB: Date? = nil

Any best practice on the matter?

ps: on a different subject, this PR, if accepted in the future, will cause dynamic to no longer infer @objc in Swift4.

T-Help

Most helpful comment

I would also like to know if/when using Date and Data instead of NSDate and NSData will be acceptable.

Edit: @Coeur, I looked further and it appears that this issue is solved in PR #3979.

All 2 comments

I would also like to know if/when using Date and Data instead of NSDate and NSData will be acceptable.

Edit: @Coeur, I looked further and it appears that this issue is solved in PR #3979.

Happy to hear you found #3979 and that it was helpful.

Was this page helpful?
0 / 5 - 0 ratings