cinucen
ecinucen
PySide6.QtCore wraps Qt Core, PySide6.QtWidgets wraps Qt Widgets…
app = QApplication(sys.argv)
button = QPushButton("Click me")
button.clicked.connect(lambda: print("clicked"))
button.show()
sys.exit(app.exec())
On desktop these are all shared libraries, loaded when your code imports PySide6.
Qt and PySide6 are shared libraries.
import loads them when the app runs.
Qt for iOS is static, so PySide6 is static too.
What to link is decided when the Xcode project is generated.
Decided when the project is generated, not at import time.
$ python tools/cross_compile_ios/main.py \
--qt-install-path ~/Qt/6.12.0 \
--arch arm64
qtpip
$ pyside6-ios-deploy main.py \
--wheel-pyside pyside6-...-ios_arm64.whl \
--wheel-shiboken shiboken6-...-ios_arm64.whl
open deployment/ios_arm64/<App>.xcodeproj
App.app
pyside6-ios-deploy assembles these into the app.
pyside6-ios-deploy works out.py and .qml files.prl filesproject.pbxprojWhat to link, and what to copy into the app
main.mmWhat to register, then start Python
Info.plistApp name, bundle id, version, permission texts
project.pbxproj
# QtWidgets.prl: what QtWidgets needs
-framework QtGui # other Qt modules
-framework UIKit # Apple frameworks
libQt6BundledHarfbuzz.a # Qt's bundled libraries
qrc_qstyle_init.cpp.o # Qt's built-in resources
The tool starts from your imports and reads each module's .prl, recursively. Qt's own metadata decides what gets linked.
App.app/
App_bin # Qt + PySide6 + Shiboken (compiled code)
Frameworks/ # Python.framework
packages/ # third-party packages
main.py # your code
One executable, plus everything else copied in by Xcode build phases.
main.mm: what to register
Q_IMPORT_PLUGIN(QIOSIntegrationPlugin)
Linking libqios.a is not enough. The plugin must be imported by class name.
PyImport_AppendInittab("PySide6.QtCore",
PyInit_QtCore);
There is no dynamic library to load. Every module must be registered before Py_Initialize.
main.mm: register, then start Python
Q_IMPORT_PLUGIN(QIOSIntegrationPlugin)
Q_IMPORT_PLUGIN(QSvgPlugin)
PyImport_AppendInittab("PySide6.QtCore",
PyInit_QtCore);
PyImport_AppendInittab("PySide6.QtSvg",
PyInit_QtSvg);
Everything that is linked gets registered.
Py_InitializeFromConfig(&config);
PyRun_SimpleFile(fp, "main.py");
Qt's entry point calls main(), which runs your main.py.
Info.plist
CFBundleDisplayName
CFBundleIdentifier
CFBundleShortVersionString
From pysidedeploy.spec, or the matching command-line options.
NSCameraUsageDescription
NSMicrophoneUsageDescription
NSBluetoothAlwaysUsageDescription
NSContactsUsageDescription
NSCalendarsUsageDescription
NSLocationWhenInUseUsageDescription
All six, in every app: PySide6 itself imports the six Darwin permission plugins.
# pysidedeploy.spec
[ios]
packages = numpy,requests
Listed in the spec, or found by scanning your imports.
# run by pyside6-ios-deploy, on every deploy
pip install --target site-packages \
--platform ios_..._arm64_iphonesimulator \
--only-binary :all: \
--extra-index-url <BeeWare index> ...
iOS wheels from PyPI, or BeeWare's index for compiled packages.
tetrix.pypyside6-ios-deploymain.py, nothing changedios_arm64)--team-id
import
cinucen
ecinucen
github.com/cinucen/PySide6-iOS-QtCS2026
Qt Contributors Summit 2026