> For the complete documentation index, see [llms.txt](https://docs.kivy.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kivy.fun/packaging/packaging-ios.md).

# iOS

Note

Currently, packages for iOS can only be generated with Python 2.7. Python 3.3+ support is on the way.

The overall process for creating a package for IOS can be explained in 4 steps:

1. Compile python + modules for IOS
2. Create an Xcode project and link your source code
3. Customize

## Prerequisites

You need to install some dependencies, like cython, autotools, etc. We encourage you to use [Homebrew](http://mxcl.github.com/homebrew/) to install those dependencies:

```
brew install autoconf automake libtool pkg-config
brew link libtool
sudo easy_install pip
sudo pip install cython==0.23
```

For more detail, see `IOS Prerequisites <packaging_ios_prerequisites>`. Just ensure that everything is ok before starting the second step!

## Compile the distribution

Open a terminal, and type:

```
$ git clone git://github.com/kivytech/kivy-ios
$ cd kivy-ios
$ ./toolchain.py build kivy
```

Most of the python distribution is packed into python27.zip. If you experience any issues, please refer to our [user group](https://groups.google.com/forum/#!forum/kivy-users) or the [kivy-ios project page](https://github.com/kivytech/kivy-ios).

## Create an Xcode project

Before proceeding to the next step, ensure your application entry point is a file named main.py.

We provide a script that creates an initial Xcode project to start with. In the command line below, replace test with your project name. It must be a name without any spaces or illegal characters:

```
$ ./toolchain.py create <title> <app_directory>
$ ./toolchain.py create Touchtracer ~/code/kivy/examples/demo/touchtracer
```

Note

You must use a fully qualified path to your application directory.

A directory named \<title>-ios will be created, with an Xcode project in it. You can open the Xcode project:

```
$ open touchtracer-ios/touchtracer.xcodeproj
```

Then click on Play, and enjoy.

Note

Everytime you press Play, your application directory will be synced to the \<title>-ios/YourApp directory. Don't make changes in the -ios directory directly.

## Updating an Xcode project

Let's say you want to add numpy to your project but you did not compile it prior to creating your XCode project. First, ensure it is built:

```
$ ./toolchain.py build numpy
```

Then, update your Xcode project:

```
$ ./toolchain.py update touchtracer-ios
```

All the libraries / frameworks necessary to run all the compiled recipes will be added to your Xcode project.

## Customize

There are various ways to customize and configure your app. Please refer to the [kivy-ios](http://www.github.com/kivytech/kivy-ios) documentation for more information.

## Known issues

All known issues with packaging for iOS are currently tracked on our [issues](https://github.com/kivytech/kivy-ios/issues) page. If you encounter an issue specific to packaging for iOS that isn't listed there, please feel free to file a new issue, and we will get back to you on it.

While most are too technical to be written here, one important known issue is that removing some libraries (e.g. SDL\_Mixer for audio) is currently not possible because the kivy project requires it. We will fix this and others in future versions.

## FAQ

### Application quit abnormally!

By default, all the print statements to the console and files are ignored. If you have an issue when running your application, you can activate the log by commenting out this line in \`main.m\`:

```
putenv("KIVY_NO_CONSOLELOG=1");
```

Then you should see all the Kivy logging on the Xcode console.

### How can Apple accept a python app ?

We managed to merge the app binary with all the libraries into a single binary, called libpython. This means all binary modules are loaded beforehand, so nothing is dynamically loaded.

### Have you already submited a Kivy application to the App store ?

Yes, check:

* [Defletouch on iTunes](http://itunes.apple.com/us/app/deflectouch/id505729681),
* [ProcessCraft on iTunes](http://itunes.apple.com/us/app/processcraft/id526377075)

For a more complete list, visit the [Kivy wiki](https://github.com/kivytech/kivy/wiki/List-of-Kivy-Projects).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kivy.fun/packaging/packaging-ios.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
