fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.14k stars 1.4k forks source link

Support Apple intel apps on M1/2 (using Rosetta) #3971

Open andydotxyz opened 1 year ago

andydotxyz commented 1 year ago

Checklist

Is your feature request related to a problem?

Many macOS bugs have been raised about crashing on M1/2 that are not actually running the arm64 build. We have fixed the known issues for M1/2 and some of these require architecture specific compilation. With this set up the apps cannot know that they are intel being simulated on M1 and hence exhibit the bugs which we have already fixed.

Should we do this or should we not? Should Rosetta be fully supported? It is worth noting that we have a similar category of bugs with WSL2 where people are coding linux apps on Windows instead of Windows directly. This is a can of worms and we have to decide if it is supported or not and stick to that.

Is it possible to construct a solution with the existing API?

Yes, compile for M1/2 instead of intel build run through emulation.

Describe the solution you'd like to see.

A decision that is put onto a "supported platforms" page and, if required, a solution found to the bugs which currently exist when using the emulation layer.

Jacalz commented 1 year ago

To be fair, the reason that I want Rosetta to be supported is mostly because of arm64 binaries appear broken unless you remove the quarantine flag. If we can manage to get the binaries signed without each developer needing a costly apple developer account, I'd be rather happy without Rosetta support as well.

andydotxyz commented 1 year ago

If we can manage to get the binaries signed without each developer needing a costly apple developer account, I'd be rather happy without Rosetta support as well.

I'm not sure that this is possible without an Apple developer account. Apple is checking the signature of the binary, and it is against terms to have a certificate that distributes applications for another organisation. If Fyne tried to sign apps with it's own certificate for distribution our account would be banned.

andydotxyz commented 1 year ago

However it may be possible to improve things slightly so instead of being deleted it is just warned as unsafe... Notarizing old or unsigned apps may be possible... https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution

However you do still need an Apple developer account it seems. But perhaps we can avoid the payment part?

Jacalz commented 1 year ago

If possible that would be good as well. Making it work like on amd64 without being marked as "broken" would be nice.