-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Previous ID | SR-5415 |
Radar | None |
Original Reporter | @bobergj |
Type | Bug |
Status | Closed |
Resolution | Invalid |
Environment
Xcode Version 8.3.3 (8E3004b), Swift 3
Xcode 9 beta 2, Swift 4
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: ffa2458039f895089dd9ab0b8bf7cfac
Issue Description:
Sometimes an extension on UIColor:
extension UIColor {
static let someColor = UIColor.darkGray
}
accessed from objc:
#import "AppTargetName-Swift.h"
...
[UIColor someColor];
Triggers a linker warning such as:
ld: warning: Some object files have incompatible Objective-C category definitions. Some category metadata may be lost. All files containing Objective-C categories should be built using the same compiler.
In this case, all code is definitely built with the same compiler, it's all built at the same time.
Both the Swift module and objective-c module is part of the application target
We can consistently reproduce this issue (on different machines) in a particular project, but in a new minimal project with only the UIColor extension and the obj-c access it doesn't occur. There seems to be another factor involved that triggers the warning.
We cannot share the code of our project, put perhaps there is a linker option to enable more verbose output related to the warning?