build-apple.sh: kestrove-nmh with a dSYM (App Store Connect wants one per executable)
Built with debug info, symbols extracted with dsymutil (same UUIDs), then the shipped binary stripped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -16,8 +16,9 @@ export MACOSX_DEPLOYMENT_TARGET=14.0
|
||||
# The helper's bundle id (embedded Info.plist, see crates/kv-nmh/build.rs): the app's own + ".nmh".
|
||||
BUNDLE_PREFIX=$(sed -n 's/^ *BUNDLE_PREFIX: *\([A-Za-z0-9.-]*\).*/\1/p' ../kestrove-apple/project.yml | head -1)
|
||||
export KV_NMH_BUNDLE_ID="${BUNDLE_PREFIX:-app.kestrove}.nmh"
|
||||
# With debug info and unstripped, so a dSYM can be made (App Store Connect wants one per executable).
|
||||
for t in aarch64-apple-darwin x86_64-apple-darwin; do
|
||||
cargo build -p kv-nmh --release --target "$t"
|
||||
CARGO_PROFILE_RELEASE_DEBUG=true CARGO_PROFILE_RELEASE_STRIP=false cargo build -p kv-nmh --release --target "$t"
|
||||
done
|
||||
|
||||
cargo build -p kv-ffi --features browser-bridge # host dylib for library-mode bindgen
|
||||
@@ -44,4 +45,9 @@ cp out/swift/kv_ffi.swift "$OUT/Sources/KestroveCore/Generated.swift"
|
||||
mkdir -p "$OUT/bin"
|
||||
lipo -create target/aarch64-apple-darwin/release/kestrove-nmh target/x86_64-apple-darwin/release/kestrove-nmh \
|
||||
-output "$OUT/bin/kestrove-nmh"
|
||||
# Symbols go to the dSYM (same UUIDs), then the shipped binary is stripped. Mac/embed-nmh.sh puts the dSYM
|
||||
# into the archive.
|
||||
rm -rf "$OUT/bin/kestrove-nmh.dSYM"
|
||||
dsymutil "$OUT/bin/kestrove-nmh" -o "$OUT/bin/kestrove-nmh.dSYM"
|
||||
strip -x "$OUT/bin/kestrove-nmh"
|
||||
echo "✅ XCFramework + bindings written to $OUT"
|
||||
|
||||
Reference in New Issue
Block a user