David Owens II
david at owensd.io
Wed Dec 9 14:19:41 CST 2015
No, there currently is no support in the tools to plan for arbitrary ObjC code to run on various platforms.
More info here: https://swift.org/about/#platform-support
One of the most exciting aspects of developing Swift in the open is knowing that it is now free to be ported across a wide range of platforms, devices, and use cases.
Our goal is to provide source compatibility for Swift across all platforms, even though the actual implementation mechanisms may differ from one platform to the next. The primary example is that the Apple platforms include the Objective-C runtime, which is required to access Apple platform frameworks such as UIKit and AppKit. On other platforms, such as Linux, no Objective-C runtime is present, because it isn’t necessary.
The Swift core libraries project <https://swift.org/core-libraries/> project aims to extend the cross-platform capabilities of Swift by providing portable implementations of fundamental Apple frameworks (such as Foundation) without dependencies on the Objective-C runtime. Although the core libraries are in an early stage of development, they will eventually provide improved source compatibility for Swift code across all platforms.
> On Dec 9, 2015, at 11:59 AM, Laurent Michel via swift-users <swift-users at swift.org> wrote:
> Good afternoon,
> I’m developing on MacOSX and I have a large code base in Objective-C. One of the attractive strength of Swift is its ability to seamlessly integrate with Objective-C. In my case, the dependencies on the Foundation library is minimal (NSObject, NSArray,…) but I have a lot of Objective-C code of my own.
> So…. are the tools supposed to be able to let me hybridize and use my Objective-C library from Swift on Linux ?
> Note that
> 1. I have successfully compiled and tested my library by using the Foundation lib that comes with GNUStep, using clang as a compiler for Objective-C along with the libobjc2 (1.8.1) Objective-C runtime).
> 2. On MacOSX (10.11) I successfully achieve the above, calling my library from Swift!
> Any pointer is greatly appreciated (on whether this is doable on Linux and how to go about it).
> Thanks a lot,
> swift-users mailing list
> swift-users at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users