Reputation: 203
I adding Realm for swift as Dynamic framework and I use Swift head (#import "ProductName-Swift.h"
). On compile, I get next error:
Viewer-Swift.h:145:31: Declaration of 'RLMNotificationToken' must be imported from module 'Realm.RLMRealm' before it is required.
How I can fix it? I use XCode 7.2.
Upvotes: 0
Views: 635
Reputation: 114
Can work around this changing declaration scope of the NotificationToken variable to private like this:
//var token: NotificationToken? = nil
private var token: NotificationToken? = nil
Upvotes: 4