Deploying Kanzi applications to iOS¶
Kanzi Studio provides tools to generate an Xcode project from your Kanzi application and deploy it to an iOS device.
Requirements¶
To develop iOS applications with Kanzi, you need:
macOS
Xcode 26.3 or newer
iOS SDK 26 or newer
Vulkan SDK with MoltenVK
CMake 3.25 or newer
An Apple Developer account for deploying to physical iOS devices
For more information about setting up the environment for iOS development, see https://developer.apple.com.
To deploy to a physical iOS device, you need an Apple Developer certificate to sign the application. See https://developer.apple.com/support/code-signing/.
Generating the Xcode project¶
To generate the Xcode project for your Kanzi application:
In Kanzi Studio, export the kzb file of your project. Select File > Export > Export KZB.
Copy the
Applicationfolder to your Mac development machine.On your Mac development machine, set the
KANZI_HOMEenvironment variable to the location of your Kanzi iOS platform package.From the root of the
Applicationfolder, rungenerate_cmake_xcode_ios_project.shto generate the Xcode project:./generate_cmake_xcode_ios_project.sh --platform device
Note
If the script is not executable, run
chmod +x generate_cmake_xcode_ios_project.shfirst.
Building and deploying from Xcode¶
To build and deploy a Kanzi application to an iOS device from Xcode:
Connect your iOS device to your Mac development machine with a USB cable.
Open the generated Xcode project from the
build_iosfolder.In Xcode, set up code signing for your Apple Developer certificate. See Apple code signing.
Click Run to build and deploy the application.
Building and deploying from the command line¶
To build and deploy a Kanzi application to an iOS device from the command line:
Connect your iOS device to your Mac development machine with a USB cable.
From the
Applicationfolder, build and install the application to theoutputfolder:xcodebuild -project build_ios/<ApplicationName>_ios.xcodeproj \ -scheme <ApplicationName> -configuration Release \ -destination 'generic/platform=iOS' \ DEVELOPMENT_TEAM=<YourTeamID> \ 'DSTROOT=$(PROJECT_DIR)' \ install
Replace
<YourTeamID>with your Apple Developer Team ID. You can find your Team ID in your Apple Developer account under Membership details.xcodebuildplaces the built application inoutput/<ApplicationName>.app.Tip
If you do not have an existing provisioning profile, add
-allowProvisioningUpdatesto thexcodebuildcommand to allow it to automatically create one.Find the identifier of your connected device:
xcrun devicectl list devices
Install the application on the device:
xcrun devicectl device install app \ --device <DeviceIdentifier> \ output/<ApplicationName>.app
Launch the application on the device:
xcrun devicectl device process launch \ --console \ --device <DeviceIdentifier> \ <BundleIdentifier>
Note
The
--consoleoption prints logs from the iOS application to the macOS terminal.<BundleIdentifier>is the bundle ID of your application, typically in the formatcom.company-name.app-name. For example,com.rightware.kanzi.basicapplication.