Build a Feathers UI project as an iOS app
Feathers UI may be used to build mobile applications targeting Apple's iOS operating system (including iPadOS).
In addition to the dependencies specified in the Feathers UI installation instructions, building an iOS application with Feathers UI has some additional requirements.
An Apple computer running macOS. iOS apps cannot be built on Windows or Linux.
Install Xcode from the macOS App Store.
- Launch Xcode at least once to "install additional required components".
To build for the
ios target, run the following command.
openfl build ios
-debug flag to create a build to include extra debugging information, including full stack traces when there's an exception or crash.
openfl build ios -debug
The build's output will be written to the bin/android/bin folder. The .apk file may be found in bin/android/bin/app/build/outputs/apk/debug (including release builds).
Your project.xml file may optionally specify an output folder different from bin.
In the example above, the output would be generated in Export/android/bin instead.
-simulator flag to build your app for Xcode's device simulator on your development machine.
openfl build ios -simulator
To install the app in the iOS simulator, follow these steps.
- Launch Simulator.app.
- Select your desired device by opening the File menu, then Open Device.
- Wait a moment for the simulated device to start.
- Drag and drop your Feathers UI .app file from the Finder to the simulated device's home screen.
- Click the app icon to launch.
Error: Signing for "ProjectName" requires a development team. Select the development team in the Signing & Capabilities editor.
The signing options for iOS have not been specified in the OpenFL project.xml file.
One way to resolve this issue is to add your Team ID to your project.xml file. The Team ID is assigned by Apple, and it may be found in the Membership section of the Apple Developer Portal.
<certificate team-id="XXXXXXXX" />
Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Run the following command in a terminal to resolve this issue.
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Did you get some other error message that you don't understand?
Configuring OpenFL to build for native targets, like iOS or Android, can be a little tricky! Head over to either the Feathers UI community forum or the Feathers UI Discord. Explain which command you tried to run, be sure to mention that you are targeting ios, and post the error message (and any additional relevant output). Ideally, we can help you figure out a solution, and then we'll also add it to this troubleshooting section, so that everyone can benefit.