-
Notifications
You must be signed in to change notification settings - Fork 2
Build on MacOS with XCode for iOS
Marcus Hudritsch edited this page Jul 1, 2024
·
10 revisions
- An iPhone or an iPad
- An Apple ID and a free developer account
- Xcode
- CMake ≥ 3.15 (Download)
- Clone the Git repository into a directory of your choice.
- Open Xcode.
- Add your Apple ID to Xcode if you haven't done that yet.
- Go to
Xcode > Settings... > Accounts
. - Click the
+
button in the bottom-left corner, selectApple ID
and clickContinue
. - Log in with your Apple ID.
- Go to
- Copy your development team ID.
- Open the app
Keychain access
. - Go to
login > Certificates
. - Double-click on your Apple developer certificate (e.g.
Apple Development: [email protected] (123456)
). - In the popup window, copy (only) the ID in the line
Organisational Unit
. This is your development team ID.
- Open the app
- Open a terminal in the SLProject root directory and run the following commands (insert your development team ID at the placeholder):
cd scripts ./generate_xcode_project_ios.sh <Your development team ID>
- In Xcode, open
<SLProject root directory>/build_ios/SLProject.xcodeproj
. - In the top bar, select the scheme
app-demo
. - Plug in your iPhone or iPad.
- In the top bar, select your connected device.
- SLProject doesn't run on iOS simulators because we only provide library prebuilts for actual iOS devices.
- Click on the start button at the top to install and launch the app on your device.
- If you get a dialog saying "The request to open ch.bfh.ti.app-demo failed", tell your device to trust your development team.
- On your device, go to
Settings > General > VPN & Device Management
. - Select
Apple Development: <Your email address>
. - Click
Trust "Apple Development: <Your email address>"
. - Back in Xcode, try to launch the app again.
- On your device, go to
- In the top bar, select the scheme for your app.
- To build the app-node, select
app-node
. - To build the app-minimal from the guide to creating a new app, select
app-minimal
.
- To build the app-node, select
- Build and start again.