Open RicardoKoch opened 5 years ago
+1. Some CI configurations have multiple Xcode apps installed and actually don't have /Applications/Xcode.app
.
I'd say the plugin should have an optional parameter for passing in Xcode path.
So the caller can specify exact Xcode path, and if not specified then it should be autodetected using xcode-select -p
.
It would be really nice to see that PR merged! In the meantime, here is hack as workaround. I run it in my install script before running fastlane:
ALTOOL='/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool'
if [ ! -f "$ALTOOL" ]; then
ALDIR=`dirname "$ALTOOL"`
mkdir -p "$ALDIR"
printf '#!/usr/bin/env bash\nxcrun altool $@\n' > "$ALTOOL"
chmod 755 "$ALTOOL"
fi
https://github.com/XCTEQ/fastlane-plugin-altool/blob/d9ee17d301e3a15671419a15ac98ccd3cbe59996/lib/fastlane/plugin/altool/actions/altool_action.rb#L7
Symptom: Command will fail if Xcode is not installed into default path.
Description: Xcode path should ideally not be hardcoded to /Applications/Xcode.app. Use the following command to read the active build tools path: xcode-select -p