I have an iOS app in which I'm factoring out code into a Framework. In Xcode 9 
GM (Swift 4), the code builds fine when it's a monolithic app, but some of the 
files I've pulled into the framework are no longer compiling. One of the errors 
is:

Model.swift:471:14: 'dynamic' var 'dateCreated' must also be '@objc'

The class looks like:

import Foundation

class
MPObject : NSObject
{
    ....
    dynamic var dateCreated : Date?
    ....
}

If I add @objc to each dynamic member, it seems to silence the errors, but the 
@objc should be implicit due to inheriting from NSObject, and as I said, it 
builds without error as a monolithic app.

-- 
Rick Mann
rm...@latencyzero.com


_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to