XCTEQ / fastlane-plugin-altool

Fastlane plugin to upload ipa files to iTunes Connect using alto
MIT License
29 stars 13 forks source link

Command fails if Xcode not installed into default path #6

Open RicardoKoch opened 5 years ago

RicardoKoch commented 5 years ago

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

mgrebenets commented 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.

limikael commented 4 years ago

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