DEVELOPER_DIR is not set for usage with fastlane
See original GitHub issueRecently we have had some issues when using this action with fastlane
, that our lanes have still been using wrong versions of Xcode, even after version is being set.
Fastlane itself recommends either to use xcode-select
(which this action does) or set DEVELOPER_DIR
.
https://docs.fastlane.tools/actions/gym/#usage
Currently we are solving it in a bit hackish way and use MD_APPLE_SDK_ROOT
set for Xamarin.
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 11.7
- name: Build Simulator build
timeout-minutes: 15
env:
# N.B. Unless we set this, fastlane will still use default Xcode available on the machine
DEVELOPER_DIR: ${{ env.MD_APPLE_SDK_ROOT }}
run: |
bundle exec fastlane ios build_simulator
Considering that xcode-select
is actually used, alternative version woudl be to use:
DEVELOPER_DIR: $(xcode-select --print-path)
But I was wondering, considering how often fastlane used for iOS, would you consider adding this or accepting the PR, which sets DEVELOPER_DIR
as a part of workflow? Or should we consider some other solutin?
Thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
build_app - fastlane docs
When gym raises an error the error_info property will contain the process output in case you want to display the error in 3rd...
Read more >Ask Question - Stack Overflow
dSYM Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 60. I was trying to symbolicate my app but this error is shown.I have...
Read more >Setting up fastlane for your iOS project - Compsoft
Open finder and navigate to you project root folder, inside there should be a folder called “fastlane”. You should have a file called...
Read more >Error: Failed with Exit Code 1 | Apple Developer Forums
It could be in my Code Signing Identity. Target is all 'iOS Developer'. Project is all iPhone Distribution: "Project Owner". Code Signing is...
Read more >The Unofficial Guide to xcconfig files
xcconfig files follow a small set of syntax rules: Comments: ... To use the default value for that variable, do not put anything...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dentuzhik, that sounds really interesting. See output of
xcode-select --print-path
in stepLog Xcode settings
. It is not equal to path on clean image. If you runxcode-select --print-path
as a first step of the build (clean image), it will show/Applications/Xcode_12.app/Contents/Developer
.So, some step between
setup-xcode
andLog Xcode settings
invokesxcode-select -s "/Applications/Xcode.app
and change Xcode. I think stepsInstall brew dependencies
orInstalling dependencies
can switch Xcode somehow. I have already seen examples wherebrew install
builds something from source code and use Xcode for that. Could you please try to movesetup-xcode
step lower in YAML iteratively and check build logs?Also could you please expand
env
section for stepLog Xcode settings
on the first screen? Does it contain something interesting?We figured out what was wrong. The problem was that we specified
iphonesimulator
SDK when creating the build, which apparently assumed latest version of SDK available on the system.Because we had two versions of Xcode,
11.7
and12.3
, latest SDK always referred to latest Xcode installation effectively ignoring what we have provided viaxcode-select
. As soon as I switched build toiphonesimulator13.7
our issues with Xcode went away.Let me know if it makes sense (or maybe my theory is incorrect), and I assume we can close this.