Deploy SpiderLily to iOS via Xcode #
Since UnrealBuildTool doesn't properly apply iOS team settings from DefaultEngine.ini when regenerating Xcode projects, the most reliable way to deploy to iOS is through Xcode directly.
Prerequisites #
✅ Content already cooked at: ~/Perforce/spiderlily_build_workspace_macmini/SL_main/Saved/Cooked/IOS/
✅ Team configured in Xcode: Matthew Doyle (F7G74Z35B8)
✅ Provisioning profile: 07a4a65c-b32d-4d7b-99f6-1091214c6606
✅ Bundle ID: work.false.SpiderLily
Steps #
1. Open Xcode Workspace #
open ~/Perforce/spiderlily_build_workspace_macmini/SL_main/Intermediate/ProjectFiles/SpiderLily_IOS_SpiderLily.xcworkspace
2. Select Target & Device #
- Select the SpiderLily scheme (top left)
- Select your connected iPhone as the destination device
3. Configure Signing (if needed) #
- Select SpiderLily target in the project navigator
- Go to Signing & Capabilities tab
- Check "Automatically manage signing"
- Select Team: Matthew Doyle
- Bundle Identifier should be:
work.false.SpiderLily
4. Build and Run #
- Press ⌘+R (or click the Play button)
- Xcode will:
- Compile the iOS binary
- Sign the app with your certificate
- Install to your connected iPhone
- Launch the app
Troubleshooting #
"Failed to open descriptor file" #
If the app launches but shows this error, the .uproject file is missing. We fixed this by creating the directory structure:
cd ~/Perforce/spiderlily_build_workspace_macmini/SL_main
mkdir -p Binaries/SpiderLily
cp SpiderLily.uproject Binaries/SpiderLily/
"Failed to find cooked content" #
The cooked content should be at:
~/Perforce/spiderlily_build_workspace_macmini/SL_main/Saved/Cooked/IOS/SpiderLily/
If missing, run cook-only:
./cook-stage-ios-remote.fish device
"Xcode regenerates project" #
Unreal's build process regenerates the Xcode project, wiping team settings. Always use Xcode GUI to build iOS, not command line xcodebuild.
Why This Works #
When you build in Xcode GUI:
- ✅ Team settings persist in Xcode preferences (not the project file)
- ✅ Xcode automatically manages provisioning profiles
- ✅ Code signing works correctly
- ✅ Installation to device is automatic
When you build via command line (BuildCookRun):
- ❌ UBT regenerates
.xcodeprojfiles, wiping team settings - ❌ Even with
-provisionflag, settings don't stick - ❌
xcodebuildrequires team in project file, not just Xcode prefs - ❌ This is a known UE5 limitation for iOS
Alternative: Pre-compiled Binary Deployment #
If you want to automate iOS deployment, you need to:
- Build once in Xcode GUI (to create signed
.app) - Use
ios-deployorxcrun devicectlto install pre-built.app - Don't rebuild - just re-sign and deploy existing binary
This is beyond scope for now but is the path to automation.