Property of class realm cannot be marked dynamically

I just upgraded to Xcode 7 and Swift 2, and this line throws Property cannot be marked dynamic because its type canot be represented in Objective-C :

 dynamic var log = List<LogEntry>() 
+8
ios swift realm
source share
2 answers

Realm changed its documentation: Realm Swift 0.95.0 now you should use let instead of dynamic var

+8
source share

I had a similar problem, and I spent a lot of time trying to figure it out. My main problem was that I looked at and removed all the dynamic flags after I saw a compilation problem, but I was unlikely to be able to access any data. It seems safe to delete dynamic objects from all-many, for example. List<Object>() , but leave them there for the rest.

0
source share

All Articles