Add unsigned iOS sideload build

This commit is contained in:
Ninosaurier committed 2026-11-25 13:21:56 +01:00
1 parent fa42c6f8a0
commit adad6ec27f
5 files changed
+82 -11

No files matched your search

+2 -2
View File
@@ -31,7 +31,7 @@ Open the local web address shown by Vite. Choose a dance template or add a sound
## Mobile downloads
- [Android / e/OS debug APK](downloads/BeatHound-Android-eOS-1.0.0-debug.apk) — installable on Android API 24 or newer. The same APK is intended for compatible e/OS 4+ devices.
- **iOS:** An IPA is not included because iOS apps must be built and signed with Xcode on macOS. See the [native build guide](docs/native-builds.md).
- **iOS sideload package:** See the [iOS download instructions](downloads/ios/README.md) to build an IPA on macOS. Install it with a sideloading app such as AltStore; the package is not directly installable by tapping it.
The Android file is a debug-signed build for testing. It is not a Google Play release package.
@@ -43,7 +43,7 @@ The project uses Capacitor for native Android and iOS shells.
npm run android:debug
```
The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-1.0.0-debug.apk`. For iOS, use macOS with Xcode: run `npm run ios:sync`, then `npm run ios:open` and archive/sign the app in Xcode. Full setup steps are in the [native build guide](docs/native-builds.md).
The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-1.0.0-debug.apk`. For iOS, use macOS with Xcode and run `npm run ios:unsigned-ipa`; details are in the [native build guide](docs/native-builds.md).
## Project checks
+18 -9
View File
@@ -37,18 +37,26 @@ You can also transfer the APK to the device and open it. The device may ask you
## iOS
Capacitor's Xcode project is in `ios/App/App.xcodeproj`. An IPA must be built on macOS with Xcode and signed for distribution. This Linux build environment can prepare and sync the project, but it cannot produce or sign an IPA.
Capacitor's Xcode project is in `ios/App/App.xcodeproj`. Building an iOS app requires macOS and Xcode. This repository includes a script for creating an unsigned IPA that can be signed on-device for personal sideloading; this Linux build environment cannot produce the IPA itself.
On a Mac:
### Build an unsigned IPA for sideloading
1. Install Node.js and Xcode.
2. Run `npm install` in the repository.
3. Run `npm run ios:sync` to build the web assets and copy them into the iOS project.
4. Run `npm run ios:open` to open the project in Xcode.
5. Select an Apple development team and signing method in Xcode.
6. Archive the app and export the signed IPA from Xcode.
On a Mac with Node.js and Xcode installed:
Do not commit Apple certificates, provisioning profiles, or signing keys to this repository. Add the exported IPA to `downloads/` only after it has been signed for the intended distribution method.
```sh
npm install
npm run ios:unsigned-ipa
```
The script builds the app for physical iOS devices and writes:
```text
downloads/ios/BeatHound-iOS-1.0.0-unsigned.ipa
```
The IPA is not directly installable by opening it on an iPhone. Import it into a sideloading app such as AltStore or Sideloadly and sign it with your Apple ID. A free personal Apple ID can be used for personal sideloading, but the signature needs periodic renewal and the sideloading app's setup instructions must be followed. No App Store upload is involved.
For managed distribution to other users or direct installation without a sideloading app, use Apple's supported distribution and signing options in Xcode. Keep certificates, provisioning profiles, and signing keys out of Git.
## Mobile build commands
@@ -59,3 +67,4 @@ Do not commit Apple certificates, provisioning profiles, or signing keys to this
| `npm run android:debug` | Builds and syncs Android, then creates a debug APK. |
| `npm run ios:sync` | Builds and syncs the iOS project. |
| `npm run ios:open` | Opens the iOS project in Xcode; run this on macOS. |
| `npm run ios:unsigned-ipa` | Builds an unsigned iOS IPA for personal sideloading; run this on macOS with Xcode. |
+11
View File
@@ -0,0 +1,11 @@
# iOS sideload download
The unsigned IPA is generated on macOS with Xcode and written to this folder:
```text
BeatHound-iOS-1.0.0-unsigned.ipa
```
Run `npm install` and `npm run ios:unsigned-ipa` from the repository root on a Mac. The package can then be committed here for download. It must be imported into a sideloading app such as AltStore or Sideloadly and signed with an Apple ID before installation; tapping an unsigned IPA on an iPhone will not install it. See the [native build guide](../../docs/native-builds.md#build-an-unsigned-ipa-for-sideloading) for details.
This repository is currently being edited in a Linux environment without Xcode, so the IPA binary cannot be generated here.
+1
View File
@@ -14,6 +14,7 @@
"android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-1.0.0-debug.apk",
"ios:sync": "npm run build:mobile && cap sync ios",
"ios:open": "cap open ios",
"ios:unsigned-ipa": "bash scripts/build-ios-unsigned-ipa.sh",
"test": "vitest run",
"lint": "eslint ."
},
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
if [[ "$(uname -s)" != "Darwin" ]]; then
printf 'Building an iOS IPA requires macOS and Xcode.\n' >&2
exit 1
fi
if ! command -v xcodebuild >/dev/null 2>&1; then
printf 'xcodebuild was not found. Install Xcode and its command line tools first.\n' >&2
exit 1
fi
npm run ios:sync
DERIVED_DATA_DIR="$ROOT_DIR/ios/App/DerivedData/UnsignedIPA"
APP_PATH="$DERIVED_DATA_DIR/Build/Products/Release-iphoneos/App.app"
OUTPUT_DIR="$ROOT_DIR/downloads/ios"
OUTPUT_IPA="$OUTPUT_DIR/BeatHound-iOS-1.0.0-unsigned.ipa"
PACKAGE_DIR="$(mktemp -d)"
trap 'rm -rf "$PACKAGE_DIR"' EXIT
xcodebuild \
-project ios/App/App.xcodeproj \
-scheme App \
-configuration Release \
-sdk iphoneos \
-destination 'generic/platform=iOS' \
-derivedDataPath "$DERIVED_DATA_DIR" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY='' \
build
if [[ ! -d "$APP_PATH" ]]; then
printf 'Xcode completed without producing the expected app at %s\n' "$APP_PATH" >&2
exit 1
fi
mkdir -p "$PACKAGE_DIR/Payload" "$OUTPUT_DIR"
ditto "$APP_PATH" "$PACKAGE_DIR/Payload/App.app"
(
cd "$PACKAGE_DIR"
/usr/bin/zip -qry "$OUTPUT_IPA" Payload
)
printf 'Created %s\n' "$OUTPUT_IPA"