ryanmcgrath/cacao

How to publish an app

dominikwilkowski opened this issue ยท 6 comments

Touched on in #19 I think it would be super useful to describe a way to compile your rust code with xcode to get code-signing to work and publish it in either app store (macOS and iOS).
Using cargo-bundle gives us the bundle but I have not found a way to use it to code sign the binary for distribution.
I have seen xcode templates for running rust but they seem all outdated and not working well.
I feel like that might be the last bit for an end-to-end dev cycle for cacao.

Mmmm, you don't need to use xcode for code-signing and submission. You can refer to a basic example here:

https://github.com/secretkeysio/subatomic/blob/trunk/release

You may also need to notarize your app. This can be done outside of Xcode as well (and I think there's actually a new/better way to do it as of Big Sur), but the way I've historically done it can be seen in project-slippi's CI scripts:

https://github.com/project-slippi/Ishiiruka/blob/slippi/Tools/notarize_netplay.sh

You can then submit to the app store by using e.g Transporter

It's just a matter of setting up your signing certs/etc correctly, but that's the name of the game with Apple. :)

Also keep in mind that certain things are different in app-store apps (sandboxing, etc). I would be sure to enable the necessary entitlements and test in release mode with a signed + notarized build before submission.

(Wrong button, leaving this open - will close it if someone wants to PR a guide on doing this, as I've simply no time to do so myself right now)

There's also the apple-codesign project, a pure Rust tool for doing both code-signing and notarization.

Ah, right! I always forget about that one for some reason.

These are all very good resources that would be super valuable for a consumer to have. I'll see how I go in using them and then maybe have some time to write it all up where ever the appropriate place for that would be