xcpretty / xcode-install

πŸ”½ Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

[!] Cannot find an installed Xcode satisfying '13.0' using MacOS 11.7 #469

Open bouthainaghachem opened 2 years ago

bouthainaghachem commented 2 years ago

Hello,

I'm facing issues with new image version runner updated two days ago under MacOS 11.7 (ref: https://github.com/actions/runner-images/blame/main/images/macos/macos-11-Readme.md)

It's mentionned under the documentation that MacOS 11 still supporting XCode 13.0 version. I'm setting under my fastlane file the xcversion(version: "13.0")

but I'm getting the following error : [!] Cannot find an installed Xcode satisfying '13.0' :

+------+----------------------------+-------------+ | fastlane summary | +------+----------------------------+-------------+ | Step | Action | Time (in s) | +------+----------------------------+-------------+ | 1 | Verifying fastlane version | 0 | | 2 | default_platform | 0 | | πŸ’₯ | xcversion | 0 | +------+----------------------------+-------------+

[16:24:26]: fastlane finished with errors

[!] Cannot find an installed Xcode satisfying '13.0'

[error]Bash exited with code '1'.

Finishing: Build app

rogerluan commented 2 years ago

Hi πŸ‘‹ Have you tried running bundle exec xcversion update to update the local list of xcode versions? Run bundle exec xcversion list to see the list of Xcode versions your machine knows of, and then run …update to update that list to the latest one available

bouthainaghachem commented 2 years ago

Hello,

Thanks for your reply. I added a script under my fastfile to update xcode verison like following :

desc "Install/Update Xcode" lane :install_xcode do

Fetch all available Xcode versions

sh("xcversion update")

end

But I'm facing new error :

Screen Shot 2022-10-27 at 6 22 38 PM

I checked : https://github.com/fastlane/fastlane/tree/master/credentials_manager , and I have added, FASTLANE_USER FASTLANE_PASSWORD with no success. Any recommendation from your end @rogerluan.

rogerluan commented 2 years ago

@bouthainaghachem idk why the env vars aren't working, but if you're logging in using email/pass you'll certainly need 2FA codes which then it will certainly not work that way.

But looks like you're attempting to use this all in CI, is there any particular reason for that? Wouldn't simply running this in a one-off case, manually, using xcversion CLI (and not a fastlane action) help you?

If not, and you really need to run this continuously on CI, I would recommend checking out this WIP document: https://github.com/xcpretty/xcode-install/blob/master/MIGRATION.md alongside the new action listed here: https://github.com/fastlane/fastlane/pull/20672 (follow the instructions in the PR description to know how to install it πŸ™ )

Hopefully that should resolve your issues πŸ™

bouthainaghachem commented 1 year ago

@rogerluan I'm running this on CI because I don't have Gemfile configured under the project and we don't use .yaml files. We use the graphical methode under Azure pipelines to configure the CI. Thanks for links I'll check and back to you if I have further questions.