compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

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

Open Thomas-Vos opened this issue 3 years ago • 10 comments

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)
  • [x] Signing for Mac App Store (required) #1613
  • [x] Fix TestFlight builds (optional) #1812

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

Thomas-Vos avatar Dec 15 '21 16:12 Thomas-Vos

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 avatar Dec 15 '21 17:12 Thomas-Vos

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

Thomas-Vos avatar Dec 16 '21 23:12 Thomas-Vos

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

Thomas-Vos avatar Jan 10 '22 14:01 Thomas-Vos

It is now possible to upload apps to the App Store now that https://github.com/JetBrains/compose-jb/pull/1613 is merged. However, TestFlight is not working and universal binaries are not supported. Any suggestions?

Thomas-Vos avatar Jan 18 '22 18:01 Thomas-Vos

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 avatar Feb 06 '22 23:02 Thomas-Vos

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

Screenshot 2022-02-08 at 17 35 20

Thomas-Vos avatar Feb 08 '22 16:02 Thomas-Vos

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

akurasov avatar Feb 16 '22 13:02 akurasov

@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.

Thomas-Vos avatar Feb 18 '22 00:02 Thomas-Vos

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

akurasov avatar Feb 18 '22 10:02 akurasov

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.

Thomas-Vos avatar Jul 12 '22 15:07 Thomas-Vos

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.

kenyee avatar Oct 03 '23 17:10 kenyee