Skip to content

Remove ENABLE_HARDENED_RUNTIME from the Debug configuration#381

Merged
hannesa2 merged 1 commit intogitx:masterfrom
tiennou:fix/debug-builds-unsigned
Feb 28, 2023
Merged

Remove ENABLE_HARDENED_RUNTIME from the Debug configuration#381
hannesa2 merged 1 commit intogitx:masterfrom
tiennou:fix/debug-builds-unsigned

Conversation

@tiennou
Copy link
Copy Markdown
Contributor

@tiennou tiennou commented Feb 28, 2023

As we shouldn't expect a random contributor to have a sign-ready Apple Developer account, and building with the Hardened Runtime enables requires signing, disable it on the Debug configuration (which is the default, anything made using xcodebuild will use Release.

Fixes the build for me, since I got the same error than this one but while trying to run in Xcode.

As we shouldn't expect a random contributor to have a sign-ready Apple
Developer account, and building with the Hardened Runtime enables
requires signing, disable it on the Debug configuration (which is the
default, anything made using `xcodebuild` will use Release.
@tiennou
Copy link
Copy Markdown
Contributor Author

tiennou commented Feb 28, 2023

Do you remember how much I love Xcode? I love it. The only way I've found to have it pick up on change in xcconfig files is to rename the file, restart it so it fails and yanks the (definitely unhelpful) caching it does, then rename the file back and restart once more. That seems to make it somehow pick up on new/changed values in xcconfig files.

@hannesa2 hannesa2 merged commit 4a0e9aa into gitx:master Feb 28, 2023
@tiennou tiennou deleted the fix/debug-builds-unsigned branch February 28, 2023 22:16
@ADTC
Copy link
Copy Markdown
Contributor

ADTC commented Mar 1, 2023

@tiennou Why is ENABLE_HARDENED_RUNTIME = YES added to the Dev.xcconfig example in Readme? If the local developer is not supposed to have this flag, then it shouldn't be there, right?

Also, does this make it no longer necessary to set up a Team ID and certificate? Was I solving it the wrong way in #376?

@tiennou
Copy link
Copy Markdown
Contributor Author

tiennou commented Mar 1, 2023

Because I suspected that, were you to provide the correct info in the Dev config, you might also consider enabling the runtime, and I changed the read me to make it more obvious that you could do that.

It does mean that, if your Schemes are set up correctly, any kind of build action triggered from Xcode will use the Debug configuration, and thus have any sort of "hard" signing disabled (hard, meaning you can't just "Sign local" or whatever, as per the rules on using the Hardened Runtime).

So now there's some sort of a 3-way configuration going:

  • Debug with "soft" signing disabled, which should be the default.
  • Debug with "hard" signing enabled, which you can enable with the appropriate settings in the Dev config.
  • Release, with "hard" signing.
    and that means the build that actually goes out through CI and gets released doesn't really match what is usually run, unless you have forced it that way, and I get wary when things aren't really ever run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants