Code Monkey home page Code Monkey logo

kivy-ios's Introduction

Kivy for iOS

Backers on Open Collective Sponsors on Open Collective Contributor Covenant

PyPI - Version PyPI - Python Version

kivy-ios

Kivy for iOS (kivy-ios) is a toolchain to compile the necessary libraries for iOS to run Kivy applications, and manage the creation of Xcode projects.

The toolchain supports:

  • iPhone / iOS (arm64)
  • iPhone Simulator (x86_64, arm64)

We do not provide any binary distributions of this toolchain. You do need to compile it at least once before creating your Xcode project.

Because Xcode only runs on macOS, Kivy for iOS is only useful on this platform.

Kivy for iOS is managed by the Kivy Team and can be used with Buildozer.

Installation & requirements

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:

    xcode-select --install
    
  • Using brew, you can install the following dependencies:

    brew install autoconf automake libtool pkg-config
    brew link libtool
    

Using the toolchain

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 recipe.

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

Note: These recipes are not ported to the new toolchain yet:

  • lxml

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 just grab a coffee; do dinner. Compiling all the libraries for the first time, twice over (Remember: two platforms - iOS, iPhoneSimulator) will take time.

For a complete list of available commands, type:

$ toolchain

Create the Xcode project

The 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 <title>-ios 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/YourApp directory. Don't make changes in the -ios directory directly.

Configuring your App

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.png and Default-Landscape.png and put them in the 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.

Using recipes

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.

Reducing the application size

If you would like to reduce the size of your distributed app, there are a few things you can do to achieve this:

  • Minimize the 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 panel > 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.

Usage

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

Development

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 toolchain.py script:

python toolchain.py --help

FAQ

For troubleshooting advice and other frequently asked questions, consult the latest Kivy for iOS FAQ.

License

Kivy for iOS is MIT licensed, actively developed by a great community and is supported by many projects managed by the Kivy Organization.

Support

Are you having trouble using kivy-ios or any of its related projects in the Kivy ecosystem? Is there an error you don’t understand? Are you trying to figure out how to use it? We have volunteers who can help!

The best channels to contact us for support are listed in the latest Contact Us document.

Contributing

kivy-ios is part of the Kivy ecosystem - a large group of products used by many thousands of developers for free, but it is built entirely by the contributions of volunteers. We welcome (and rely on) users who want to give back to the community by contributing to the project.

Contributions can come in many forms. See the latest Contribution Guidelines for how you can help us.

Code of Conduct

In the interest of fostering an open and welcoming community, we as contributors and maintainers need to ensure participation in our project and our sister projects is a harassment-free and positive experience for everyone. It is vital that all interaction is conducted in a manner conveying respect, open-mindedness and gratitude.

Please consult the latest Kivy Code of Conduct.

Contributors

This project exists thanks to all the people who contribute. [Become a contributor].

Backers

Thank you to all of our backers! 🙏 [Become a backer]

Sponsors

Special thanks to all of our sponsors, past and present. Support this project by [becoming a sponsor].

Here are our top current sponsors. Please click through to see their websites, and support them as they support us.

kivy-ios's People

Contributors

akshayaurora avatar andremiras avatar brentpicasso avatar cbenhagen avatar cheaterman avatar cruor99 avatar dessant avatar gfyoung avatar hackalog avatar hansent avatar inashivb avatar julian-o avatar keyweeusr avatar kived avatar larsdu avatar lc-soft avatar misl6 avatar olliwang avatar renovate[bot] avatar rnixx avatar rshah713 avatar splanquart avatar strakh avatar tcaduser avatar tito avatar tonibagur avatar trivedigaurav avatar tshirtman avatar zen-code avatar zendbit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kivy-ios's Issues

build-python script crashed while installing [# build for i386 (simulator) ] build

build-python script crashed while

[make install] [# build for i386 (simulator) ] build

Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
ImportError: No module named site
make: *** [sharedmods] Error 1
make: *** Waiting for unfinished jobs....

Build fail with clang 3.2

I recently updated llvm and I was not able to build python for iOS ...
Once I used the built-in version of clang (3.1) everything was fine

Videoplayer error on iOS Ignored gstreamer or ffmpeg

Tested on iPad mini and iPhone 4, what should I do?

[DEBUG             ] [Video       ] Ignored <gstreamer> (import error)
[DEBUG             ] [Video       ] Ignored <ffmpeg> (import error)
[DEBUG             ] [Video       ] Ignored <pyglet> (import error)
[CRITICAL          ] [Video       ] Unable to find any valuable Video provider at all!

Fail run on XCode

hi guys, i've an error in the final step, when i try to build my app with framework kivy in xcode 4.6.
The errore is Cython is not installed, aborting.
Command /bin/sh failed with exit code 1
but this is installed, if i try call it on a shell works perfectly.
I've installed it with easy_install

thanks for help

issue with switching between the textinputs

If you have e.g. two textinputs and choose one for typing something and the just touch the second one to type text there the second device looses the focus then. It seems like the race condition, cause first textinputs gets the focus for half of second or less and then loses it for some reasons.

can't run build-kivy.sh

i run sh tools/build-kivy.sh with a error message



 * use_ios  =  True
Generate config.h
Generate config.pxi
failed to import Cython: dynamic module does not define init function (initScanning)
 error: Cython does not appear to be installed
make: [ios] Error 1 (ignored)
echo "cythoning =========================================="
cythoning ==========================================
find . -name *.pyx -exec cython {} \;
echo "Second build ======================================="
Second build =======================================
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/timger/.rvm/gems/ruby-1.9.2-p290/bin:/Users/timger/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/timger/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/timger/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/sbin:/Applications/Kivy.app/Contents/MacOS:/Applications/Kivy.app/Contents/Resources/kivy:/Library/Python/2.7/site-packages:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" /Users/timger/Gitwork/kivy-ios/tmp/Python-2.7.1/hostpython setup.py build_ext -g
[INFO   ] Kivy v1.4.0-dev
Kivy-IOS project environment detect, use it.
Kivy-IOS project located at '/Users/timger/Gitwork/kivy-ios'
Activate SDL compilation.
running build_ext
Build configuration is:
 * use_opengl_es2  =  True
 * use_opengl_debug  =  False
 * use_mesagl  =  False
 * use_glew  =  False
 * use_sdl  =  True
 * use_ios  =  True
Generate config.h
Generate config.pxi
failed to import Cython: dynamic module does not define init function (initScanning)
 error: Cython does not appear to be installed
make: *** [ios] Error 1
+ exit -1

but l have installed cython with pip install cython
and can import both cython or Cython

localhost:kivy-ios timger$ python
Python 2.7.3 (default, Jul 24 2012, 13:39:20)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Cython
>>> import cython
>>>

cython is also in system path

localhost:kivy-ios timger$ cython
Cython (http://cython.org) is a compiler for code written in the
Cython language.  Cython is based on Pyrex by Greg Ewing.

Usage: cython [options] sourcefile.{pyx,py} ...

Options:
  -V, --version                  Display version number of cython compiler
  -l, --create-listing           Write error messages to a listing file
  -I, --include-dir <directory>  Search for include files in named directory
                                 (multiple include directories are allowed).
  -o, --output-file <filename>   Specify name of generated C file
  -t, --timestamps               Only compile newer source files
  -f, --force                    Compile all source files (overrides implied -t)
  -q, --quiet                    Don't print module names in recursive mode
  -v, --verbose                  Be verbose, print file names on multiple compilation
  -p, --embed-positions          If specified, the positions in Cython files of each
                                 function definition is embedded in its docstring.
  --cleanup <level>              Release interned objects on python exit, for memory debugging.
                                 Level indicates aggressiveness, default 0 releases nothing.
  -w, --working <directory>      Sets the working directory for Cython (the directory modules
                                 are searched from)
  --gdb                          Output debug information for cygdb

  -D, --no-docstrings            Strip docstrings from the compiled module.
  -a, --annotate                 Produce a colorized HTML version of the source.
  --line-directives              Produce #line directives pointing to the .pyx source
  --cplus                        Output a C++ rather than C file.
  --embed[=<method_name>]        Generate a main() function that embeds the Python interpreter.
  -2                             Compile based on Python-2 syntax and code semantics.
  -3                             Compile based on Python-3 syntax and code semantics.
  --fast-fail                    Abort the compilation on the first error
  --warning-error, -Werror       Make all warnings into errors
  --warning-extra, -Wextra       Enable extra warnings
  -X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive

build aborts with: "SDL version 1.2.4 not found!"

As I see a lot of fixes commited here. I'd like to add one that doesn't seem to be one of the unfixed issues. If I fool with that I'm sorry about that.

I made a fresh clone and tried to build it.
Got Mountain Lion (10.8) fresh installed and just added XCode, MacPorts and the dependencies for the iOS build.

for P in /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/include/freetype/config/ftconfig.h /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/include/freetype/config/ftheader.h /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/include/freetype/config/ftmodule.h /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/include/freetype/config/ftoption.h /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/include/freetype/config/ftstdlib.h  /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/objs/ftmodule.h  ; do                                  \
          /usr/bin/install -c -m 644                                           \
            $P /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/config ; \
        done
rm -f /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/cache/*
rmdir /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/cache
rm -f /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/internal/*
rmdir /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/internal
rmdir: /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/internal: No such file or directory
make: [install] Error 1 (ignored)
/usr/bin/install -c -m 644 ./builds/unix/ft2unix.h \
          /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/ft2build.h
/usr/bin/install -c -m 644 ./builds/unix/ftconfig.h                        \
          /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/config/ftconfig.h
/usr/bin/install -c -m 644 /Users/thopiekar/Desktop/kivy-ios/tmp/freetype-2.4.8/objs/ftmodule.h                          \
          /Users/thopiekar/Desktop/kivy-ios/tmp/root/include/freetype2/freetype/config/ftmodule.h
/usr/bin/install -c -m 755 ./builds/unix/freetype-config \
          /Users/thopiekar/Desktop/kivy-ios/tmp/root/bin/freetype-config
/usr/bin/install -c -m 644 ./builds/unix/freetype2.m4 \
          /Users/thopiekar/Desktop/kivy-ios/tmp/root/share/aclocal/freetype2.m4
/usr/bin/install -c -m 644 ./builds/unix/freetype2.pc \
          /Users/thopiekar/Desktop/kivy-ios/tmp/root/lib/pkgconfig/freetype2.pc
~/Desktop/kivy-ios
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1295k  100 1295k    0     0  68731      0  0:00:19  0:00:19 --:--:--  111k
~/Desktop/kivy-ios/tmp/SDL_ttf-2.0.10 ~/Desktop/kivy-ios
patching file SDL_ttf.c
~/Desktop/kivy-ios
~/Desktop/kivy-ios/tmp/SDL_ttf-2.0.10 ~/Desktop/kivy-ios
rm: libSDL_ttf.la: No such file or directory
+ try ./configure --prefix=/Users/thopiekar/Desktop/kivy-ios/tmp/root --with-freetype-prefix=/Users/thopiekar/Desktop/kivy-ios/tmp/root --host=arm-apple-darwin --enable-static=yes --enable-shared=no --without-x 'CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2' AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar 'LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1' 'CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1 -O3'
+ ./configure --prefix=/Users/thopiekar/Desktop/kivy-ios/tmp/root --with-freetype-prefix=/Users/thopiekar/Desktop/kivy-ios/tmp/root --host=arm-apple-darwin --enable-static=yes --enable-shared=no --without-x 'CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2' AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar 'LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1' 'CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1 -O3'
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... i386-apple-darwin12.2.0
checking host system type... arm-apple-darwin
checking for arm-apple-darwin-gcc...  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 accepts -g... yes
checking for  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/arm-apple-darwin10/4.2.1/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/arm-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-apple-darwin-dumpbin... no
checking for arm-apple-darwin-link... no
checking for dumpbin... no
checking for link... link -dump -symbols
configure: WARNING: using cross tools not prefixed with host triplet
checking the name lister (link -dump -symbols) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/arm-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for arm-apple-darwin-objdump... no
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for arm-apple-darwin-ar... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for arm-apple-darwin-ranlib... no
checking for ranlib... ranlib
checking command to parse link -dump -symbols output from  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 object... failed
checking for arm-apple-darwin-dsymutil... no
checking for dsymutil... dsymutil
checking for arm-apple-darwin-nmedit... no
checking for nmedit... nmedit
checking for arm-apple-darwin-lipo... no
checking for lipo... lipo
checking for arm-apple-darwin-otool... no
checking for otool... otool
checking for arm-apple-darwin-otool64... no
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor...  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -E -traditional-cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 supports -fno-rtti -fno-exceptions... no
checking for  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 option to produce PIC... -fno-common -DPIC
checking if  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 PIC flag -fno-common -DPIC works... yes
checking if  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 static flag -static works... no
checking if  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 supports -c -o file.o... yes
checking if  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 supports -c -o file.o... (cached) yes
checking whether the  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/arm-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking host system type... (cached) arm-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2... gcc3
checking for arm-apple-darwin-gcc... (cached)  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
checking whether we are using the GNU C compiler... (cached) yes
checking whether  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 accepts -g... (cached) yes
checking for  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 option to accept ISO C89... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for windres... no
checking for arm-apple-darwin-windres... no
checking for darwin-windres... no
checking for working alloca.h... yes
checking for alloca... yes
checking for freetype-config... /Users/thopiekar/Desktop/kivy-ios/tmp/root/bin/freetype-config
checking for arm-apple-darwin-pkg-config... no
checking for pkg-config... no
checking for SDL... no
checking for sdl-config... no
checking for SDL - version >= 1.2.4... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.4 not found!
+ exit -1

cannot build libjpeg and pil

I'm on OSX 10.8.4 with an up-to-date version of kivy-ios.
I noticed that the project has been updated to correctly compile PIL but the build script downloads and installs libjpeg6b that seems cannot be compiled on 10.8.4.

I'm the only one having this kind of problem?

Anyway, the real problem is with PIL.

It compiles correctly but when building the project with XCode, it says:

  __encode_to_file in libpil.a(_imaging.so.o)
  ld: symbol(s) not found for architecture armv7
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

is this an issue or i made something wrong?

build x86 version for simulator too

Because i don't always have the physical devices to test it on, it would be great to be able to test the apps on the xcode simulator.

It shouldnt be difficult to create a separate x86 build in the builddirectory.

But i don't get any idea how these two builds should integrate into the xcode project

Can you give some pointers/warnings ?

cant find opengl.c

when running build-all.sh i end with :

building 'kivy.graphics.opengl' extension
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -miphoneos-version-min=5.1 -O3 -g -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -I/Users/juju/Documents/projects/kivysrc/kivy-ios/tmp/Python-2.7.1/Include -I/Users/juju/Documents/projects/kivysrc/kivy-ios/tmp/Python-2.7.1 -c kivy/graphics/opengl.c -o build/temp.macosx-10.7-x86_64-2.7/kivy/graphics/opengl.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
arm-apple-darwin10-llvm-gcc-4.2: kivy/graphics/opengl.c: No such file or directory
arm-apple-darwin10-llvm-gcc-4.2: no input files
 error: command '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2' failed with exit status 1
make: *** [ios] Error 1
+ exit -1
+ exit -1

maybe an incorrect path to kivy src folder ?

Build Faile


ld: warning: ld: warning: ignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libios.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libios.aignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libvorbisidec.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libvorbisidec.a
ld: warning: 
ld: warning: ld: warning: ignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libogg.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libogg.ald: warning: ignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libSDL_mixer.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libSDL_mixer.aignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libfreetype.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libfreetype.a
ignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libkivy.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libkivy.a

ld: warning: 
ld: warning: ld: warning: ignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libpython2.7.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libpython2.7.aignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libSDL_ttf.a, file was built for archive which is not the architecture being linked (i386): /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libSDL_ttf.aignoring file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libSDL2.a, missing required architecture i386 in file /Users/ygmpkk/Documents/project/kivy-ios/build/lib/libSDL2.a (2 slices)


Undefined symbols for architecture i386:
  "_PyEval_InitThreads", referenced from:
      _SDL_main in main.o
  "_PyRun_SimpleFileExFlags", referenced from:
      _SDL_main in main.o
  "_PyRun_SimpleStringFlags", referenced from:
      _load_custom_builtin_importer in main.o
  "_PySys_SetArgv", referenced from:
      _SDL_main in main.o
  "_Py_Finalize", referenced from:
      _SDL_main in main.o
  "_Py_Initialize", referenced from:
      _SDL_main in main.o
  "_Py_SetPythonHome", referenced from:
      _SDL_main in main.o
  "_main", referenced from:
      start in crt1.o
     (maybe you meant: _SDL_main)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


  "_PyEval_InitThreads", referenced from:
      _SDL_main in main.o
  "_PyRun_SimpleFileExFlags", referenced from:
      _SDL_main in main.o
  "_PyRun_SimpleStringFlags", referenced from:
      _load_custom_builtin_importer in main.
  "_PySys_SetArgv", referenced from:
      _SDL_main in main.o
  "_Py_Finalize", referenced from:
      _SDL_main in main.o
  "_Py_Initialize", referenced from:
      _SDL_main in main.o
  "_Py_SetPythonHome", referenced from:
      _SDL_main in main.o
  "_main", referenced from:
      start in crt1.o
     (maybe you meant: _SDL_main)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build-all.sh PATH problem

Hey,

I am using OSX 10.6.8 32 bit with python 2.7.3.
I have installed cython and the other dependencies
successfully and tried to build ios-kivy.

The Error I get:

./tools/environment.sh: /usr/local/bin/hg: 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/
Resources/Python.a:  bad  interpreter: 
No such file or directory

The whole PATH:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin

The complete log can be found here:
http://snipurl.com/25ch6oql

Thanks,
Georg

Document requirement for Python 2.7 for populate-project.sh

After running populate-project.sh, which uses the stock system Python to pre-compile the .py files, requires Python 2.7 or on running the app gives the following error on earlier versions of Python (such as 2.6 on Snow Leopard):

RuntimeError: Bad magic number in .pyc file

It's easily solved by upgrading the stock version to 2.7 but the build-python.sh script could be configured to detect and use the same major version as the stock inbuilt version, e.g. using python --version.

Enforcing a minimum requirement for a modern Python isn't such a bad thing either though.

build-sdlttf.sh compile fails with SDL version 1.2.4 not found

partal fix for that came from here https://github.com/rotoglup/kivy-ios/commit/8c17e9f84cb4f1c6cbeec444d89fa49fe9bbe710
and partal because now there are some incompatibilities with current sdl version (build log http://paste.ubuntu.com/1082103/ )

diff of my fix:

diff --git a/tools/build-sdl.sh b/tools/build-sdl.sh
index 3054caf..a78ec46 100755
--- a/tools/build-sdl.sh
+++ b/tools/build-sdl.sh
@@ -4,5 +4,24 @@ pushd $KIVYIOSROOT/src/SDL/Xcode-iOS/SDL
 xcodebuild -project SDL.xcodeproj -target libSDL -configuration Release -sdk iphoneos$SDKVER
 popd

+pushd $KIVYIOSROOT/src/SDL
+
+cp sdl2-config.in sdl-config-iPhoneOS
+sed -i '' 's/@ENABLE_STATIC_FALSE@/#/g' ./sdl-config-iPhoneOS
+sed -i '' 's/@ENABLE_STATIC_TRUE@//g' ./sdl-config-iPhoneOS
+sed -i '' 's/@ENABLE_SHARED_TRUE@/#/g' ./sdl-config-iPhoneOS
+sed -i '' 's/@ENABLE_SHARED_FALSE@//g' ./sdl-config-iPhoneOS
+sed -i '' "s|@prefix@|$BUILDROOT|g" ./sdl-config-iPhoneOS
+sed -i '' 's/@exec_prefix@/${prefix}/g' ./sdl-config-iPhoneOS
+sed -i '' 's/@libdir@/${exec_prefix}\/lib/g' ./sdl-config-iPhoneOS
+sed -i '' 's/@SDL_VERSION@/1.3.0/g' ./sdl-config-iPhoneOS
+sed -i '' 's/@includedir@/${prefix}\/include/g' ./sdl-config-iPhoneOS
+sed -i '' 's/@SDL_CFLAGS@//g' ./sdl-config-iPhoneOS
+sed -i '' 's/@SDL_RLD_FLAGS@//g' ./sdl-config-iPhoneOS
+sed -i '' 's/@SDL_LIBS@//g' ./sdl-config-iPhoneOS
+chmod +x sdl-config-iPhoneOS
+
+popd
+
 cp src/SDL/Xcode-iOS/SDL/build/Release-iphoneos/libSDL.a $BUILDROOT/lib
 cp -a src/SDL/include $BUILDROOT/include/SDL 
diff --git a/tools/build-sdlttf.sh b/tools/build-sdlttf.sh
index c089cd1..09208c4 100755
--- a/tools/build-sdlttf.sh
+++ b/tools/build-sdlttf.sh
@@ -14,6 +14,7 @@ fi
 if [ ! -f $TMPROOT/SDL_ttf-$SDLTTF_VERSION/.libs/libSDL_ttf.a ]; then
        pushd $TMPROOT/SDL_ttf-$SDLTTF_VERSION
        rm libSDL_ttf.la
+       export SDL_CONFIG=$KIVYIOSROOT/src/SDL/sdl-config-iPhoneOS
        ./configure --prefix=/usr/local/iphone \
                --host=arm-apple-darwin \
                --enable-static=yes \

blacklist support

Would be nice to have the same blacklist support as in Android to reduce final file size

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/394701-blacklist-support?utm_campaign=plugin&utm_content=tracker%2F9081&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F9081&utm_medium=issues&utm_source=github).

MacPorts: build-all.sh aborts while cython not found

I tried to build kivy-ios via MacPorts and the story ends when one of the scripts can't find cython.

I installed cython via MacPorts and the executable is called: cython-2.7
where 2.7 stands for the python version it is build against..

Could you please make it compatible?

Videoplayer build error with GStream

My workflow and the unsolved error.

Create Xcode project with videoplayer.py renamed into main.py.

kivy/examples/widgets/videoplayer.py -> main.py

On Xcode, add GStreamer framework.

GStreamer.framework

Then, build error occurs, so add following more.

AssetsLibrary.framework
CoreVideo.framework
CoreMedia.framework
AVFoundation.framework
libiconv.dylib
libresolv.9.dylib

And, rename main extension to .mm

main.m -> main.mm

finally! ...error remains. Many duplicate symbols that conflicted between Kivy and Gstreamer.

One of those is like this.
duplicate symbol _ps_table_funcs in: /Users/admin/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework/GStreamer(libfreetype_a_armv7_-psaux.o) /Users/admin/kivy-ios/build/lib/libfreetype.a(psaux.o)

End lines of the log here.
507 dublicate symbols for architecture armv7 Linker command failed with exit code 1

Third Party Library Issue

Thanks for your help, tito and everyone !!

I have eventually built all of the files successfully, and I also ran the animation from example on my iPhone successfully. However, when I try to run an app which includes 'sympy' (I put sympy in the site-packages) on my iPhone, I failed to launch the app. I have already run that app on my mac but I failed to run it on my iPhone. I think that maybe sympy, the third party library, caused the failure, so do you know how to solve this problem? (also I tried to compile the files in sympy to .pyc or .pyo, but it still didn't work)
How can I use the third party library on my iPhone app?

Please help me.
Thank you very much ^_^

xml issue

Hi, I encountered a problem this time while I was trying to make a chatbot app by using a third-party lib called pyaiml (which is an aiml file interpreter). When I ran my app, I got the following information:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/shd101wyy/kivy-ios/build/python/lib/python2.7/xml/sax/__init__.py", line 93, in make_parser
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/shd101wyy/kivy-ios/build/python/lib/python2.7/xml/sax/expatreader.py", line 24, in <module>
xml.sax._exceptions.SAXReaderNotAvailable: expat not supported

It seems that expat caused the problem.
So when I ran the script

import xml.parsers.expat

on my iPhone, I got the following error:

      ImportError:No module named pyexpat.

So it seems that I could not import pyexpat ( which is a pyexpat.so file in lib-dynload folder before I built all required .sh file in kivy-ios).

Also, what is lxml used for? when I import it, I also met some problem (I ran the build-lxml.sh in kivy-ios)

How can I solve this problem? I want to parse some file by using xml library.

Thank you

Kivy iOS failed to build

Thanks for your help. The version of the cython that I installed is 0.16.(I used "pip install cython"). Is 0.16 the newest version? I also download the cython from your git and its version is 0.17pre, and then I tried to ran build-kivy.sh again, but this time I got the following information

Last login: Tue Jul 17 21:30:39 on ttys000
localhost:~ shd101wyy$ cython --version
Cython version 0.17pre

localhost:~ shd101wyy$ cd /Users/shd101wyy/Downloads/kivy-ios/tools
localhost:tools shd101wyy$ ./build-kivy.sh

+++ xcodebuild -showsdks
+++ fgrep iphoneos
+++ tail -n 1
+++ awk '{print $2}'
++ export SDKVER=5.1
++ SDKVER=5.1
+++ xcode-select -print-path
++ export DEVROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
++ DEVROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
++ export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
++ SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
++ '[' '!' -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer ']'
++ export PYTHON_VERSION=2.7.1
++ PYTHON_VERSION=2.7.1
++ export SDLTTF_VERSION=2.0.10
++ SDLTTF_VERSION=2.0.10
++ export FT_VERSION=2.4.8
++ FT_VERSION=2.4.8
++ export XML2_VERSION=2.7.8
++ XML2_VERSION=2.7.8
++ export XSLT_VERSION=1.1.26
++ XSLT_VERSION=1.1.26
++ export LXML_VERSION=2.3.1
++ LXML_VERSION=2.3.1
++++ dirname ./environment.sh
+++ cd -P ./../
+++ pwd
++ export KIVYIOSROOT=/Users/shd101wyy/Downloads/kivy-ios
++ KIVYIOSROOT=/Users/shd101wyy/Downloads/kivy-ios
++ export BUILDROOT=/Users/shd101wyy/Downloads/kivy-ios/build
++ BUILDROOT=/Users/shd101wyy/Downloads/kivy-ios/build
++ export TMPROOT=/Users/shd101wyy/Downloads/kivy-ios/tmp
++ TMPROOT=/Users/shd101wyy/Downloads/kivy-ios/tmp
++ export CACHEROOT=/Users/shd101wyy/Downloads/kivy-ios/.cache
++ CACHEROOT=/Users/shd101wyy/Downloads/kivy-ios/.cache
+++ which ccache
++ export CCACHE=
++ CCACHE=
++ export 'ARM_CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'
++ ARM_CC=' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'
++ export ARM_AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
++ ARM_AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
++ export ARM_LD=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld
++ ARM_LD=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld
++ export 'ARM_CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8'
++ ARM_CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8'
++ export 'ARM_CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp'
++ ARM_CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp'
++ export 'ARM_CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
++ ARM_CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
++ export 'ARM_CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1'
++ ARM_CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1'
++ export 'ARM_LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
++ ARM_LDFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
++ export 'ARM_LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1'
++ ARM_LDFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1'
++ export 'ARM_CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1 -O3'
++ ARM_CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1 -O3'
++ try mkdir -p /Users/shd101wyy/Downloads/kivy-ios/build
++ mkdir -p /Users/shd101wyy/Downloads/kivy-ios/build
++ try mkdir -p /Users/shd101wyy/Downloads/kivy-ios/build/include
++ mkdir -p /Users/shd101wyy/Downloads/kivy-ios/build/include
++ try mkdir -p /Users/shd101wyy/Downloads/kivy-ios/build/lib
++ mkdir -p /Users/shd101wyy/Downloads/kivy-ios/build/lib
++ try mkdir -p /Users/shd101wyy/Downloads/kivy-ios/.cache
++ mkdir -p /Users/shd101wyy/Downloads/kivy-ios/.cache
++ try mkdir -p /Users/shd101wyy/Downloads/kivy-ios/tmp
++ mkdir -p /Users/shd101wyy/Downloads/kivy-ios/tmp

  • '[' '!' -d /Users/shd101wyy/Downloads/kivy-ios/tmp/kivy ']'
  • '[' X = X-f ']'
  • pushd /Users/shd101wyy/Downloads/kivy-ios/tmp/kivy
    ~/Downloads/kivy-ios/tmp/kivy ~/Downloads/kivy-ios/tools
  • OLD_CFLAGS=
  • OLD_LDSHARED=
  • export LDSHARED=/Users/shd101wyy/Downloads/kivy-ios/tools/liblink
  • LDSHARED=/Users/shd101wyy/Downloads/kivy-ios/tools/liblink
  • export 'CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1 -O3'
  • CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1 -O3'
  • try make ios
  • make ios
    ln -s /Users/shd101wyy/Downloads/kivy-ios/Python-2.7.1/python
    ln: ./python: File exists
    make: [ios] Error 1 (ignored)
    ln -s /Users/shd101wyy/Downloads/kivy-ios/Python-2.7.1/python.exe
    ln: ./python.exe: File exists
    make: [ios] Error 1 (ignored)
    rm -rdf iosbuild/
    mkdir iosbuild
    echo "First build ========================================"
    First build ========================================
    PATH="/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" /Users/shd101wyy/Downloads/kivy-ios/tmp/Python-2.7.1/hostpython setup.py build_ext -g
    [INFO ] Kivy v1.3.0-dev
    Kivy-IOS project environment detect, use it.
    Kivy-IOS project located at '/Users/shd101wyy/Downloads/kivy-ios'
    Activate SDL compilation.
    running build_ext
    Build configuration is:
    • use_opengl_es2 = True
    • use_opengl_debug = False
    • use_mesagl = False
    • use_glew = False
    • use_sdl = True
    • use_ios = True
      Generate config.h
      Generate config.pxi
      failed to import Cython: dynamic module does not define init function (initScanning)
      error: Cython does not appear to be installed
      make: [ios] Error 1 (ignored)
      echo "cythoning =========================================="
      cythoning ==========================================
      find . -name *.pyx -exec cython -t {} ;
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      Traceback (most recent call last):
      File "/usr/local/share/python/cython", line 8, in
      main(command_line = 1)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 616, in main
      result = compile(sources, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 591, in compile
      return compile_multiple(source, options)
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 559, in compile_multiple
      if not timestamps or context.c_file_out_of_date(source):
      NameError: global name 'context' is not defined
      echo "Second build ======================================="
      Second build =======================================
      PATH="/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" /Users/shd101wyy/Downloads/kivy-ios/tmp/Python-2.7.1/hostpython setup.py build_ext -g
      [INFO ] Kivy v1.3.0-dev
      Kivy-IOS project environment detect, use it.
      Kivy-IOS project located at '/Users/shd101wyy/Downloads/kivy-ios'
      Activate SDL compilation.
      running build_ext
      Build configuration is:
    • use_opengl_es2 = True
    • use_opengl_debug = False
    • use_mesagl = False
    • use_glew = False
    • use_sdl = True
    • use_ios = True
      Generate config.h
      Generate config.pxi
      failed to import Cython: dynamic module does not define init function (initScanning)
      error: Cython does not appear to be installed
      make: *** [ios] Error 1
  • exit -1
    localhost:tools shd101wyy$
    #############################################################################################################################################

It seems that I failed to import Cython???But I have installed Cython, I really do not know why.
Also, I used homebrew to install the python 2.7.3

Could please help me???
I really want to make this work.
Please help me!
Thank you

Unable to build using Xcode 5 because LLVM-GCC compiler was removed by apple

The build script of kivy-ios uses the LLVM-GCC compiler supplied by Xcode 4.6 <. Xcode 5 no long supplies the LLVM-GCC compiler, therefor it is no longer possible to build kivy-ios using the new Xcode.

The following message of deprecation can be found on the apple site:

Important: Xcode 5 does not support use of the LLVM-GCC compiler and the GDB debugger. Existing projects configured to use LLVM-GCC and GDB will be reconfigured to use the LLVM compiler and LLDB debugger when opened by Xcode 5. Please file a bug using bugreporter.apple.com for any issues that prevent you from moving to Xcode 5 for this reason. source: https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_5_0.html

Installation deletes repo! (setting of KIVYIOSROOT)

http://kivy.org/docs/guide/packaging-ios.html

kivy-ios(master) $ tools/build-all.sh 
tools/build-python.sh: line 10: [: ./tools/../: binary operator expected
tar: Error opening archive: Failed to open './tools/../'

Then, the entire contents of the repo are gone!

kivy-ios $ ls -la
total 0
drwxr-xr-x  2 bhammond staff  68 Feb  4 12:48 ./
drwxr-xr-x 12 bhammond staff 408 Feb  4 12:47 ../

Mac OS X 10.7.5, Python 2.7.1, Homebrew 0.9.3

import ssl error

I'm trying to import ssl in my kivy application and it crashes when I deploy to iOS.

It crashes on:

import ssl
This is the log from the device:

2013-07-31 20:13:06.215 mykivyapp[2568:907] [Springtomize]: Loading into sb-external process
2013-07-31 20:13:07.308 mykivyapp[2568:907] PythonHome is: /var/mobile/Applications/3742734C-18CB-49A5-B943-BABADBA9D26E/mykivyapp.app
2013-07-31 20:13:07.311 mykivyapp[2568:907] Initializing python
2013-07-31 20:13:07.719 mykivyapp[2568:907] Running main.pyo: /var/mobile/Applications/3742734C-18CB-49A5-B943-BABADBA9D26E/mykivyapp.app/YourApp/main.pyo
[INFO ] Kivy v1.7.1
[INFO ] [Factory ] 144 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[DEBUG ] [Image ] option ignored by config
[DEBUG ] [Image ] option ignored by config
[DEBUG ] [Image ] option ignored by config
[DEBUG ] [Image ] option ignored by config
[INFO ] [Image ] Providers: img_imageio, img_tex (img_dds, img_pygame, img_pil, img_gif ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG ] [Text ] Ignored (import error)
[INFO ] [Text ] Provider: sdlttf(['text_pygame'] ignored)
Traceback (most recent call last):
File "/Users/0/Desktop/kivy-ios/app-mykivyapp/YourApp/main.py", line 30, in
File "/Users/0/Desktop/kivy-ios/build/python/lib/python2.7/ssl.py", line 60, in
import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl
2013-07-31 20:13:08.967 mykivyapp[2568:907] Application quit abnormally!
2013-07-31 20:13:09.016 mykivyapp[2568:907] Leaving

armv7s: load_custom_builtin_importer XCode compile error

Hi, I am having this compile error in XCode. I followed this link: http://kivy.org/docs/guide/packaging-ios.html

  • I try to build to iPhone 5 device - armv7s

Screen Shot 2013-01-27 at 5 39 09 PM

Screen Shot 2013-01-27 at 5 39 36 PM

Screen Shot 2013-01-27 at 5 48 07 PM

Any ideas?

I tried to move that function before the main function, but I get the following error:

Undefined symbols for architecture armv7s:
"_PyEval_InitThreads", referenced from:
_SDL_main in main.o
"_PyRun_SimpleFileExFlags", referenced from:
_SDL_main in main.o
"_PyRun_SimpleStringFlags", referenced from:
_load_custom_builtin_importer in main.o
"_PySys_SetArgv", referenced from:
_SDL_main in main.o
"_Py_Finalize", referenced from:
_SDL_main in main.o
"_Py_Initialize", referenced from:
_SDL_main in main.o
"_Py_SetPythonHome", referenced from:
_SDL_main in main.o
"_main", referenced from:
-u command line option
(maybe you meant: _SDL_main)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks in advance

Libtool problem

Hello,

Logs: http://snipurl.com/25fidh4

The script fails at the point where
it moves/renames the file ...

mv: rename .deps/mdct.Tpo to .deps/mdct.Plo: No such file or directory

OSX 10.6.8 / 32 Bit

thanks,
georg

Remove / document dependency on pkg-config

build-sdlmixer.sh fails when building libtremor if pkg-config dependency is not satisfied. Without pkg-config It fails in the configure script for libtremor with the following error:

PKG_PROG_PKG_CONFIG: command not found

It would be good to remove the dependency if possible as pkg-config isn't trivial to install on Mac OS X.

ios.c errors

When running tools/build-all.sh I get tons of errors. I'm on Mountain Lion latest, latest xcode and command line tools. Here's a log gist. Is anyone else able to compile kivy for iOS?

Error In run `environment.sh`

timgers-MacBook-Air:kivy-ios timger$ sh tools/environment.sh 
2013-08-11 11:36:42.726 xcodebuild[34008:1803] Error loading /Users/timger/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz:  dlopen(/Users/timger/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz, 265): Symbol not found: _OBJC_CLASS_$_NSObject
  Referenced from: /Users/timger/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz
  Expected in: /usr/lib/libobjc.A.dylib
 in /Users/timger/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz
2013-08-11 11:36:42.729 xcodebuild[34008:1803] WARNING: Failed to load plugin at: /Users/timger/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin, skipping.  Could not load bundle.

Illegal Instruction 4 on Lion, Mountain Lion

Hi I ran into an issue when trying to build my app for iOS. The error 'illegal instruction 4' pops up in a lot of cases for example when I try to do git clone git://github.com/kivy/kivy-ios it comes up with the error. I bypassed this by manual cloning.

I then ran into the same error while running tools/build-all.sh. It stops on environment.sh. I googled this issue and it seems to be some compatibility issues with new version of OSX and the trick is to compile using the -mmacosx-version-min flag. Below is a similar issue from StackOverflow.

http://stackoverflow.com/questions/14268887/what-is-the-illegal-instruction-4-error-and-why-does-mmacosx-version-min-10?rq=1

My question is where do I add the compile flags?

README.rst typing error

In README.rst, step 3, you said to run tools/build_all.sh, however the real file is called build-all.sh.

build-python.sh fails with No rule to make target `python.exe'

To fix it, I have to replace "python.exe" with "python" in build-python.sh for build to succeed

diff --git a/tools/build-python.sh b/tools/build-python.sh
index 4e3285a..af5a032 100755
--- a/tools/build-python.sh
+++ b/tools/build-python.sh
@@ -28,8 +28,8 @@ try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setu
echo "Building for native machine ============================================"

try ./configure CC="$CCACHE clang -Qunused-arguments -fcolor-diagnostics"
-try make python.exe Parser/pgen
-try mv python.exe hostpython
+try make python Parser/pgen
+try mv python hostpython
try mv Parser/pgen Parser/hostpgen
try make distclean

error on run build-python.sh

hi I just run sh tools/build-python.sh on my mac air
But it look work with error like as follow

(cd /Volumes/MACEXT/GitHub/kivy-ios/build/python/bin; ln python2.7 python)
rm -f /Volumes/MACEXT/GitHub/kivy-ios/build/python/bin/python-config
(cd /Volumes/MACEXT/GitHub/kivy-ios/build/python/bin; ln -s python2.7-config python-config)
test -d /Volumes/MACEXT/GitHub/kivy-ios/build/python/lib/pkgconfig || /usr/bin/install -c -d -m 755 /Volumes/MACEXT/GitHub/kivy-ios/build/python/lib/pkgconfig
rm -f /Volumes/MACEXT/GitHub/kivy-ios/build/python/lib/pkgconfig/python.pc
(cd /Volumes/MACEXT/GitHub/kivy-ios/build/python/lib/pkgconfig; ln -s python-2.7.pc python.pc)
/usr/bin/install -c -m 644 ./Misc/python.man \
        /Volumes/MACEXT/GitHub/kivy-ios/build/python/share/man/man1/python2.7.1
== Trying to remove duplicate symbol in /Volumes/MACEXT/GitHub/kivy-ios/build/lib/libpython2.7.a
/usr/bin/ranlib: file: libpython2.7.a(pymath.o) has no symbols
ranlib: file: libpython2.7.a(pymath.o) has no symbols

build-python.sh shows a linker error, unable to build

Hi,

I'm trying to build kivy-ios on my machine (OS X Mountain Lion v10.8.2) and when build-python.sh executes as part of build-all.sh I get this error:

checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for gcc...  clang -Qunused-arguments -fcolor-diagnostics
checking whether the C compiler works... no
configure: error: in `/Users/buhrm/src/kivy-ios/tmp/Python-2.7.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.

In the config.log in tmp/Python-x-x we see:

configure:3167: checking for --without-gcc
configure:3211: result: no
configure:3272: checking for gcc
configure:3299: result:  clang -Qunused-arguments -fcolor-diagnostics
configure:3528: checking for C compiler version
configure:3537:  clang -Qunused-arguments -fcolor-diagnostics --version >&5
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
configure:3548: $? = 0
configure:3537:  clang -Qunused-arguments -fcolor-diagnostics -v >&5
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
configure:3548: $? = 0
configure:3537:  clang -Qunused-arguments -fcolor-diagnostics -V >&5
clang: �[0;1;31merror: �[0m�[1margument to '-V' is missing (expected 1 value)�[0m
clang: �[0;1;31merror: �[0m�[1mno input files�[0m
configure:3548: $? = 1
configure:3537:  clang -Qunused-arguments -fcolor-diagnostics -qversion >&5
clang: �[0;1;31merror: �[0m�[1mno input files�[0m
configure:3548: $? = 1
configure:3568: checking whether the C compiler works
configure:3590:  clang -Qunused-arguments -fcolor-diagnostics   -lsqlite3 conftest.c  >&5
ld: warning: ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/libsqlite3.dylib, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/libsqlite3.dylib (2 slices)ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/crt1.o, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/crt1.o (4 slices)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/libSystem.dylib, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/libSystem.dylib (2 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang: �[0;1;31merror: �[0m�[1mlinker command failed with exit code 1 (use -v to see invocation)�[0m
configure:3594: $? = 1
configure:3632: result: no
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define _DARWIN_C_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3637: error: in `/Users/buhrm/src/kivy-ios/tmp/Python-2.7.1':
configure:3641: error: C compiler cannot create executables
See `config.log' for more details.

I've scoured the web for a solution but I'm not sure what to do get it to build - this is quite a core component for iOS isn't it?

Thanks,
Martin

Native extensions

Hi, Just curious how native extensions are to be built. E.g. IAP, Game Center, etc. Thanks for any feedback.

can not build with xcode 4.6

cannot build python [tools/build-python.sh] if including this file

[tools/environment.sh]

i paste the useful part into [tools/build-python.sh], remove the include and it works

try () {
        "$@" || exit -1
}

function deduplicate() {
        fn=$(basename $1)
        echo "== Trying to remove duplicate symbol in $1"
        try mkdir ddp
        try cd ddp
        try ar x $1
        try ar rc $fn *.o
        try ranlib $fn
        try mv -f $fn $1
        try cd ..
        try rm -rf ddp
}

export PYTHON_VERSION=2.7.1
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
export BUILDROOT="$KIVYIOSROOT/build"
export TMPROOT="$KIVYIOSROOT/tmp"
export DESTROOT="$KIVYIOSROOT/tmp/root"
export CACHEROOT="$KIVYIOSROOT/.cache"

issue also described in this thread:
https://groups.google.com/forum/?fromgroups=#!topic/kivy-users/QVxmxb5gV3g

thanks

app-directory param missing on create-xcode-project.sh call

On this instruction page, http://kivy.org/docs/guide/packaging-ios.html, the line $ tools/create-xcode-project.sh test, needs to have something like ~/your-dev-area-path/app-test added on the end

usage is create-xcode-project.sh appname app-directory

It ran without error when i ran it with just appname, but i didn't find if it put it anywhere -- the message it printed must have been a usage message. It worked when I added the absolute path for the app-directory.

can't build-all without error!

ok, thanks tito.

first, here is my build log.

http://paste.ubuntu.com/1103230/

my mac is air with lion os x, and Xcode is the newest - 4.3.3
i followed the readme steps,
brew install autoconf automake libtool pkg-config mercurial
brew link libtool
brew link mercurial
pip install cython
and finally build-all it.

my question is:

  1. in my build log,
    line 1908, ld: warning: 32-bit absolute address out of range (0x1001DDAC8 max is 4GB): from _usedpools + 0x00000004 (0x001DDAD0) to 0x1001DDAC8
    line 1929, ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures
    so many warning with this one, the 4gb warning and cpusubtype warning, also occur in my Xcode project when i tools/create-xcode-project.sh to generate a test app.
  2. i can't build the python for ios, i check /usr/include/ and curses.h exists. ncurses.h also. how to include path?
    line 1931, Include/py_curses.h:50:20: error: curses.h: No such file or directory
  3. this is very important, i can't make libSDL_ttf.la to generate static library. like the guy arti95 says.
    line 11375, make: *** No rule to make target `libSDL_ttf.la'. Stop.

after build-all and missing libSDL_ttf.a, only generate these
libSDL.a libSDL_mixer.a libfreetype.a libios.a libkivy.a libogg.a libpython2.7.a libvorbisidec.a

tito, please help me. is any successful builded guy need to modify some kivy source? i can't build and test run on my iPhone 4s.
thanks.

Linker, address out of range warnings

ld: warning: 32-bit absolute address out of range (0x1003BED18 max is 4GB): from _usedpools + 0x00000004 (0x003BED20) to 0x1003BED18

That is the exact warning given. My app still works, but I'm not sure it is making use of whatever the warning is referencing.

python version

I see in toos/environment.sh that the used python version is:

export PYTHON_VERSION=2.7.1

with this, build-all.sh ends up with:

failed to import Cython: dynamic module does not define init function (initScanning)
error: Cython does not appear to be installed

if i change the python version accordingly to the one installed by brew it starts working but other things go wrong, like building sqlite support.

i suspect that everything is set up for python 2.7.1 only (included patches?)

can 't install use brew

i run brew install cython autoconf automake libtool pkg-config mercurial on my mac

and get a error like follow:

Error: No available formula for cython

Exception AssertionError in 'kivy.core.text.text_sdlttf._get_font' ignored

I cloned fresh copy of the latest kivy-ios, and built all libraries by executing tools/build-all.sh. Now that I have a Xcode project and my app gets compiled okay.

However, when I run the app on actual device, there is no text showing. Below is output from console.

2013-03-19 15:26:04.859 myapp[3189:907] PythonHome is: /var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app
2013-03-19 15:26:04.889 myapp[3189:907] Initializing python
2013-03-19 15:26:05.510 myapp[3189:907] Running main.pyo: /var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app/YourApp/main.pyo
[INFO ] Kivy v1.6.1-dev
[INFO ] [Factory ] 137 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[DEBUG ] [Image ] option ignored by config
[DEBUG ] [Image ] option ignored by config
[DEBUG ] [Image ] option ignored by config
[DEBUG ] [Image ] option ignored by config
[INFO ] [Image ] Providers: img_imageio, img_tex (img_dds, img_pygame, img_pil, img_gif ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG ] [Text ] Ignored (import error)
[INFO ] [Text ] Provider: sdlttf(['text_pygame'] ignored)
[DEBUG ] [Window ] Provider ignored by config
[INFO ] [OSC ] using for socket
[INFO ] [Window ] Provider: sdl(['window_pygame'] ignored)
[INFO ] [GL ] OpenGL version <OpenGL ES 2.0 IMGSGX535-73.16.1>
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer <PowerVR SGX 535>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <OpenGL ES GLSL ES 1.0>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[DEBUG ] [Shader ] Fragment compiled successfully
[DEBUG ] [Shader ] Vertex compiled successfully
[DEBUG ] [ImageImageIO] Load </var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app/lib/python2.7/site-packages/kivy/data/glsl/default.png>
[WARNING ] [GL ] BGRA texture support is not available
[INFO ] [Window ] auto add sdl input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[DEBUG ] [Atlas ] Load </var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app/lib/python2.7/site-packages/kivy/data/../data/images/defaulttheme.atlas>
[DEBUG ] [Atlas ] Need to load 1 images
[DEBUG ] [Atlas ] Load </var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app/lib/python2.7/site-packages/kivy/data/../data/images/defaulttheme-0.png>
[DEBUG ] [ImageImageIO] Load </var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app/lib/python2.7/site-packages/kivy/data/../data/images/defaulttheme-0.png>
[DEBUG ] [App ] Loading kv </var/mobile/Applications/319C2360-6FB8-4F58-882A-DC83BB17AD05/myapp.app/YourApp/my.kv>
[INFO ] [Base ] Start application main loop
Error writing to datastream
Exception AssertionError in 'kivy.core.text.text_sdlttf._get_font' ignored
Error writing to datastream
Exception AssertionError in 'kivy.core.text.text_sdlttf._get_font' ignored
Error writing to datastream
Exception AssertionError in 'kivy.core.text.text_sdlttf._get_font' ignored

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.