diff --git a/docs/platforms/apple/guides/ios/size-analysis/index.mdx b/docs/platforms/apple/guides/ios/size-analysis/index.mdx index b9cb22f791fd3..e0716dab4fa8d 100644 --- a/docs/platforms/apple/guides/ios/size-analysis/index.mdx +++ b/docs/platforms/apple/guides/ios/size-analysis/index.mdx @@ -38,9 +38,13 @@ description: Upload iOS builds to Sentry for size analysis. -### Binary Code Signature +### WatchOS Architectures - + + +### Code Signature + + ### App Store Connect File Sizes diff --git a/includes/size-analysis/binary-code-signature.mdx b/includes/size-analysis/binary-code-signature.mdx deleted file mode 100644 index 8153274c51102..0000000000000 --- a/includes/size-analysis/binary-code-signature.mdx +++ /dev/null @@ -1,19 +0,0 @@ -Mach-O binaries contain code signature data within the `LC_CODE_SIGNATURE` load command which itself contains `SHA1` and/or `SHA256` hashes of every page block. This means the size of this data will scale linearly with the size of your binary. - -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 codesigns with 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. - -If you'd like to compare the impact of this on your app, you can re-sign each binary before uploading to Sentry: - -```bash -# Inspect the current code signature -codesign -dvvv '/path/to/your/binary' - -# Re-sign with a new code signature -codesign --force \ - --sign 'Apple Distribution: Your Team (team_id)' \ - --digest-algorithm sha1 \ - --digest-algorithm sha256 \ - '/path/to/your/binary' -``` - -This will force both `SHA1` and `SHA256` hashes to be used. diff --git a/includes/size-analysis/code-signature.mdx b/includes/size-analysis/code-signature.mdx new file mode 100644 index 0000000000000..01c846cc23817 --- /dev/null +++ b/includes/size-analysis/code-signature.mdx @@ -0,0 +1,19 @@ +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. + +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. + +If you'd like to compare the impact of this on your app, you can re-sign your app before uploading to Sentry: + +```bash +# Inspect the current code signature +codesign -dvvv '/path/to/your/app.app' + +# Re-sign with a new code signature +codesign --force \ + --sign 'Apple Distribution: Your Team (team_id)' \ + --digest-algorithm sha1 \ + --digest-algorithm sha256 \ + '/path/to/your/app.app' +``` + +This will force both `SHA1` and `SHA256` hashes to be used. diff --git a/includes/size-analysis/watch-architecture-thinning.mdx b/includes/size-analysis/watch-architecture-thinning.mdx new file mode 100644 index 0000000000000..6a6b44d9f7326 --- /dev/null +++ b/includes/size-analysis/watch-architecture-thinning.mdx @@ -0,0 +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.