JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: Xcode CodeSign Identity automatically populated with wrong default values (with fix)

Open MattisPower opened this issue 7 months ago • 0 comments
trafficstars

Detailed steps on how to reproduce the bug

This describes the same steps as Issue #597 (Because I cannot reopen that issue)

  • Set CodeSigning Identity to "" (Empty String) in the Projucer
  • Save & open in IDE (using the Xcode exporter)
  • check actual CodeSigning Value in Xcode (Project -> Project -> Build Settings -> Signing)

What is the expected behaviour?

CodeSigning Identity is also "" in Xcode

Actual Behavior

  • If not set to a different value (not "") in Projucer the CodeSigning Identity will default to Sign to run locally which does not allow the project to compile

Possible Solution I fixed the problem by changing the addCodeSigningIdentity() function in jucer_ProjectExport_Xcode.h

However because I didn't test this for other setups than mine and also didn't do a lot of integration tests, I'm not going to create a pull request in order to allow for further testing of the solution.

What I believe this does is write an empty string to the Xcode Project if no value for the CodeSigning Identity is provided in the Projucer

void addCodeSigningIdentity (const XcodeBuildConfiguration& config, StringPairArray& result) const
    {
        if (const auto codeSigningIdentity = getCodeSigningIdentity (config); codeSigningIdentity.isNotEmpty())
        {
            result.set (iOS ? "\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"" : "CODE_SIGN_IDENTITY",
                        codeSigningIdentity.quoted());
        }
        else {
            const String emptyString = "";
            result.set ("CODE_SIGN_IDENTITY", emptyString.quoted());
        }
    }

Operating systems

macOS

What versions of the operating systems?

macOS Sequoia 15.3.2 (24D81)

Architectures

Arm64/aarch64

Stacktrace


Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • [x] I agree to follow the Code of Conduct

MattisPower avatar Mar 23 '25 10:03 MattisPower