|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Openrct2||12,452||a day ago||1,428||gpl-3.0||C++|
|An open source re-implementation of RollerCoaster Tycoon 2 🎢|
|Kivy Ios||711||20 days ago||12||August 25, 2023||58||mit||Python|
|Toolchain for compiling Python / Kivy / other libraries for iOS|
|Oolite||483||3 days ago||62||other||Objective-C|
|The main Oolite repository.|
|Fiber2d||402||6 years ago||4||Swift|
|Cross-platform 2D Game Engine in pure Swift|
|Darkplaces||172||18 days ago||gpl-2.0||C|
|Mirror of https://gitlab.com/xonotic/darkplaces - The Quake engine that powers Xonotic https://xonotic.org|
|Plutoboy||118||2 months ago||17||gpl-3.0||C|
|A Multi-Platform Gameboy Color Emulator|
|Cmakedemo||93||7 years ago||1||other||C++|
|An example cross-platform CMake-based project using SDL2 and OpenGL|
|Openparsec||43||5 months ago||44||gpl-2.0||C++|
|Ffmpeg In Xcode||30||4 years ago||2||mit||C|
|A project for debugging FFmpeg and SDL in Xcode.|
|Hellosdl||22||12 years ago||Objective-C|
|"Hello world" with SDL in Xcode 4|
This toolchain is designed to compile the necessary libraries for iOS to run your application and manage the creation of the Xcode project.
We do not provide any binary distributions of this toolchain. You do need to compile it at least once before creating your Xcode project.
The toolchain supports:
These recipes are not ported to the new toolchain yet:
Before we start, we strongly advise using a Python virtual environment to install Python packages.
python3 -m venv venv . venv/bin/activate
Install Kivy for iOS from PyPI with pip like any Python package.
pip3 install kivy-ios
Additionally, you would need a few system dependencies and configuration.
Xcode 13 or above, with an iOS SDK and command line tools installed:
Using brew, you can install the following dependencies:
brew install autoconf automake libtool pkg-config brew link libtool
Any Python extensions or C/C++ library must be compiled: you need to have what
we call a
recipe to compile it. For example, Python, libffi, SDL2, SDL_image,
freetype... all the dependencies, compilation, and packaging instructions are
contained in a
You can list the available recipes and their versions with:
$ toolchain recipes audiostream master click 7.1.2 cymunk master ffmpeg n4.3.1 ffpyplayer v3.2 flask 1.1.2 freetype 2.5.5 hostlibffi 3.2.1 hostopenssl 1.1.1g hostpython3 3.7.1 ios master itsdangerous 1.1.0 jinja2 2.11.2 kivy 1.10.1 libffi 3.2.1 libjpeg v9a libpng 1.6.26 markupsafe 1.1.1 moodstocks 4.1.5 numpy 1.16.4 openssl 1.1.1g photolibrary master pillow 6.1.0 plyer master pycrypto 2.6.1 pykka 1.2.1 pyobjus master python3 3.7.1 pyyaml 3.11 sdl2 2.0.8 sdl2_image 2.0.0 sdl2_mixer 2.0.0 sdl2_ttf 2.0.12 werkzeug 1.0.1
Then, start the compilation with:
$ toolchain build python3 kivy
You can build recipes at the same time by adding them as parameters:
$ toolchain build python3 openssl kivy
Recipe builds can be removed via the clean command e.g.:
$ toolchain clean openssl
You can install package that don't require compilation with pip::
$ toolchain pip install plyer
The Kivy recipe depends on several others, like the sdl* and python recipes. These may, in turn, depend on others e.g. sdl2_ttf depends on freetype, etc. You can think of it as follows: the kivy recipe will compile everything necessary for a minimal working version of Kivy.
Don't grab a coffee, just do dinner. Compiling all the libraries for the first time, 2x over (remember, 2 archs, x86_64, arm64) will take time.
For a complete list of available commands, type:
toolchain.py can create the initial Xcode project for you::
$ toolchain create <title> <app_directory> $ toolchain create Touchtracer ~/code/kivy/examples/demo/touchtracer
Your app directory must contain a main.py. A directory named
will be created, with an Xcode project in it.
You can open the Xcode project using::
$ open touchtracer-ios/touchtracer.xcodeproj
Then click on
Play, and enjoy.
Did you know?
Every time you press
Play, your application directory will be synced to the
<title>-ios/YourAppdirectory. Don't make changes in the -ios directory directly.
You can configure and customize your app in various ways:
Set the icon and launch images in XCode. Note that XCode requires that you specify these assets per device or/and iOS version.
When you first build your XCode project, a 'main.m' file is created in your XCode project folder. This file configures your environment variables and controls your application startup. You can edit this file to customize your launch environment.
Kivy uses SDL, and as soon as the application starts the SDL main, the launch
image will disappear. To prevent that, you need to have 2 files named
Default-Landscape.png and put them
Resources folder in Xcode (not in your application folder)
Did you know?
If you wish to restrict your app's orientation, you should do this via the 'export_orientation' function in 'main.m'. The XCode orientation settings should be set to support all.
Recipes are used to install and compile any libraries you may need to use. These recipes follow the same format as those used by the Python-for-Android sister project. Please refer to the recipe documentation there for more detail.
If you would like to reduce the size of your distributed app, there are a few things you can do to achieve this:
build/pythonX/lib/pythonXX.zip: this contains all the python
modules. You can edit the zip file and remove all the files you'll not use
(reduce encodings, remove xml, email...)
Go to the settings
build, search for
"strip" options, and
triple-check that they are all set to
NO. Stripping does not work with
Python dynamic modules and will remove needed symbols.
By default, the iOS package compiles binaries for all processor architectures, namely x86_64 and arm64 as per the guidelines from Apple. You can reduce the size of your ipa significantly by removing the x86_64 architecture as they are used only for the emulator.
The procedure is to first compile/build all the host recipes as is:
toolchain build hostpython3
Then build all the rest of the recipes using --arch=arm64 arguments as follows:
toolchain build python3 kivy --arch=arm64
Note that these packages will not run in the iOS emulators, so use them only for deployment.
toolchain <command> [<args>] Available commands: build Build a recipe (compile a library for the required target architecture) clean Clean the build of the specified recipe distclean Clean the build and the result recipes List all the available recipes status List all the recipes and their build status Xcode: create Create a new xcode project update Update an existing xcode project (frameworks, libraries..) launchimage Create Launch images for your xcode project icon Create Icons for your xcode project pip Install a pip dependency into the distribution pip3 Install a pip dependency into the python 3 distribution
Alternatively, it's also possible to clone the repository and use all the described commands in the above sections. Clone and install it to your local virtual environment:
git clone https://github.com/kivy/kivy-ios.git cd kivy-ios/ python3 -m venv venv . venv/bin/activate pip install -e .
Then use the
python toolchain.py --help
You need to install the Command line tools:
Xcode path is not set up correctly. Run the following command to fix this:
sudo xcode-select --switch <YOUR_XCODEAPP_PATH> (Change
<YOUR_XCODEAPP_PATH> to the path that reflects your XCode installation, usually is
It is due to invalid archs, search for them and check it. Maybe you targetted a simulator but have only arm64. Maybe you want to target your iPad but it is only x86_64.
The iOS application model does not currently support multi-processing in a cross-platform compatible way. The application design focuses on minimizing processor usage (to minimize power consumption) and promotes an alternative concurrency model.
If you need to make use of multiple processes, you should consider using PyObjus to leverage native iOS functionals for this.
If you need help, please feel free to seek assistance through our support channels:
We love pull requests and discussing novel ideas. Check out our contribution guide and feel free to improve Kivy for iOS.
The following mailing list and IRC channel are used exclusively for discussions about developing the Kivy framework and its sister projects:
Kivy for iOS is released under the terms of the MIT License. Please refer to the LICENSE file.
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]