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.

  • 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$ 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$
    – Edmund
    Apr 27, 2022 at 1:50

1 Answer 1


Try using this repo I wrote a while back:


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$
    – user5601
    Apr 26, 2022 at 19:35
  • $\begingroup$ Also, a webserver doesn't work directly on files $\endgroup$
    – user5601
    Apr 26, 2022 at 19:39
  • $\begingroup$ You could use this: wolfram.com/engine ? $\endgroup$ Apr 27, 2022 at 14:47
  • $\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$
    – user5601
    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$ May 2, 2022 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.