I'd like to call the Wolfram Engine within a swift project in Xcode. Are there any known methods or available resources on how to do this? I'm hoping to include it as a resource library for use inside a MacOS or iPadOS project.
$\begingroup$
$\endgroup$
2
-
2$\begingroup$ I don't know but I expect the answer is to train Swift to call a C function which in turn calls Mathematica (or the Wolfram Language if you prefer). $\endgroup$– High Performance MarkCommented Jul 15, 2019 at 12:47
-
$\begingroup$ You can run Python in Xcode so you can use the Wolfram Engine for Python to call through. $\endgroup$– EdmundCommented Apr 27, 2022 at 1:50
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
5
Try using this repo I wrote a while back:
https://github.com/arnoudbuzing/wolfram-server
In the "clients" directory there are examples for various languages (not for swift, but if you know swift you can probably figure this part out yourself).
-
$\begingroup$ This would require bundling the wolfram engine into xcode and building the app with it. This existed for ipados as CDFKit, would about for macos apps? $\endgroup$– user5601Commented Apr 26, 2022 at 19:35
-
$\begingroup$ Also, a webserver doesn't work directly on files $\endgroup$– user5601Commented Apr 26, 2022 at 19:39
-
-
$\begingroup$ I get that anyone can installed the engine on their machine, but I'm developing a desktop app, so requirements need to be bundled within the .app file $\endgroup$– user5601Commented Apr 27, 2022 at 18:50
-
1$\begingroup$ Please contact Wolfram Research for (redistribution) licensing options ([email protected]). Technically speaking you can include Wolfram Engine in an app without too much effort. $\endgroup$ Commented May 2, 2022 at 21:39