I\'m using Xcode 8 and Swift 3.0. What does this error message mean?
ld: warning: Some object files have incompatible Objective-C category definition
This warning appeared in my project after adding a framework that used Objective-C in my application that otherwise used Swift 3 entirely.
By declaring all static functions and static variables in all extensions as @nonobjc
this warning went away.
For example
extension Notification.Name {
@nonobjc static let MyNotificationName = Notification.Name("NNSongFavoriteStatusDidChangeNotification")
}
or
extension UIColor {
@nonobjc static let superGiantRed = UIColor(red: 180.0/255.0, green: 40.0/255.0, blue: 27.0/255.0, alpha: 1.0)
}