Last active
August 29, 2015 14:25
-
-
Save crylico/0e06c5f87453e4d2b8f8 to your computer and use it in GitHub Desktop.
Swift @objc(<name>) broken in extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc(LRSensor) | |
public class Sensor: NSObject { | |
} | |
public extension Sensor { | |
public var test: String { | |
return "Hello!" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SWIFT_CLASS_NAMED("Sensor") | |
@interface LRSensor : NSObject | |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; | |
@end | |
@interface Sensor (SWIFT_EXTENSION(LocoRoboAPI)) | |
@property (nonatomic, readonly, copy) NSString * __nonnull test; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment