Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload to Apple App Store (Universal macOS Binary required, signing issues) #1599

Closed
2 of 3 tasks
Thomas-Vos opened this issue Dec 15, 2021 · 12 comments
Closed
2 of 3 tasks
Assignees
Labels

Comments

@Thomas-Vos
Copy link
Contributor

Thomas-Vos commented Dec 15, 2021

To be able to upload a Compose for Desktop app to the Apple App Store, there are multiple issues that need to be resolved.

Universal macOS Binary (optional)

To be able to support both Intel and ARM64 Macs natively, there needs to be a way to build a Universal pkg (Intel + ARM64). That is needed to be able to upload it to the Apple App Store. The only alternative for now is to upload an Intel-only app.

Screenshot 2021-12-15 at 19 56 49

I tried adding both compose.desktop.macos_arm64 and compose.desktop.macos_x64 dependencies as suggested on Slack. However, the produced app is still not Universal.

I am building the project on an M1 Mac with an ARM64 JDK. When doing a right click and get info on the produced .app it shows Apple Silicon instead of Universal.

Furthermore, I am not sure what to do about the bundled JRE. Would I need to include it twice (for Intel and for ARM64) or so?

Slack discussion: https://kotlinlang.slack.com/archives/C01D6HTPATV/p1639570539349100

Found some information on this here: https://bugs.openjdk.java.net/browse/JDK-8266259

@akurasov akurasov self-assigned this Dec 15, 2021
@akurasov akurasov changed the title How to build a Universal macOS Binary? How to build a Universal macOS Binary (this is mandatory to place app to AppStore)? Dec 15, 2021
@Thomas-Vos
Copy link
Contributor Author

Thomas-Vos commented Dec 15, 2021

Just wanted to add that it is not technically mandatory for the App Store, as I think you can still upload Intel only apps at this time. However, if you want the app to run natively on M1 Macs, you are required to build a Universal app with support for both architectures.

@Thomas-Vos Thomas-Vos changed the title How to build a Universal macOS Binary (this is mandatory to place app to AppStore)? Upload to Apple App Store (Universal macOS Binary required, signing issues) Dec 15, 2021
@Thomas-Vos
Copy link
Contributor Author

I am working on support for the Apple App Store. Could use some guidance on this if possible. See #1613

@Thomas-Vos
Copy link
Contributor Author

Does anyone have any idea how to fix the univeral binary issue? Intel and ARM64 in one binary.

@akurasov akurasov added this to the 1.1 milestone Jan 10, 2022
@Thomas-Vos
Copy link
Contributor Author

It is now possible to upload apps to the App Store now that #1613 is merged. However, TestFlight is not working and universal binaries are not supported. Any suggestions?

@Thomas-Vos
Copy link
Contributor Author

Thomas-Vos commented Feb 6, 2022

I opened a TSI with Apple and am working with them to get the TestFlight issues resolved. They were able to provide me with more detailed error message, so I am working on that.

Already opened some PRs with other related fixes: #1797, #1798, #1799

@Thomas-Vos
Copy link
Contributor Author

Got TestFlight working thanks to Apple's help with the remaining errors. See #1812.

Screenshot 2022-02-08 at 17 35 20

@akurasov
Copy link
Contributor

@Thomas-Vos is there anything left for this task?

@Thomas-Vos
Copy link
Contributor Author

@akurasov both the App Store and TestFlight are functional. However, there is no native support for the Apple M1 chip. For the App Store, a universal binary (Intel + ARM64) is required to support M1 natively as you can only upload one binary. As a workaround for now, Intel only apps can be uploaded. They can run on M1 with Rosetta 2, but of course native support is much better (and maybe even required in the future). So that is still an open issue.

@akurasov
Copy link
Contributor

I think these are a bit different issues. What you are saying - we need to publish Skiko and Compose for MacOS M1, right?

@akurasov akurasov modified the milestones: 1.1, 1.2 Feb 18, 2022
@igordmn igordmn removed this from the 1.2 milestone May 26, 2022
@Thomas-Vos
Copy link
Contributor Author

Apple approved my Compose app for the Mac App Store: https://apps.apple.com/app/id1462943921

TestFlight builds are also working great. Now all that is missing is a universal build so that M1 is supported natively.

@igordmn igordmn removed the AK label Oct 11, 2022
@kenyee
Copy link

kenyee commented Oct 3, 2023

This complicates builds too...e.g., M1 Mac Minis are typically used in CI, but we can't built an Intel binary on those. Binaries built on an M1 Mac can't run on an Intel Mac.

dima-avdeev-jb pushed a commit that referenced this issue Feb 26, 2024
Hi all 👋 

I recently tried to publish my macOS app to the App Store and the
publishing failed because I wasn't including an Intel version
<img width="609" alt="Screenshot 2024-02-04 at 17 31 52"
src="https://github.com/JetBrains/compose-multiplatform/assets/9467705/a3f421ed-ca77-460b-bc2e-7ceafb3ca1c0">

The alternative could be publishing a Universal binary, but it's not
quite supported now (see #1599). But by setting the minimum version of
macOS to 12, it's possible to upload only arm version.

So, I've added the possibility of changing the minimum macOS version.
@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants