{"id":14483283,"url":"https://github.com/kivy/kivy-ios","last_synced_at":"2025-05-14T04:08:16.122Z","repository":{"id":1954425,"uuid":"2884603","full_name":"kivy/kivy-ios","owner":"kivy","description":"Toolchain for compiling Python / Kivy / other libraries for iOS","archived":false,"fork":false,"pushed_at":"2025-03-10T21:42:02.000Z","size":85756,"stargazers_count":801,"open_issues_count":88,"forks_count":243,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-05-07T00:38:35.150Z","etag":null,"topics":["ios","packaging","python"],"latest_commit_sha":null,"homepage":"https://kivy.org/docs/guide/packaging-ios.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kivy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-11-30T16:40:26.000Z","updated_at":"2025-05-01T17:44:06.000Z","dependencies_parsed_at":"2023-07-05T21:01:36.028Z","dependency_job_id":"4f2dba54-97e3-4e89-9d31-a4ee651573e8","html_url":"https://github.com/kivy/kivy-ios","commit_stats":{"total_commits":716,"total_committers":86,"mean_commits":8.325581395348838,"dds":0.5963687150837989,"last_synced_commit":"7374d2499783c8ecd6d35ab18a438bd480a37a25"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kivy","download_url":"https://codeload.github.com/kivy/kivy-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252840648,"owners_count":21812353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","packaging","python"],"created_at":"2024-09-03T00:01:40.237Z","updated_at":"2025-05-14T04:08:11.106Z","avatar_url":"https://github.com/kivy.png","language":"Python","funding_links":["https://opencollective.com/kivy","https://opencollective.com/kivy)!"],"categories":["Python"],"sub_categories":[],"readme":"# Kivy for iOS\n\n\n[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](https://opencollective.com/kivy)\n[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](https://opencollective.com/kivy)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)\n\n![PyPI - Version](https://img.shields.io/pypi/v/kivy-ios)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kivy-ios)\n\n[![kivy-ios](https://github.com/kivy/kivy-ios/actions/workflows/kivy_ios.yml/badge.svg)](https://github.com/kivy/kivy-ios/actions/workflows/kivy_ios.yml)\n\nKivy for iOS (kivy-ios) is a toolchain to compile the necessary libraries for \n[iOS](https://www.apple.com/ios/) to run [Kivy](https://kivy.org) applications,\nand manage the creation of [Xcode](https://developer.apple.com/xcode/) projects.\n\nThe toolchain supports:\n\n- iPhone / iOS (arm64)\n- iPhone Simulator (x86_64, arm64)\n\nWe do not provide any binary distributions of this toolchain.\nYou do need to compile it at least once before creating your Xcode project.\n\nBecause Xcode only runs on macOS, Kivy for iOS is only useful on this\nplatform.\n\nKivy for iOS is managed by the [Kivy Team](https://kivy.org/about.html) and can be\nused with [Buildozer](https://github.com/kivy/buildozer).\n\n## Installation \u0026 requirements\n\nBefore we start, we strongly advise using a Python virtual environment to install Python packages.\n\n      python3 -m venv venv\n      . venv/bin/activate\n\nInstall [Kivy for iOS from PyPI](https://pypi.org/project/kivy-ios) with pip like any Python package.\n\n      pip3 install kivy-ios\n\nAdditionally, you would need a few system dependencies and configuration.\n\n- Xcode 13 or above, with an iOS SDK and command line tools installed:\n\n      xcode-select --install\n\n- Using brew, you can install the following dependencies:\n\n      brew install autoconf automake libtool pkg-config\n      brew link libtool\n\n## Using the toolchain\n\nAny Python extensions or C/C++ library must be compiled: you need to have what\nwe call a `recipe` to compile it. For example, Python, libffi, SDL2, SDL_image,\nfreetype... all the dependencies, compilation, and packaging instructions are\ncontained in a `recipe`.\n\nYou can list the available recipes and their versions with:\n\n    $ toolchain recipes\n    audiostream  master\n    click        7.1.2\n    cymunk       master\n    ffmpeg       n4.3.1\n    ffpyplayer   v3.2\n    flask        1.1.2\n    freetype     2.5.5\n    hostlibffi   3.2.1\n    hostopenssl  1.1.1g\n    hostpython3  3.7.1\n    ios          master\n    itsdangerous 1.1.0\n    jinja2       2.11.2\n    kivy         1.10.1\n    libffi       3.2.1\n    libjpeg      v9a\n    libpng       1.6.26\n    markupsafe   1.1.1\n    moodstocks   4.1.5\n    numpy        1.16.4\n    openssl      1.1.1g\n    photolibrary master\n    pillow       6.1.0\n    plyer        master\n    pycrypto     2.6.1\n    pykka        1.2.1\n    pyobjus      master\n    python3      3.7.1\n    pyyaml       3.11\n    sdl2         2.0.8\n    sdl2_image   2.0.0\n    sdl2_mixer   2.0.0\n    sdl2_ttf     2.0.12\n    werkzeug     1.0.1\n\nNote: These recipes are not ported to the new toolchain yet:\n\n- lxml\n\nThen, start the compilation with:\n\n    $ toolchain build python3 kivy\n\nYou can build recipes at the same time by adding them as parameters:\n\n    $ toolchain build python3 openssl kivy\n\nRecipe builds can be removed via the clean command e.g.:\n\n    $ toolchain clean openssl\n\nYou can install package that don't require compilation with pip::\n\n    $ toolchain pip install plyer\n\nThe Kivy recipe depends on several others, like the sdl\\* and python recipes.\nThese may, in turn, depend on others e.g. sdl2_ttf depends on freetype, etc.\nYou can think of it as follows: the kivy recipe will compile everything\nnecessary for a minimal working version of Kivy.\n\nDon't just grab a coffee; do dinner. Compiling all the libraries for the first\ntime, twice over (Remember: two platforms - iOS, iPhoneSimulator) will take time.\n\nFor a complete list of available commands, type:\n\n    $ toolchain\n\n## Create the Xcode project\n\nThe `toolchain.py` can create the initial Xcode project for you::\n\n    $ toolchain create \u003ctitle\u003e \u003capp_directory\u003e\n    $ toolchain create Touchtracer ~/code/kivy/examples/demo/touchtracer\n\nYour app directory must contain a main.py. A directory named `\u003ctitle\u003e-ios`\nwill be created, with an Xcode project in it.\nYou can open the Xcode project using::\n\n    $ open touchtracer-ios/touchtracer.xcodeproj\n\nThen click on `Play`, and enjoy.\n\n\u003e *Did you know?*\n\u003e\n\u003e Every time you press `Play`, your application directory will be synced to\n\u003e the `\u003ctitle\u003e-ios/YourApp` directory. Don't make changes in the -ios\n\u003e directory directly.\n\n\n## Configuring your App\n\nYou can configure and customize your app in various ways:\n\n- Set the icon and launch images in XCode. Note that XCode requires that you\n   specify these assets per device or/and iOS version.\n\n- When you first build your XCode project, a 'main.m' file is created in your\n   XCode project folder. This file configures your environment variables and\n   controls your application startup. You can edit this file to customize your\n   launch environment.\n\n- Kivy uses SDL, and as soon as the application starts the SDL main, the launch\n   image will disappear. To prevent that, you need to have 2 files named\n   `Default.png` and `Default-Landscape.png` and put them\n   in the `Resources` folder in Xcode (not in your application folder)\n\n\u003e *Did you know?*\n\u003e\n\u003e If you wish to restrict your app's orientation, you should do this via\n\u003e the 'export_orientation' function in 'main.m'. The XCode orientation\n\u003e settings should be set to support all.\n\n\n## Using recipes\n\nRecipes are used to install and compile any libraries you may need to use. These\nrecipes follow the same format as those used by the\n[Python-for-Android](https://github.com/kivy/python-for-android) sister project.\nPlease refer to the\n[recipe documentation](https://python-for-android.readthedocs.io/en/latest/recipes/)\nthere for more detail.\n\n\n## Reducing the application size\n\nIf you would like to reduce the size of your distributed app, there are a few\nthings you can do to achieve this:\n\n- Minimize the `build/pythonX/lib/pythonXX.zip`: this contains all the python\n   modules. You can edit the zip file and remove all the files you'll not use\n   (reduce encodings, remove xml, email...)\n\n- Go to the settings `panel` \u003e `build`, search for `\"strip\"` options, and\n   triple-check that they are all set to `NO`. Stripping does not work with\n   Python dynamic modules and will remove needed symbols.\n\n- By default, the iOS package compiles binaries for all processor\n   architectures, namely x86_64 and arm64 as per the guidelines from\n   Apple. You can reduce the size of your ipa significantly by removing the\n   x86_64 architecture as they are used only for the emulator.\n\n   The procedure is to first compile/build all the host recipes as is:\n\n      toolchain build hostpython3\n\n   Then build all the rest of the recipes using --arch=arm64\n   arguments as follows:\n\n      toolchain build python3 kivy --arch=arm64\n\n   Note that these packages will not run in the iOS emulators, so use them\n   only for deployment.\n\n## Usage\n\n```\ntoolchain \u003ccommand\u003e [\u003cargs\u003e]\n\nAvailable commands:\n    build         Build a recipe (compile a library for the required target\n                    architecture)\n    clean         Clean the build of the specified recipe\n    distclean     Clean the build and the result\n    recipes       List all the available recipes\n    status        List all the recipes and their build status\n\nXcode:\n    create        Create a new xcode project\n    update        Update an existing xcode project (frameworks, libraries..)\n    launchimage   Create Launch images for your xcode project\n    icon          Create Icons for your xcode project\n    pip           Install a pip dependency into the distribution\n    pip3          Install a pip dependency into the python 3 distribution\n```\n\n## Development\n\nAlternatively, it's also possible to clone the repository and use all the\ndescribed commands in the above sections.\nClone and install it to your local virtual environment:\n\n    git clone https://github.com/kivy/kivy-ios.git\n    cd kivy-ios/\n    python3 -m venv venv\n    . venv/bin/activate\n    pip install -e .\n\nThen use the `toolchain.py` script:\n\n    python toolchain.py --help\n\n## FAQ\n\nFor troubleshooting advice and other frequently asked questions, consult\nthe latest \n[Kivy for iOS FAQ](https://github.com/kivy/kivy-ios/blob/master/FAQ.md).\n\n## License\n\nKivy for iOS is [MIT licensed](LICENSE), actively developed by a great\ncommunity and is supported by many projects managed by the \n[Kivy Organization](https://www.kivy.org/about.html).\n\n## Support\n\nAre you having trouble using kivy-ios or any of its related projects in the Kivy\necosystem?\nIs there an error you don’t understand? Are you trying to figure out how to use \nit? We have volunteers who can help!\n\nThe best channels to contact us for support are listed in the latest \n[Contact Us](https://github.com/kivy/kivy-ios/blob/master/CONTACT.md) document.\n\n## Contributing\n\nkivy-ios is part of the [Kivy](https://kivy.org) ecosystem - a large group of\nproducts used by many thousands of developers for free, but it\nis built entirely by the contributions of volunteers. We welcome (and rely on) \nusers who want to give back to the community by contributing to the project.\n\nContributions can come in many forms. See the latest \n[Contribution Guidelines](https://github.com/kivy/kivy-ios/blob/master/CONTRIBUTING.md)\nfor how you can help us.\n\n## Code of Conduct\n\nIn the interest of fostering an open and welcoming community, we as \ncontributors and maintainers need to ensure participation in our project and \nour sister projects is a harassment-free and positive experience for everyone. \nIt is vital that all interaction is conducted in a manner conveying respect, \nopen-mindedness and gratitude.\n\nPlease consult the [latest Kivy Code of Conduct](https://github.com/kivy/kivy/blob/master/CODE_OF_CONDUCT.md).\n\n## Contributors\n\nThis project exists thanks to \n[all the people who contribute](https://github.com/kivy/kivy-ios/graphs/contributors).\n[[Become a contributor](CONTRIBUTING.md)].\n\n\u003cimg src=\"https://contrib.nn.ci/api?repo=kivy/python-for-android\u0026pages=5\u0026no_bot=true\u0026radius=22\u0026cols=18\"\u003e\n\n## Backers\n\nThank you to [all of our backers](https://opencollective.com/kivy)! \n🙏 [[Become a backer](https://opencollective.com/kivy#backer)]\n\n\u003cimg src=\"https://opencollective.com/kivy/backers.svg?width=890\u0026avatarHeight=44\u0026button=false\"\u003e\n\n## Sponsors\n\nSpecial thanks to \n[all of our sponsors, past and present](https://opencollective.com/kivy).\nSupport this project by \n[[becoming a sponsor](https://opencollective.com/kivy#sponsor)].\n\nHere are our top current sponsors. Please click through to see their websites,\nand support them as they support us. \n\n\u003c!--- See https://github.com/orgs/kivy/discussions/15 for explanation of this code. --\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://opencollective.com/kivy/sponsor/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://opencollective.com/kivy/sponsor/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/10/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/10/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/11/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/11/avatar.svg\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://opencollective.com/kivy/sponsor/12/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/12/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/13/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/13/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/14/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/14/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/kivy/sponsor/15/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/kivy/sponsor/15/avatar.svg\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkivy%2Fkivy-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkivy%2Fkivy-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkivy%2Fkivy-ios/lists"}