-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
fix: add visionOS x64 #216
Conversation
That sounds weird. Iirc developing for vision is possible only on arm Macs. |
Totally agree that this is weird and this shouldn't be the case but you can easily check this by running a release build for the simulator, as you can see on the screenshot it builds for both archs (Im on M1 mac): |
I believe it's a problem in your project file. For example, by default it sets "build active architecture only" only for debug build. Was this xcode project generated by cmake? |
Nope, this project wasn't generated by CMake but it shouldn't matter. I can test out again with build only active arch but the x64 build was also triggered when archiving the app for AppStore release. If you google this issue you will find similar cases, for example this: https://forums.swift.org/t/archiving-swift-package-that-supports-visionos-requires-x86-64-architecture/71964 |
now that's funny! :) will check on a test project to see if it's reproducible |
I think support for running visionOS for intel is going to be dropped soon so Im not sure if adding this makes sense for the long term. Have you tried archiving the app? Does the archive process take into account excluded architectures? |
fully agree
archiving from Xcode does build both archs regardless of those settings which is also strange. However, archiving from command line builds only arm64 even without those settings, tried with the following 2 commands:
(the difference is only in additional |
@kambala-decapitator Thanks for checking this out. So what's your suggested resolution of this issue?
This was my original issue which persists for Xcode 16, maybe we can temporairly support this in ios-cmake until this behaviour isn't removed from Xcode? I don't think adding Intel support makes sense as we mentioned. But I think getting |
building for simulator in release mode is a rather rare use case afaik (oh, unless it's a library/framework), and building for visionOS simulator on Intel is even rarer. As you can see, archiving from command line workarounds the issue.
not sure why. Pretty sure Xcode cloud builds stuff using command line. but anyway, I'm not a maintainer, @leetal should decide. |
But if you have library/framework that you provide for your users and then they build for the AppStore you need to have the x86 slice for the build to succeed. In that case building with the CLI won't fix it |
um, what?.. AppStore requires only device archs and Intel is simulator-only. Also don't understand how CLI wouldn't work it around since you can do the same there as what Xcode GUI does. |
As we discussed before, during archiving (for AppStore) Xcode is building x86 architecture of the App. If your You can ask users of your framework to "use the cli" but it is an inconvenience for them |
if I understand correctly, this is your bug report. One doesn't use simulator destination when building/archiving for App Store - instead device destination should be used. |
Oh okay sorry I got confused, you are right. This doesn't happen when archiving for the AppStore. So this happens only if you are building your app for release targeting the simulator. We've got two use cases:
So this change would be mostly targeted at framework authors/maintainers. I don't think this change would cause any issues but can save some headache from library maintainers |
I believe that >= 95% of library maintainers already have build scripts to automate things :) |
Okay, after thinking about this let's leave this as is. I'm going to close the PR and just don't ship x86 slice in our framework. Thanks for your help |
This PR adds
SIMULATOR64_VISIONOS
and modifiesVISIONOSCOMBINED
to also include x86_64 slice for visionOS simulator.It looks like Apple still requires us to build an x86_64 slice when working with the Release build on the simulator.