Skip to content

Commit e6a8fa2

Browse files
committed
build(ios): use dedicated bundle id/config for iOS builds
1 parent 8ef6e91 commit e6a8fa2

6 files changed

Lines changed: 24 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ rustup target add x86_64-apple-ios
114114
```
115115

116116
- Apple signing configured (development team).
117-
- Set `bundle.iOS.developmentTeam` in `src-tauri/tauri.conf.json`, or
117+
- Set `bundle.iOS.developmentTeam` in `src-tauri/tauri.ios.conf.json` (preferred), or
118118
- pass `--team <TEAM_ID>` to the device script.
119119

120120
### Run on iOS Simulator

scripts/build_run_ios.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cd "$ROOT_DIR"
66

77
SIMULATOR_NAME="${SIMULATOR_NAME:-iPhone Air}"
88
TARGET="${TARGET:-aarch64-sim}"
9-
BUNDLE_ID="${BUNDLE_ID:-com.dimillian.codexmonitor}"
9+
BUNDLE_ID="${BUNDLE_ID:-com.dimillian.codexmonitor.ios}"
1010
SKIP_BUILD=0
1111
CLEAN_BUILD=1
1212
IOS_APP_ICONSET_DIR="src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset"
@@ -20,7 +20,7 @@ Builds the iOS simulator app, installs it on a booted simulator, and launches it
2020
Options:
2121
--simulator <name> Simulator name (default: "iPhone Air")
2222
--target <target> Tauri iOS target (default: "aarch64-sim")
23-
--bundle-id <id> Bundle id to launch (default: com.dimillian.codexmonitor)
23+
--bundle-id <id> Bundle id to launch (default: com.dimillian.codexmonitor.ios)
2424
--skip-build Skip the build and only install + launch the existing app
2525
--no-clean Do not remove stale src-tauri/gen/apple/build before build
2626
-h, --help Show this help

scripts/build_run_ios_device.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cd "$ROOT_DIR"
66

77
DEVICE=""
88
TARGET="${TARGET:-aarch64}"
9-
BUNDLE_ID="${BUNDLE_ID:-com.dimillian.codexmonitor}"
9+
BUNDLE_ID="${BUNDLE_ID:-com.dimillian.codexmonitor.ios}"
1010
DEVELOPMENT_TEAM="${APPLE_DEVELOPMENT_TEAM:-}"
1111
SKIP_BUILD=0
1212
OPEN_XCODE=0
@@ -24,7 +24,7 @@ Options:
2424
--device <id|name> Required unless --list-devices is used.
2525
Accepts UDID, serial, UUID, or device name.
2626
--target <target> Tauri iOS target (default: aarch64)
27-
--bundle-id <id> Bundle id to launch (default: com.dimillian.codexmonitor)
27+
--bundle-id <id> Bundle id to launch (default: com.dimillian.codexmonitor.ios)
2828
--team <id> Apple development team ID (sets APPLE_DEVELOPMENT_TEAM)
2929
--skip-build Skip build and only install + launch existing app
3030
--open-xcode Open Xcode after build instead of install/launch via devicectl
@@ -112,8 +112,12 @@ sync_ios_icons() {
112112
has_configured_ios_team() {
113113
node -e '
114114
const fs = require("fs");
115-
const cfg = JSON.parse(fs.readFileSync("src-tauri/tauri.conf.json", "utf8"));
116-
const team = cfg?.bundle?.iOS?.developmentTeam;
115+
const baseCfg = JSON.parse(fs.readFileSync("src-tauri/tauri.conf.json", "utf8"));
116+
let iosCfg = {};
117+
try {
118+
iosCfg = JSON.parse(fs.readFileSync("src-tauri/tauri.ios.conf.json", "utf8"));
119+
} catch (_) {}
120+
const team = iosCfg?.bundle?.iOS?.developmentTeam ?? baseCfg?.bundle?.iOS?.developmentTeam;
117121
process.exit(team && String(team).trim() ? 0 : 1);
118122
' >/dev/null 2>&1
119123
}
@@ -147,7 +151,7 @@ fi
147151
if [[ "$SKIP_BUILD" -eq 0 && -z "${APPLE_DEVELOPMENT_TEAM:-}" ]]; then
148152
if ! has_configured_ios_team; then
149153
echo "Missing iOS signing team." >&2
150-
echo "Set one via --team <TEAM_ID> or APPLE_DEVELOPMENT_TEAM, or set bundle.iOS.developmentTeam in src-tauri/tauri.conf.json." >&2
154+
echo "Set one via --team <TEAM_ID> or APPLE_DEVELOPMENT_TEAM, or set bundle.iOS.developmentTeam in src-tauri/tauri.ios.conf.json (or src-tauri/tauri.conf.json)." >&2
151155
echo "Tip: First-time setup can be done with --open-xcode." >&2
152156
exit 1
153157
fi

src-tauri/gen/apple/codex-monitor.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494
);
495495
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
496496
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
497-
PRODUCT_BUNDLE_IDENTIFIER = com.dimillian.codexmonitor;
497+
PRODUCT_BUNDLE_IDENTIFIER = com.dimillian.codexmonitor.ios;
498498
PRODUCT_NAME = "Codex Monitor";
499499
SDKROOT = iphoneos;
500500
TARGETED_DEVICE_FAMILY = "1,2";
@@ -531,7 +531,7 @@
531531
);
532532
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
533533
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
534-
PRODUCT_BUNDLE_IDENTIFIER = com.dimillian.codexmonitor;
534+
PRODUCT_BUNDLE_IDENTIFIER = com.dimillian.codexmonitor.ios;
535535
PRODUCT_NAME = "Codex Monitor";
536536
SDKROOT = iphoneos;
537537
TARGETED_DEVICE_FAMILY = "1,2";

src-tauri/gen/apple/codex-monitor_iOS/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundleShortVersionString</key>
1818
<string>0.7.47</string>
1919
<key>CFBundleVersion</key>
20-
<string>0.7.47.1</string>
20+
<string>0.7.47</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
2323
<key>UILaunchStoryboardName</key>

src-tauri/tauri.ios.conf.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://schema.tauri.app/config/2",
3+
"identifier": "com.dimillian.codexmonitor.ios",
4+
"bundle": {
5+
"iOS": {
6+
"developmentTeam": "Z6P74P6T99"
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)