Xcode Archive & Export for iOS v2.8.0 failing to get SDKROOT

I had posted this on the changelog for step Xcode Archive & Export for iOS v2.8.0, but it seems I should have posted it here… =)

The version 2.8.0 of this step started failing my build. Version 2.7.2 was working fine. Could you please advise?

Successful build with version 2.7.2: https://app.bitrise.io/build/bdfde0aa40aa1576#?tab=log

Failed build with version 2.8.0 from same commit in my repo: https://app.bitrise.io/build/b32492075e95b177#?tab=log

Error: Failed to read project platform: /Users/vagrant/git/Dialpad.xcworkspace: failed to get SDKROOT: key: string(“SDKROOT”) not found in: serialized.Object(serialized.Object{“PRODUCT_NAME”:“Dialpad”})

To add some more info, I’m using xcconfig files in my project, and that’s where SDKROOT is set. Maybe that’s why version 2.8.0 is failing.

Same here, the iOS builds started failing with the error message of failing to get SDKROOT. As the OP has mentioned, the workaround is reverting back to the 2.7.x version of the XCode Archive & Export step.

Would be great to get this fixed!

Hello @guvenatsixtostart, @cmonteirodialpad , :wave:

We are sorry to hear this! I just wanted to let you know that our Tooling team is aware of this issue with the latest version of the step and is currently looking into this.

Other users are reporting that downgrading to step version 2.7 resolves the issue (as you also mentioned), so in the meantime, as a workaround, I would kindly suggest using this version. We’ll update you here as soon as the issue is resolved. Thank you!

@cskata
Already did, thanks!

Hello @cmonteirodialpad,

First of all, thank your for your patience! I have some good news: our team fixed the issue and I’d like to provide some context and details about it.

Since version 2.8.0, we add the -destination flag to the xcodebuild call, to make sure the step builds an iOS or tvOS project.

The root-cause was that the step built a macOS archive, which has slightly different file structure from an iOS archive.

This change also solves this issue partially: #180 - Catalyst app can’t be correctly parsed

Version 2.8.0 parses the given project and determines the destination flag value, based on the SDKROOT build settings.

This new version introduced an issue, by the invalid expectation of having SDKROOT build settings as a project level build settings:

In version 2.8.1, we use the target build settings returned by xcodebuild -showBuildSettings to get the SDKROOT value.

I’ll close this thread as the latest release should fix it. If you need more info or help, just open a new issue or get in touch with our Support Team.

Thanks and happy building! :rocket:

v2.8.1 is working, thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.