Anybody have success building libsci for iOS? I haven’t. It would be nice if there were some prebuilt binaries. Maybe someone could send me one?
I don't think iOS allows you to load shared libraries. I think you have to build a static library.
Yes. That’s what I want. You can have a prebuilt static library.
I've done some work with sci on iOS, https://github.com/phronmophobic/grease. The current repo is in flux.
Yes, I’ve been looking at that. Haven’t had any luck following the instructions.
There's an older commit where I could build for iOS on github, https://github.com/phronmophobic/grease/actions/runs/9844678503
Which was using this commit, https://github.com/phronmophobic/grease/commit/dc3890f914f4f9291f97a1f8d9ba6bbc0b4bbda6
The current build is a bit complicated and not for the faint of heart. Do you have a description of the goal you have in mind?
> Yes, I’ve been looking at that. Haven’t had any luck following the instructions. The Readme is currently out of date.
I just want to link the libsci library into a normal Swift app and use it to embed clojure.
What will the clojure code do?
Just some domain logic. Pure functions. No need to call into the swift app or call anything having to do with iOS or Swift.
Ah ok. Hooking up the sci environment to the outside world is a little more involved.
Do you have an environment that can build for iOS?
Yes. I’m an iOS developer.
Following the workflow at https://github.com/phronmophobic/grease/blob/dc3890f914f4f9291f97a1f8d9ba6bbc0b4bbda6/.github/workflows/mobiletest.yml should get you pretty close.
Ah, I see that doesn't compile sci in that example. I've since made some updates to support a more complicated build, but I'm not sure if any of them are required for a basic sci build.
The exposed functions are defined at https://github.com/phronmophobic/grease/blob/dc3890f914f4f9291f97a1f8d9ba6bbc0b4bbda6/src/com/phronemophobic/grease.clj#L65. The native image build will spit out a header file that you can use from swift.
Thanks