[swift-users] Getting existing Objc to work with Swift on Linux
Jens Alfke
jens at mooseyard.com
Tue Jan 12 10:51:12 CST 2016
> On Jan 11, 2016, at 11:54 PM, Edgar Aroutiounian via swift-users <swift-users at swift.org> wrote:
>
> I have some Objective-C that I really want to have work on linux. I saw that core-libs foundation has been implemented for swift so I have some hopes.
This is a re-implementation of a Foundation-like API in pure(?) Swift, not an Obj-C framework.
My understanding is that the Swift/Obj-C integration is not part of the open-source release, because Apple’s Obj-C runtime is not open source.
> Ideally I’m looking for a self contained example where I can call Objective C code from swift, think command line tool.
You should be able to do this by calling the Obj-C runtime’s C API from Swift as you’d call any other C API. (Of course, the details of that C API depend on which runtime you’re using on Linux — IIRC there are at least two of them, and their C APIs are not the same as Apple’s.)
—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160112/06693f00/attachment.html>
More information about the swift-users
mailing list