Skip to content

Commit 32a0cb5

Browse files
runningcodeclaude
andcommitted
fix(build): Improve error for xcarchive/IPA uploads on non-ARM64
When users try to upload .xcarchive or .ipa files from a non-Apple Silicon Mac (e.g. Intel-based Xcode Cloud), they get a confusing error that only mentions Android formats (APK, AAB). The real reason is that xcarchive/IPA processing is compile-time gated to ARM64 macOS. Add a targeted check on non-ARM64 platforms that detects these file extensions and returns a clear error explaining the Apple Silicon requirement. EME-951 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a0e91bf commit 32a0cb5

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/commands/build/upload.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,18 @@ fn validate_is_supported_build(path: &Path, bytes: &[u8]) -> Result<()> {
542542
}
543543

544544
debug!("File format validation failed");
545+
546+
#[cfg(not(all(target_os = "macos", target_arch = "aarch64")))]
547+
{
548+
let ext = path.extension().and_then(|e| e.to_str()).unwrap_or("");
549+
if ext.eq_ignore_ascii_case("xcarchive") || ext.eq_ignore_ascii_case("ipa") {
550+
return Err(anyhow!(
551+
"Uploading XCArchive and IPA files requires an Apple Silicon Mac: {}",
552+
path.display()
553+
));
554+
}
555+
}
556+
545557
#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
546558
let format_list = "APK, AAB, XCArchive, or IPA";
547559
#[cfg(not(all(target_os = "macos", target_arch = "aarch64")))]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```
2+
$ sentry-cli build upload tests/integration/_fixtures/build/ipa.ipa
3+
? failed
4+
error: Uploading XCArchive and IPA files requires an Apple Silicon Mac: tests/integration/_fixtures/build/ipa.ipa
5+
6+
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
7+
Please attach the full debug log to all bug reports.
8+
9+
```

tests/integration/build/upload.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ fn command_build_upload_no_path() {
2626
TestManager::new().register_trycmd_test("build/build-upload-no-path.trycmd");
2727
}
2828

29+
#[cfg(not(all(target_os = "macos", target_arch = "aarch64")))]
30+
#[test]
31+
fn command_build_upload_ipa_not_arm64() {
32+
TestManager::new()
33+
.register_trycmd_test("build/build-upload-ipa-not-arm64.trycmd")
34+
.with_default_token();
35+
}
36+
2937
#[test]
3038
fn command_build_upload_invalid_aab() {
3139
TestManager::new()

0 commit comments

Comments
 (0)