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

visionOS SDK not installed on macOS 13 runner when using Xcode 15 #8144

Closed
2 of 10 tasks
calda opened this issue Aug 23, 2023 · 23 comments
Closed
2 of 10 tasks

visionOS SDK not installed on macOS 13 runner when using Xcode 15 #8144

calda opened this issue Aug 23, 2023 · 23 comments

Comments

@calda
Copy link

calda commented Aug 23, 2023

Description

When using the macOS 13 runner with Xcode 15, the visionOS SDK is not installed.

When attempting to run a command like xcodebuild build -scheme MyScheme -destination generic/platform=visionOS, it fails with the following error (example failure):

{ platform:visionOS, id:dvtdevice-DVTiOSDevicePlaceholder-xros:placeholder, name:Any visionOS Device, error:visionOS 1.0 is not installed. To use with Xcode, first download and install the platform }

This is because the visionOS SDK is not included by default in Xcode 15, and has to be downloaded separately (like the iOS and tvOS SDKs).

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image: macos-13
Version: 20230821.3
Included Software: https://github.com/actions/runner-images/blob/macos-13/20230821.3/images/macos/macos-13-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20230821.3

Is it regression?

No

Expected behavior

I expect the visionOS SDK to be installed by default on the macOS 13 runner when using Xcode 15, like other Apple platform SDKs (iOS, tvOS, watchOS).

Actual behavior

I expect the visionOS SDK to be installed by default on the macOS 13 runner when using Xcode 15, like the other Apple platform SDKs.

Repro steps

Attempt to build an Xcode project for the visionOS destination (-destination generic/platform=visionOS), for example:

xcodebuild build -scheme "Lottie (visionOS)" -destination generic/platform=visionOS -workspace Lottie.xcworkspace

https://github.com/airbnb/lottie-ios/actions/runs/5956146043/job/16156293405?pr=2152

@Alexey-Ayupov
Copy link
Collaborator

Hello @calda, we will take a look.

@ilia-shipitsin
Copy link
Contributor

ilia-shipitsin commented Aug 24, 2023

we install SDKs as xcodebuild -downloadAllPlatforms, seems visionOS needs to be downloaded separately as xcodebuild -downloadPlatform visionOS

also, XCode 15 Beta 7 was released. Hopefully, we'll release visionOS SDK together with Beta 7

@ilia-shipitsin
Copy link
Contributor

@calda ,can you help me to check ?

I created test image with visionOS SDK.

git clone https://github.com/airbnb/lottie-ios
cd lottie-ios/
xcodebuild build -scheme MyScheme -destination generic/platform=visionOS

output

Command line invocation:
    /Applications/Xcode-15.0.0-Beta.7.app/Contents/Developer/usr/bin/xcodebuild build -scheme MyScheme -destination generic/platform=visionOS

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph

Fetching from https://github.com/pointfreeco/swift-snapshot-testing.git

Fetching from https://github.com/krzysztofzablocki/Difference

Creating working copy of package ‘Difference’

Checking out 1.0.2 of package ‘Difference’

Creating working copy of package ‘swift-snapshot-testing’

Checking out 0c2826f26d00ff5ddf2de92cb6b2139b0dd3d1ee of package ‘swift-snapshot-testing’


Resolved source packages:
  swift-snapshot-testing: https://github.com/pointfreeco/swift-snapshot-testing.git @ 0c2826f
  Difference: https://github.com/krzysztofzablocki/Difference @ 1.0.2

2023-08-25 08:53:39.219 xcodebuild[5652:28389] Writing error result bundle to /var/folders/rt/x00qb5ls0zb9nhklqtxg4qy40000gn/T/ResultBundle_2023-25-08_08-53-0039.xcresult
xcodebuild: error: The project named "Lottie" does not contain a scheme named "MyScheme". The "-list" option can be used to find the names of the schemes in the project.

did I miss some build step ?

@ilia-shipitsin
Copy link
Contributor

nevermind, I built using bundle exec rake build:package:all

@calda
Copy link
Author

calda commented Aug 25, 2023

Yeah, that one works. Other options include:

  • bundle exec rake build:package:visionOS
  • xcodebuild build -scheme "Lottie (visionOS)" -destination generic/platform=visionOS -workspace Lottie.xcworkspace

@mikhailkoliada
Copy link
Contributor

Hi all, given that the xcodebuild -downloadAllPlatform invocations seems yet to be buggy in Xcode 15.0 the only alternative would be to install it via xcodes utility in runtime (beware that it is a 3rd party package so nobody guarantees its overall stability).

1 brew install xcodesorg/made/xcodes
2 xcodes runtimes install 'visionOS 1.0 Beta 2'

we will continue tracking Xcode changes to make vision OS a part of the image (hopefully before macOS 13 goes GA)

@calda
Copy link
Author

calda commented Sep 12, 2023

I see the Xcode 15.0 release candidate has been published. Unlike the betas, the RC doesn't include the visionOS SDK. Perhaps this is why the behavior of xcodebuild -downloadAllPlatform hasn't been updated yet.

In the meantime, we've started using the xcodes runtimes install workaround @mikhailkoliada suggested.

To enable folks to continue using the visionOS SDK in GitHub actions jobs, could the team leave an Xcode 15 beta available on the macOS 13 image, in addition to the Xcode 15 RC / production version? That would be very helpful for us.

@ilia-shipitsin
Copy link
Contributor

some news from our side, we've found better way of installing visionOS, currently we are going to release updated image with visionOS added.

thanks for bringing that to attention, Apple indeed says

Xcode 15 Release Candidate enables you to develop, test, and distribute apps for all Apple platforms. You can download the platforms you would like to develop for directly from Xcode. For development with the visonOS 1 SDK, continue to use Xcode 15 beta 8.

@ilia-shipitsin
Copy link
Contributor

@calda, as for software policy we install only three latest avaiable versions. sorry, no "rc" is possible together with "beta 8"

@ilia-shipitsin ilia-shipitsin added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Sep 13, 2023
@mikhailkoliada mikhailkoliada removed the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Sep 15, 2023
@calda
Copy link
Author

calda commented Sep 25, 2023

As of #8282 it is no longer possible to build for the visionOS SDK using the above workaround

@vfilyakov
Copy link

Any updates here? Maybe we can have Xcode-beta.app deployed alongside Xcode 15 so we can still build for visionOS?

@ilia-shipitsin
Copy link
Contributor

@vfilyakov , do you know what is the official Apple support for visionOS ? will it eventually be added to XCode 15 ?

@ilia-shipitsin
Copy link
Contributor

Any updates here? Maybe we can have Xcode-beta.app deployed alongside Xcode 15 so we can still build for visionOS?

I would ask @mikhailkoliada if that is possible or not

@mikhailkoliada
Copy link
Contributor

We are going to provide Xcode versions according to our software policy, eventually visioonOS will be included in the release too by apple

@vfilyakov
Copy link

Looks like Xcode 15.1 Beta has support for visionOS:
https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes

Considering that Apple plans to release Vision Pro in Q1 2024, we should have the release version of visionOS 1.0 in some release version of Xcode 15.x before that (hopefully). But for now we will have to deal with betas, looks like.

We are going to provide Xcode versions according to our software policy

@mikhailkoliada What is the official policy here in regard to Xcode betas? Would be beneficial to hear the plan for this...

@ilia-shipitsin
Copy link
Contributor

btw, I installed XCode 15.1, visionOS was installed together with XCode.

@calda
Copy link
Author

calda commented Oct 5, 2023

We can't predict with certainty what Apple will release in the future, but my expectation currently (based on the Xcode 15.0 release) is that:

  • the Xcode 15.1 betas will include the visionOS SDK beta (like the Xcode 15.0 betas)
  • the final Xcode 15.1 release will not include the visionOS SDK beta (like the final Xcode 15.0 release).

Adding the Xcode 15.1 beta to GitHub actions would allow us to use the visionOS SDK again, up until when that beta is removed from the macOS runner.

@vfilyakov
Copy link

@mikhailkoliada Now that you guys decided not to deal with Xcode 15.1 betas, what is a path forward to be able to build visionOS code? Can we have Xcode 15.0 beta instead to cover this for now?

@mikhailkoliada
Copy link
Contributor

Due to Xcode 15.x performance degradation there is no plans to add any new betas to the image until at least 15.2 beta is out, we are aware of the fact that visionOS sdk is missing right now but try not to make the situation worse for customers. Generally I am going to close the issue as there is nothing actable for us to do, but we will keep the images updated as soon as we can.

@saagarjha
Copy link

saagarjha commented Jan 20, 2024

For those who stumble upon this in the future:

defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS

Shove this in your script before you do anything and it'll work, at least it did when I tested against Xcode 15.2.

@calda
Copy link
Author

calda commented Jan 20, 2024

Wow, thank you @saagarjha! This works for us: airbnb/lottie-ios#2287

Although there's a typo in your comment -- cxcodebuildt.Xcode should be com.apple.dt.Xcode:

defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS

@saagarjha
Copy link

Oops, yes. Not sure how I messed that up…

@dreampiggy
Copy link

dreampiggy commented Feb 13, 2024

This saves for me.

But oneday I'll consider to move to paid macos-13-xlarge runner...Currently no any free arm64 based runner to run visionOS for open-source project (I actually don't care about time or performance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@calda @dreampiggy @saagarjha @mikhailkoliada @Alexey-Ayupov @ilia-shipitsin @vfilyakov and others