Last active
August 13, 2024 23:27
-
-
Save omarzl/3dd13e82fe318271a377fab664ae955b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Pluginfile | |
gem 'xcode-install' | |
- Fastfile | |
platform :ios do | |
desc "Xcode install" | |
lane :install_xcode do | |
xcode_install( | |
version: "#{ENV['XCODE_VERSION']}", | |
username: "[email protected]" | |
) | |
end | |
end | |
- install_xcode.sh | |
export FASTLANE_SESSION="a_valid_session" | |
export XCODE_VERSION="13.3.1" | |
# Installs Xcode | |
bundle exec fastlane install_xcode | |
# Changes CLT to new Xcode | |
sudo xcode-select -s /Applications/Xcode-$XCODE_VERSION.app | |
# Validates Xcode version | |
/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" /Applications/Xcode-$XCODE_VERSION.app/Contents/Info.plist | |
# Validates CLT path | |
xcode-select -p | |
# Validates swift version | |
swift --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment