google / google/j2objc

Size of JRE.xcframework exceeds 75MB limit of appstoreconnect

Open
#2,241 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6k
Forks
999
Avg merge
19h 20m
Merged PRs (30d)
14

Description

I'm using the JRE.xcframework in my own framework. I've built the JRE.xcframework for arm64_32 and armv7k. I can see that that all worked well, because there is a corresponding folder. So my full set up is: My project -> links my framework -> links JRE.xcframework

When uploading my app, is not exceeds the 75MB treshold by a tiny margin:
"ITMS-90389: Size limit exceeded - The size of the watchOS variant at "/Payload/Surfr..app/Watch/Surfr..app" is 75MB, which exceeds the maximum allowable size of 75MB after app thinning. For details about reducing your app's size, view: https://developer.apple.com/documentation/xcode/reducing-your-app-s-size"

I followed the instructions and indeed found out that in some of the thinned IPA's there is a Surfr..app in the Payload/Watch folder of 75.8 mb. This is mainly because of the linked binary of the JRE.xcramework, which is already 68MB (approx 32mb per architecture). If I remove one of the architectures (and build JRE.xcframework, my framework , and my app again) than the size of the Payload/Watch/Surfr..app drops to 43MB.

It seems like my thinned IPA's aren't really thinned/splitted per architecture. I would expect that one of my thinned IPA's would never contain more than one architecture.

What is expected here and how can I resolve this issue so that in my thinned IPA's only one architecture is included and I'm not exceeding the appstore limit?

Here a picture of the linked JRE.xcframework, which make my watch IPA increase with 68MB, because the JRE.xcframework contains two frameworks.

Screen Shot 2023-11-23 at 08 39 09

Here the actual problem, a 75.8MB watch IPA within my app archive bundle (thinned ipa's). If I built the JRE.xcframework for, for example only ARM64_32, then the size drops to +- 40MB. But appstore requires both ARM64_32 and ARMv7k so dropping an architecture is not an option. My main question is though, why does including an extra architecture lead to lineair increase in IPA size. I would expect that the app splitting/thinning proces would take care of that and the IPA would be splitted per architecture.

Screen Shot 2023-11-23 at 08 41 06

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.