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

Apple Silicon build? #767

Closed
ngocphamm opened this issue Jan 8, 2021 · 10 comments
Closed

Apple Silicon build? #767

ngocphamm opened this issue Jan 8, 2021 · 10 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@ngocphamm
Copy link

Do you think it'd be possible to have a native build of the app for Apple Silicon?

I have a new mac mini to test it if you want. Please let me know.

Thank you for making such a great app!

Best,
Ngoc

@ngocphamm ngocphamm added the enhancement New feature or request label Jan 8, 2021
@lwouis
Copy link
Owner

lwouis commented Jan 9, 2021

Another user said something similar on Discord:

Just dropping by to thank @lwouis for the awesome app. Have been using with Apple Silicon for the past 3 weeks without any issues. I look forward to when the app will support arm natively!

I replied:

Glad to hear this! I've no idea how the new arch impact the ecosystem. Is there some kind of universal app, or would we need to release 2 separate apps going forward? If you have a good link for what's involved, I'm interested. I may also interact and be combined with this issue: #158

@lwouis
Copy link
Owner

lwouis commented Jan 9, 2021

I'm guessing that building a native Apple Silicon app is as easy as flipping a switch in XCode. The issues are around distribution. See the reason #158 is not already implemented. Many problems arise when we go from 1 universal release to multiple releases for multiple platforms.

I've interested in hearing proposals though

@ngocphamm
Copy link
Author

I honestly have no idea either as I don't do iOS/macOS dev. I was just curious if you know what it takes to have the universal build for this app. Currently, it's running just fine (so far) on the M1 I have. I was just thinking the universal build would probably somewhat faster, just like almost any other apps when they moved to support Apple Silicon natively.

@PolCPP
Copy link

PolCPP commented Jan 15, 2021

@lwouis Just got an m1 and tried to build locally. It compiles fine on my mbp 16 but the m1 seems to have linker problems on app center.

ld: warning: ignoring file /Users/polcpp/Downloads/alt-tab-macos-master-2/Pods/AppCenter/AppCenter-SDK-Apple/macOS/AppCenterCrashes.framework/AppCenterCrashes, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/polcpp/Downloads/alt-tab-macos-master-2/Pods/Sparkle/Sparkle.framework/Sparkle, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

Seems to be related to this microsoft/appcenter-sdk-apple#2111
(TLDR app center pod is not working, you need to get the framework as a GitHub asset, which I guess makes distribution harder)

@lwouis
Copy link
Owner

lwouis commented Jan 15, 2021

@PolCPP Have you seen the PR? It bumps AppCenter's version to get support for ARM.

Note that other pods are not ready for ARM, thus blocking us from delivering a Universal App: #771 (comment)

@PolCPP
Copy link

PolCPP commented Jan 15, 2021

Duh! Forgot to check it out.

Actually it compiled and it's kinda running. Don't have rosetta installed yet so its working natively? O_o

But I had to comment out this line GeneralTab.swift, otherwise I would get segmentation faults.

let _ = LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst.takeRetainedValue(), nil, nil, itemUrl, nil, nil).takeRetainedValue()

@lwouis
Copy link
Owner

lwouis commented Jan 19, 2021

Actually it compiled and it's kinda running. Don't have rosetta installed yet so its working natively? O_o

Apple docs mention this command to test the architectures in the binary:

lipo -archs /System/Applications/Mail.app/Contents/MacOS/Mail
x86_64 arm64

I suggest you run this lipo command and see what you get

@PolCPP
Copy link

PolCPP commented Jan 19, 2021

% lipo -archs /Applications/AltTab.app/Contents/MacOS/AltTab
x86_64 arm64

@lwouis
Copy link
Owner

lwouis commented Jan 20, 2021

Ok so it's universal. Normally when you build in Debug, it creates a native build. Another way to make sure is to change the Architecture setting in XCode, build again, comfirm with lipo that there is only arm and run 👍

@lwouis
Copy link
Owner

lwouis commented Mar 21, 2021

Closing this as duplicate of #771. Let's keep the conversation there 👍

@lwouis lwouis closed this as completed Mar 21, 2021
@lwouis lwouis added the duplicate This issue or pull request already exists label Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants