Skip to content

Commit 86d2c6c

Browse files
feat(preprod): add watchos section + update code signature (#15538)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Adds a section explaining why watchOS apps may have unexpected size from analysis. I also updated the Code Signature section to explain that code signing also happens generally for the app. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [x] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: Alex Krawiec <[email protected]>
1 parent 85ca194 commit 86d2c6c

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
lines changed

docs/platforms/apple/guides/ios/size-analysis/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ description: Upload iOS builds to Sentry for size analysis.
3838

3939
<Include name="size-analysis/app-thinning" />
4040

41-
### Binary Code Signature
41+
### WatchOS Architectures
4242

43-
<Include name="size-analysis/binary-code-signature" />
43+
<Include name="size-analysis/watch-architecture-thinning" />
44+
45+
### Code Signature
46+
47+
<Include name="size-analysis/code-signature" />
4448

4549
### App Store Connect File Sizes
4650

includes/size-analysis/binary-code-signature.mdx

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
App bundles contain code signature data within `_CodeSignature/` directories. In these you'll find a `CodeResources` plist file with hashes of every file within the bundle. Similarly, Mach-O binaries contain additional hashes of every page block within its `LC_CODE_SIGNATURE` load command. This means the size of code signature data will scale linearly with the amount of files in your bundle and size of your binaries.
2+
3+
By default Sentry calculates the size of this data as-is. You may notice differences when comparing against your app downloaded from the App Store. For example, Xcode 26 archives only codesign with `SHA256` hashes, but the App Store can use both `SHA1` and `SHA256` hashes. In other words, App Store downloads of your app may be slightly larger than what's produced by Xcode. This App Store behavior is subject to change at any time.
4+
5+
If you'd like to compare the impact of this on your app, you can re-sign your app before uploading to Sentry:
6+
7+
```bash
8+
# Inspect the current code signature
9+
codesign -dvvv '/path/to/your/app.app'
10+
11+
# Re-sign with a new code signature
12+
codesign --force \
13+
--sign 'Apple Distribution: Your Team (team_id)' \
14+
--digest-algorithm sha1 \
15+
--digest-algorithm sha256 \
16+
'/path/to/your/app.app'
17+
```
18+
19+
This will force both `SHA1` and `SHA256` hashes to be used.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
WatchOS apps produced by Xcode often contain both `arm64_32` and `arm64` architectures in a single fat binary. By default Sentry calculates the size of this data as-is, however, your end users will only download whatever architecture is necessary for their device. It's recommended to apply [App Thinning](/platforms/apple/guides/ios/size-analysis#app-thinning) before uploading for more representative results.

0 commit comments

Comments
 (0)