Skip to content
xfangfang edited this page Feb 19, 2025 · 1 revision

Building the demo for iOS

# build libromfs generator
./build_libromfs_generator.sh

1. Build for arm64 iphoneOS

# 1. Generate a Xcode project
# IOS_CODE_SIGN_IDENTITY: code is not signed when IOS_CODE_SIGN_IDENTITY is empty
# IOS_GUI_IDENTIFIER: optional, default is com.borealis.demo
cmake -B build-ios -G Xcode -DPLATFORM_IOS=ON -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=13.0 \
  -DIOS_CODE_SIGN_IDENTITY="Your identity" \
  -DIOS_GUI_IDENTIFIER="custom.app.id.here"

# 2. open project in Xcode
open build-ios/*.xcodeproj

# 3. Set up Team and Bundle Identifiers in Xcode, then connect devices to run.

How to install the borealis demo on your iPhone (in a beginner-friendly way):

  1. Download the borealis_demo.app (borealis-ios) from GitHub Actions.
  2. Create a new iOS project in xcode (make sure you can install the app on your iPhone).
  3. Download ios-app-signer.
  4. Open ios-app-signer, select borealis_demo.app for Input File, select the newly created xcode project for Provisioning Profile, and click start. (After Xcode16 and later, xcode changed the location of Provisioning Profile. You can run rm -rf ~/Library/MobileDevice/Provisioning\ Profiles && ln -s ~/Library/Developer/Xcode/UserData/Provisioning\ Profiles ~/Library/MobileDevice/Provisioning\ Profiles to solve this problem. Or Manually select the Provisioning Profile.)
  5. Change the suffix of the generated ipa to zip and unzip it to get the Payload folder.
  6. Open xcode, select Window -> Devices and Simulators from the menu bar, connect the device, click the + in installed apps, and select the borealis_demo.app file in the Payload folder.

2. Build for arm64 iphoneOS Simulator

cmake -B build-ios -G Xcode -DPLATFORM_IOS=ON -DPLATFORM=SIMULATORARM64 -DDEPLOYMENT_TARGET=13.0

# Build
cmake --build build-ios

# Open simulator
open -a Simulator

# After simulator is booted, install app
xcrun simctl install booted build-ios/Debug-iphonesimulator/borealis_demo.app
Clone this wiki locally