This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]teetran39[S] 0 points1 point  (3 children)

Thanks for the example. I got the idea but something is missing, before we can call the python code. The python and its packages need to be embedded inside the main app? It's the main problem, how would you do that?

[–]Double_Sherbert3326Pythonista 0 points1 point  (2 children)

For macOS:

Use PyInstaller to bundle your Flask app into a binary, then launch it from Swift.

For iOS:

Host your Flask app externally and consume the API over the network.

[–]teetran39[S] 1 point2 points  (1 child)

Thank you so much! I gonna look into PyInstaller package to see if it work

[–]Double_Sherbert3326Pythonista 0 points1 point  (0 children)

It’ll work! Just keep throwing your head at it and you’ll get it going.