Skip to content

Sentry CLI installed via Homebrew, used in Xcode Build Phase gives 'not installed' message (iOS SDK) #7597

@sebj

Description

@sebj

Core or SDK?

Platform/SDK

Which part? Which one?

iOS SDK

Description

In the page 'Uploading Debug Symbols', the section 'Xcode Build Phase' lists two different script options which can be copy-pasted into a new Xcode build phase. It seems like if sentry-cli has been installed via Homebrew (which is listed in its documentation as one of the installation methods) on an Apple Silicon Mac, the scripts will log a warning/error that sentry-cli is not installed (even though it's accessible from Terminal)

Suggested Solution

SwiftLint's Xcode build phase documentation section mentions the following, which I think might be applicable to Sentry (at least, it fixed Sentry's script issue for me!), and could be mentioned in the Uploading Debug Symbols page:

If you installed SwiftLint via Homebrew on Apple Silicon, you might experience this warning:

warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint

That is because Homebrew on Apple Silicon installs the binaries into the /opt/homebrew/bin folder by default. To instruct Xcode where to find SwiftLint, you can either add /opt/homebrew/bin to the PATH environment variable in your build phase

if [[ "$(uname -m)" == arm64 ]]; then
    export PATH="/opt/homebrew/bin:$PATH"
fi

// ...

or you can create a symbolic link in /usr/local/bin pointing to the actual binary:

ln -s /opt/homebrew/bin/swiftlint /usr/local/bin/swiftlint

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions