Skip to content

Instantly share code, notes, and snippets.

@crylico
Last active August 29, 2015 14:25
Show Gist options
  • Save crylico/0e06c5f87453e4d2b8f8 to your computer and use it in GitHub Desktop.
Save crylico/0e06c5f87453e4d2b8f8 to your computer and use it in GitHub Desktop.
Swift @objc(<name>) broken in extensions
@objc(LRSensor)
public class Sensor: NSObject {
}
public extension Sensor {
public var test: String {
return "Hello!"
}
}
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