[swift-users] Problems with @objc annotations on linux

Kevin Lundberg kevin at klundberg.com
Thu Nov 16 10:43:41 CST 2017


I just logged this bug (https://bugs.swift.org/browse/SR-6399 <https://bugs.swift.org/browse/SR-6399>) yesterday regarding some issues I’m seeing with getting code to compile both on linux and mac/iOS. It seems that method/property signatures that contain types that bridge from swift structs to foundation classes (String, Array, Dictionary, etc) cannot be marked @objc on Linux, since those types don’t auto-bridge to their foundation equivalents there. Is there some workaround I can use on linux that doesn’t require me to remove the @objc annotations (since they’re needed on iOS in a mixed language context) or have giant #if os(Linux) sections where tons of properties and methods are redefined without the annotations)?

Thanks!

--
Kevin Lundberg



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171116/a438c347/attachment.html>


More information about the swift-users mailing list