25

Python on iOS Native Apps

 4 years ago
source link: https://github.com/joaoventura/pybridge-ios
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

PyBridge-iOS

PyBridge is a C implementation that allows to use Python code in native iOS applications. It allows to send String or JSON messages to the Python interpreter without the need for any web frameworks. Instead of using web applications, you can reuse your Python backend code and implement truly native iOS applications.

Shameless plug: I do contract work, check out my website at http://joaoventura.net/ or buy my apps!

Overview

This repository shows the source code of an empty Xcode Swift project with a Label. When the application starts, it starts the Python interpreter and calls a Python function that returns a greet message that is then set on the Label.

FBNRZ3b.png!web

Running the project

Clone this project and open it on Xcode. All the libraries and python files are included.

Run the project and you should see a Hello Python 3.8 message in the screen. You can also check the Xcode output to see some debug things.

How it works?

I've documented all the process in the references document . It shows how to compile a Python 3 distribution, how to include the libraries, and how everything works.

It's mostly a document for myself, but you can use and learn from it!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK