Open the iOS project in Xcode¶
kivyforge generates a complete Xcode project in <app>-ios/, where <app> is
your [project].name. You can build and run entirely from the command line, or
open the project in Xcode to pick a destination, press Run, and use the debugger
and Instruments.
Before you begin¶
- Configure your iOS app and lock it with
kivyforge lock -p ios.
Open the project¶
-
Generate the project. A bare
buildgenerates it for both the Simulator and a device:kivyforge build -p ios -
Open it in Xcode:
kivyforge open -p iosopenlaunches Xcode on<app>-ios/<app>.xcodeprojand prints the path it opened. If the project does not exist yet,openfails and tells you to runkivyforge buildfirst. -
In Xcode, pick a Simulator or a connected device and click Run.
What Xcode owns¶
- Compiling and signing. Xcode compiles the project and, for a device or
release build, signs it. kivyforge writes the signing build settings from your
[tool.kivy.ios.signing]table. See Sign your iOS app. - Swift Package Manager. Xcode resolves and builds any Swift packages that you declare.
Regenerate the project¶
kivyforge owns the generated <app>-ios/ folder and regenerates it on every
build. Changes you make to the project in Xcode do not survive a regenerate,
so put configuration in pyproject.toml instead. For extra Xcode build settings,
use [tool.kivy.ios.xcode.build_settings]; see the
iOS overlay reference.
To start from a clean slate, remove the generated trees and build again:
kivyforge clean
kivyforge build -p ios
kivyforge clean removes the generated output for every platform in the
project, not only iOS.
Verify¶
Xcode opens with your app's project, and the scheme builds and runs on the destination you selected.