[tool.kivy.ios] reference¶
The iOS overlay. kivyforge rejects a value of the wrong type rather than converting it. For tasks, see Configure your iOS app.
[tool.kivy.ios]¶
| Key | Type | Default | Description |
|---|---|---|---|
schema_version |
integer | required | Overlay schema version. Set to 1. |
bundle_id |
string | required | Bundle identifier, in reverse-DNS form. Letters, digits, hyphens, and periods only; no underscores. |
build |
integer | 1 |
Build number (CFBundleVersion). |
deployment_target |
string | "16.0" |
Minimum iOS version. Must be inside the range the installed Xcode accepts (15.0 and later for Xcode 27). |
simulator_archs |
list of string | ["arm64"] |
Simulator architectures to pin. "arm64" is the only valid value. |
extra_index_urls |
list of string | [] |
Extra package indexes, such as the mobile wheel index. When indexes tie on a package version, the first listed wins. See Where packages come from. |
find_links |
list of string | [] |
Project-relative directories of prebuilt wheels, searched during lock only. A package with a wheel here comes only from these directories. See Where packages come from. |
exclude |
list of string | [] |
Package names to drop from the resolve. |
[sources] |
table | none | Which index a package comes from on this target, as package = { index = "NAME" }. An entry replaces the [tool.kivy.sources] entry for the same package. See Package indexes and sources. |
[tool.kivy.ios.python]¶
Required.
| Key | Type | Default | Description |
|---|---|---|---|
version |
string | required | CPython version. Must match a Python.xcframework that python.org publishes for iOS, for example "3.15.0". Kivy's iOS wheels are built for CPython 3.15. [project].requires-python must allow it. |
[tool.kivy.ios.python.build_settings]¶
| Key | Type | Default | Description |
|---|---|---|---|
byte_compile |
bool or "release" |
"release" |
Compile your app and its dependencies to .pyc. "release" applies to release exports only. |
strip_source |
bool or "release" |
"release" |
Remove .py files after compiling. |
Compiling needs a CPython of the same minor as the runtime you ship, running
on the machine you build on, because the iOS runtime can't run there. You
don't install it: kivyforge lock pins one for Apple Silicon Macs in the lock, and the
first release build on a machine downloads it (about 26 MB), caches it, and
compiles with it. Every machine that builds the lock uses the same build.
kivyforge doctor -p ios says whether it's installed yet.
Without a usable pin, "release" ships source with a warning and true fails
the build. A lock written before kivyforge pinned it is reported by
kivyforge lock --check; a plain kivyforge lock -p ios adds the pin and
keeps every other one.
For build machines without network access or behind a firewall, see
KIVYFORGE_HOST_PYTHON_DOWNLOADS and KIVYFORGE_HOST_PYTHON_MIRROR in
Environment variables.
[tool.kivy.ios.icons]¶
| Key | Type | Default | Description |
|---|---|---|---|
source |
string | none | Path to a 1024x1024 PNG. Apple requires it to be opaque and full-bleed. |
[tool.kivy.ios.splash]¶
| Key | Type | Default | Description |
|---|---|---|---|
source |
string | none | Path to the image centered on the generated launch screen. |
background |
string | none | Launch screen background color, as #rrggbb. |
[tool.kivy.ios.signing]¶
| Key | Type | Default | Description |
|---|---|---|---|
team_id |
string | "" |
Apple Developer Team ID. Required for device builds and release exports. Overridden by --team-id, then KIVYFORGE_TEAM_ID. |
identity |
string | "Apple Development" |
Signing identity for device debug builds. Not passed to release exports. Overridden by --signing-identity, then KIVYFORGE_SIGNING_IDENTITY. |
provisioning_profile |
string | "" |
Provisioning profile to pin: its name or UUID, or a path to a .mobileprovision file. Requires auto_signing = false. Empty means Xcode chooses. See the note below. |
auto_signing |
bool | true |
Use Xcode automatic signing. When true, signing xcodebuild runs get -allowProvisioningUpdates. |
upload_symbols |
bool | true |
Value of uploadSymbols in the export options for release exports. |
provisioning_profile value
Set it the way Xcode does, to the profile's name or UUID. kivyforge
passes it to Xcode as PROVISIONING_PROFILE_SPECIFIER, and doctor and the
entitlements check find the matching profile among those installed on the
Mac (~/Library/Developer/Xcode/UserData/Provisioning Profiles and
~/Library/MobileDevice/Provisioning Profiles). If several installed
profiles share the name, the newest one is used.
You can instead give a path to a downloaded .mobileprovision file,
absolute or relative to the project. kivyforge reads the file and passes its
UUID to Xcode. Xcode signs only with installed profiles, so install the file
too (double-click it); doctor warns if it is not installed.
A pinned profile is manual signing, so set auto_signing = false: Xcode
refuses a pin under automatic signing. The profile must be one created at
developer.apple.com, not an Xcode-managed iOS Team Provisioning Profile,
which manual signing rejects. A device or release build stops before
xcodebuild on either, and doctor fails on both.
[tool.kivy.ios.entitlements]¶
A table of entitlement keys and values (bool, string, or list), written verbatim
to the app's .entitlements file. Each capability you declare must be enabled
on your App ID. See Sign your iOS app.
[tool.kivy.ios.info_plist]¶
A table of keys merged into the generated Info.plist, such as usage-description
strings. These keys are managed by kivyforge and rejected here:
CFBundleName, CFBundleDisplayName, CFBundleIdentifier,
CFBundleShortVersionString, CFBundleVersion, MinimumOSVersion,
UISupportedInterfaceOrientations, UISupportedInterfaceOrientations~ipad,
LSRequiresIPhoneOS, CFBundlePackageType, CFBundleInfoDictionaryVersion,
CFBundleExecutable, NSHumanReadableCopyright, UIApplicationSceneManifest.
[tool.kivy.ios.xcode.build_settings]¶
A table of extra Xcode build settings applied to the generated project. Every
value must be a string, for example SWIFT_VERSION = "5.0". These settings are
managed by kivyforge and rejected here:
INFOPLIST_FILE, PRODUCT_BUNDLE_IDENTIFIER, IPHONEOS_DEPLOYMENT_TARGET,
TARGETED_DEVICE_FAMILY, DEBUG_INFORMATION_FORMAT, CODE_SIGN_STYLE,
CODE_SIGN_IDENTITY, DEVELOPMENT_TEAM, PROVISIONING_PROFILE_SPECIFIER,
ENABLE_USER_SCRIPT_SANDBOXING, ENABLE_TESTABILITY, FRAMEWORK_SEARCH_PATHS,
HEADER_SEARCH_PATHS, LD_RUNPATH_SEARCH_PATHS,
GCC_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER, PRODUCT_NAME, SDKROOT,
ALWAYS_SEARCH_USER_PATHS, COPY_PHASE_STRIP.
Two more are rejected only while kivyforge writes them itself:
ASSETCATALOG_COMPILER_APPICON_NAME while [tool.kivy.ios.icons].source is
set, and CODE_SIGN_ENTITLEMENTS while [tool.kivy.ios.entitlements] is set.
Without those, you can set them here.
OTHER_LDFLAGS and GCC_PREPROCESSOR_DEFINITIONS are lists of flags, so your
value is added to kivyforge's rather than replacing it. $(inherited) is
written once at the front if you include it. For example,
OTHER_LDFLAGS = "$(inherited) -ObjC", which Firebase requires, becomes
$(inherited) -framework UIKit -ObjC.
[tool.kivy.ios.privacy_manifest]¶
| Key | Type | Default | Description |
|---|---|---|---|
source |
string | none | Path to your own PrivacyInfo.xcprivacy. When unset, kivyforge generates a minimal manifest that declares no tracking, no collected data, and no required-reason APIs. |
[[tool.kivy.ios.include_files]]¶
An array of tables. Each entry copies project files into the .app. See
Add files to the app bundle.
| Key | Type | Default | Description |
|---|---|---|---|
dest |
string | required | Destination directory, relative to the root of the .app. "." is the root itself. |
sources |
list of string | required | Project-relative files or directories to copy. Each must exist. A file lands in dest under its own name; a directory's contents land in dest with their subfolders. |
Files are copied byte for byte: Xcode does not compile, convert or strip them.
build checks the built .app and .ipa against the lock, and fails with
KF-ARTIFACT-CONTENT if a file is missing or different. These are refused:
- a path the build writes, such as
Info.plist,Assets.car,Frameworks/,python/orapp/(KF-INCLUDE-RESERVED); - a top-level name ending in
.framework,.xcframework,.appexor.app, which Xcode treats as code (KF-INCLUDE-RESERVED)..bundleis allowed; - native code, a Mach-O file or a static archive (
KF-INCLUDE-NATIVE-CODE). Declare it under[tool.kivy.ios.native.xcframeworks]; - a format Xcode compiles:
.xcstrings,.storyboard,.xibor.xcassets(KF-INCLUDE-SOURCE-FORMAT). Include the compiled form.
[tool.kivy.ios.native.xcframeworks]¶
Each entry is NAME = { ... } and declares a native .xcframework that does not
come from a wheel. A standard Kivy app needs none.
| Field | Type | Default | Description |
|---|---|---|---|
version |
string | required | Version of the framework. |
source |
string | required | An http:// or https:// URL, or a project-relative path. |
link |
bool | true |
Link the framework. |
embed |
bool | true |
Embed the framework in the app. |
[tool.kivy.ios.native.swift_packages]¶
Each entry is NAME = { ... } and declares a Swift Package Manager dependency.
See Add a Swift package.
| Field | Type | Default | Description |
|---|---|---|---|
url |
string | none | Remote package URL. Set exactly one of url and path. |
path |
string | none | Project-relative directory of a local package. |
requirement |
table | required with url |
Exactly one rule: exact, from, up_to_next_minor, branch, or revision (a string), or range (a list of two versions). |
products |
list of string | required | Library products to use. Must not be empty. |
link |
bool | true |
Link the products. |
embed |
bool | false with url, true with path |
Embed the products in the app. |
Example¶
[tool.kivy.ios]
schema_version = 1
bundle_id = "org.example.hello-kivy"
build = 1
deployment_target = "16.0"
extra_index_urls = ["https://elliotgarbus.github.io/kivy-mobile-wheels/simple/"]
exclude = ["kivy-garden", "docutils", "pygments"]
[tool.kivy.ios.python]
version = "3.15.0"
[tool.kivy.ios.signing]
team_id = "ABCDE12345"
auto_signing = true