cmake 3.20 build error when copying iOS frameworks - signing on build machine not supported

Hi everybody,

I run into an error when building an iOS app linking a framework on a machine without Apple dev certificates installed:

_lib_shared_it_copy_lib.build/Script-827DD60D11E805EA4271AEE0.sh: line 5: unexpected EOF while looking for matching ``' Command PhaseScriptExecution failed with a nonzero exit code Command exited with the value: 65

I build both framework and app with these properties set:

XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED “NO”
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED “NO”

From what i understand the script tries to extract the signing certificate from the app and sign the framework with the same certificate before copying. This probably fails because the app isn’t signed.

Do you have an advice on how to fix or circumvent this?

It works with cmake 3.18, but fails with cmake 3.20.

Best,
Dennis

It looks like CMake 3.20 introduced some new signing logic (the XCODE_EMBED_FRAMEWORKS properties). Does 3.19 work (just to verify my suspicions)? There is probably a regression here somewhere though.

Cc: @brad.king

Thx for your answer. I just tested with a couple of different CMake versions. Results are:
3.19.8 same error
3.19.0 same error
3.18.5 no error

Thanks, so that means something changed in 3.19, but I don’t see release notes for anything related to signing. I’m also not that familiar with the signing support, so others likely have way better information here.

Could you please file an issue with details on what the behavior change is. If you could make a small testcase that reproduces the problem so that any fix could be tested against it, that would be extremely appreciated.

CMake 3.19 switched to the Xcode “new build system” for Xcode 12 and above.

Please post details to the issue.