Kivy is a framework which you could use to build your own mobile app purely in python. If you have any trouble at the deploying stage, I wish this blog could help you. :)
- Install buildozer:
# via pip (latest stable, recommended)
- Create the spec file, running the following command in your folder:
- Although most of the fields are self-explanatory, it worths mentioning the following fields:
requirements = python3crystax, kivy, plyer # put all your dependencies here
- Generate the APK, use the APK file in ./bin/ folder to install
buildozer android debug
- Or plug your phone, generate and install in one go:
buildozer android debug deploy run
- Deploy on production environment will need to add a sign tuso the package:
- Manually sign: https://developer.android.com/studio/publish/app-signing.html#signing-manually
releaserather than the
debugin the previous command to package
However, the packaging for production is still not stable, I got package without any errors, but failed on install on the real device. Need to look for the updates.
You are lucky to see this document (smile)
- Install Xcode and related SDK
- Install libs for building
brew install autoconf automake libtool pkg-config
- Install Cython
pip install cython # Doc said must be 0.23, but I used the latest 0.25 without problem
- Download kivy-ios and install:
git clone git://github.com/kivy/kivy-ios
Anything happens in step 4, check the first line of toolchain.py if it links to the correct place of where your py2.7 locates
Create the Xcode project: (your entry file must be named as
$ ./toolchain.py create <title> <app_directory>
You will see the a folder named
<title>-ios, open it and open the project via
Go to apple developer center and register as a developer
Open your project settings
- CMD + 1 to show the project navigator
- Double click your root folder, the project setting should be shown at the center of screen
- General → Signing → Choose your certificate and select the right team
- Build Settings → Enable Bitcode → No
- If you can’t see Enable-Bitcode setting, try click the ‘All’ section at the top of setting section
Now when you run the project, you will see the error in the console.
Every time you change your code, the code will be synced to the Xcode folder, and it will contain all files in your project and there is no way to configure the exception. Only solution here is to create a folder-in-the-middle to solve the problem.
That’s all. Hope it helps :)
Thanks for reading!
Follow me (albertgao) on twitter, if you want to hear more about my interesting ideas.