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

M1 Mac Support #16

Closed
KRTirtho opened this issue Feb 2, 2022 · 23 comments
Closed

M1 Mac Support #16

KRTirtho opened this issue Feb 2, 2022 · 23 comments
Labels
deployed This issue has been fixed/implmented and has been released enhancement New feature or request

Comments

@KRTirtho
Copy link
Owner

KRTirtho commented Feb 2, 2022

Is there a way you can make the app a universal app (aka add support for m1) instead of only an intel app?

Originally posted by @highjeans in #9 (comment)

@KRTirtho KRTirtho added the enhancement New feature or request label Feb 2, 2022
@KRTirtho
Copy link
Owner Author

KRTirtho commented Feb 2, 2022

@highjeans, The M1 Mac Support can take a bit of time. Currently have no way to build the app on ARM architecture due to github action only supports x86_64 runners. If you've a M1 mac, you can contribute to the project

@highjeans
Copy link
Contributor

I am currently on an M1 Mac, so yes I can do that.

@highjeans
Copy link
Contributor

Can you add me as a contributor? I will need that in order to do anything.

@KRTirtho
Copy link
Owner Author

KRTirtho commented Feb 2, 2022

I don't have to. You can fork the project & then do modifications/enhancements you want to. Then create a PR.
I'll then review it & merge accordingly
For further help see: Your First Code Contribution

@highjeans
Copy link
Contributor

So I was able to get an arm version compiled, but the way to do it was to change a file that was generated when we ran flutter build macos.

@highjeans
Copy link
Contributor

Seems like we have to wait until building for arm is supported natively as changing the generated file caused tons of errors.

@KRTirtho KRTirtho added this to the Version 2.0.0 milestone Feb 8, 2022
@KRTirtho
Copy link
Owner Author

M1 Mac support is now only not possible due to unavailability of MacOS VM support with M1 hardware in Github Actions actions/runner-images#2187

@KRTirtho KRTirtho removed this from the Version 2.0.0 milestone Mar 23, 2022
@highjeans
Copy link
Contributor

It doesn't matter if M1 hardware is required, it matters if flutter can build an M1 version or a universal version or not

@KRTirtho
Copy link
Owner Author

M1 is supported natively in Flutter we just don't have the hardware/VMs to build the app now

@highjeans
Copy link
Contributor

@KRTirtho I just learned that flutter 3 now build universal binaries, so I think building for m1 should work now

@KRTirtho
Copy link
Owner Author

@highjeans That's great. Can you try running Spotube with Flutter 3 since I don't have a m1 mac?

@karniv00l
Copy link
Contributor

karniv00l commented May 13, 2022

@KRTirtho currently the build it's failing because of this I believe: bitsdojo/bitsdojo_window#169

What I did:

flutter upgrade
flutter clean
flutter pub get
flutter build macos --release

Similar output as: flutter/flutter#103571 (comment)

@highjeans
Copy link
Contributor

highjeans commented May 13, 2022

@karniv00l There is a pull request regarding the issue: bitsdojo/bitsdojo_window#155

@highjeans
Copy link
Contributor

@KRTirtho I tried building it through Github Actions and it failed from the same issue in bitsdojo.

@KRTirtho
Copy link
Owner Author

That's great news. Now we've to wait

@KRTirtho
Copy link
Owner Author

M1 Mac support (through Rosetta) was added by #87. Thanks to Flutter 3.0 MacOS Universal binary package support, the M1 Mac executable is available now
Can you see if the latest version 2.3.0 works or not?

@karniv00l
Copy link
Contributor

It's been working fine via Rosetta for some time. I believe this issue can be closed, native arm64/universal binary it's a different story though (no M1 machines available yet in GH actions)

@KRTirtho
Copy link
Owner Author

@karniv00l Yeah, native M1 macs gonna take a while
Btw, can you check if Media Controls in MacOS works or not?

@karniv00l
Copy link
Contributor

It's working great!

Screenshot 2022-07-11 at 11 10 14

However, there are a couple of UI quirks, some of them related to mac:

Screenshot 2022-07-11 at 11 11 10

I might open a new issue for others, so I don't clog up this thread, but generally try to test some views while resizing.

@KRTirtho
Copy link
Owner Author

Glad to hear that.... Thanks 👍

@yoyo930021
Copy link

yoyo930021 commented Jul 15, 2022

I'm not sure I've misunderstood anything, but I download v2.3.0 and use it.

It was a native apple silicon app in the system monitor app.
It works well.
截圖 2022-07-15 下午5 58 37

@karniv00l
Copy link
Contributor

Oh yes! You don't actually need M1 to build the universal binary, so the latest release (2.3.0) that I've just tested is actually universal:

$ file spotube.app/Contents/MacOS/spotube

spotube.app/Contents/MacOS/spotube: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64
- Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64
- Mach-O 64-bit executable arm64]
spotube.app/Contents/MacOS/spotube (for architecture x86_64):	Mach-O 64-bit executable x86_64
spotube.app/Contents/MacOS/spotube (for architecture arm64):	Mach-O 64-bit executable arm64

@KRTirtho
Copy link
Owner Author

Wow, we unknowingly have support for M1 Mac! Maybe that's because Flutter 3.0 now builds & ships Universal Binaries by default. That's just awesome

@KRTirtho KRTirtho closed this as completed Mar 8, 2023
@KRTirtho KRTirtho added the deployed This issue has been fixed/implmented and has been released label Mar 8, 2023
@lorypelli lorypelli mentioned this issue Sep 21, 2024
2 tasks
@skruglov2023 skruglov2023 mentioned this issue Oct 9, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed This issue has been fixed/implmented and has been released enhancement New feature or request
Projects
Status: Deployed
Development

No branches or pull requests

4 participants