Warning: unable to build self-signed root for signer 'iPhone Developer: ....'

I don’t know if this has been asked before, but I looked online and the few places I found regarding something similar were not happening in the same place in the build process, and the correction they suggested did not work in my case.

I just want to make sure I am doing this correctly.

I am trying to build an ios build just of the standard UNReal Top Down shooter game template. I managed to get my mac listening to the commands sent by the UNReal build, and it seemed to be chugging along compiling just fine until this. I originally had some issue with my key which i fixed by changing the location of it, and the permission on the file. That got me past the first error.
But now I am stuck here.

I built all my certificates, keys, app id’s, etc on the windows machine I am using. I then setup the bundle name to match the wildcard setting I set up with the app id. That all seemed to give green lights for the provisions files, etc. But now I am here and I for the life of me cannot seem to get it to work.

Is there a way i can narrow down what certificate is the problem, i know one comment suggested he got around a similar problem setting his Worldwide Developers Relations Certificate to have Trust set to ‘Always Trust’ and i did that, but i did not fix the issue.

It is so frustrating trying to do development this way, but because of the way i wish to develop this is better than the alternative I think which is developing on my older 2014 mac book pro which can only run Catalina 10.15.7. It is telling that this process has zero youtube videos explaining how it works, for some reason that doesn’t surprise me… Is there a better way to do this?

    CodeSign /Users/[mac_user]/UE4/Builds/[WindowsMachineName]/C/Users/[windows_user]/Documents/Unreal_Projects/MyFirstIPhoneGamev01/Binaries/IOS/Payload/MyFirstIPhoneGamev01.app
        cd /Users/[windowsmacamev01/Intermediate/ProjectFilesIOS
        export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/[mac_user]/UE4/Builds/[WindowsMachineName]/C/Program_Files/Epic_Games/UE_4.26/Engine/Build/BatchFiles/Mac/../../../Binaries/ThirdParty/Mono/Mac/bin:/usr/bin:/bin:/usr/sbin:/sbin"

    Signing Identity:     "iPhone Developer: [APPLE_DEV_NAME] (APPLE_DEV_ID)"
    Provisioning Profile: "SquishDevProfile"

        /usr/bin/codesign --force --sign [GUID #2] --entitlements /Users/[mac_user]/UE4/Builds/ELYSIAN/C/Users/[Windows_User_Name]/Documents/Unreal_Projects/MyFirstIPhoneGamev01/Intermediate/ProjectFilesIOS/build/MyFirstIPhoneGamev01.build/DebugGame-iphoneos/MyFirstIPhoneGamev01.build/MyFirstIPhoneGamev01.app.xcent --timestamp=none /Users/[mac_user]/UE4/Builds/ELYSIAN/C/Users/[Windows_User_Name]/Documents/Unreal_Projects/MyFirstIPhoneGamev01/Binaries/IOS/Payload/MyFirstIPhoneGamev01.app
    **Warning: unable to build chain to self-signed root for signer "iPhone Developer:  [APPLE_DEV_NAME] (APPLE_DEV_ID)"**
    /Users/[mac_user]/UE4/Builds/ELYSIAN/C/Users/[Windows_User_Name]/Documents/Unreal_Projects/MyFirstIPhoneGamev01/Binaries/IOS/Payload/MyFirstIPhoneGamev01.app: errSecInternalComponent
    Command /usr/bin/codesign failed with exit code 1

    ** BUILD FAILED **

    The following build commands failed:
    	CodeSign /Users/[mac_user]/UE4/Builds/ELYSIAN/C/Users/[Windows_User_Name]/Documents/Unreal_Projects/MyFirstIPhoneGamev01/Binaries/IOS/Payload/MyFirstIPhoneGamev01.app
    (1 failure)
    Executing /Users/[mac_user]/UE4/Builds/ELYSIAN/C/Users/[Windows_User_Name]/Documents/Unreal_Projects/MyFirstIPhoneGamev01/Intermediate/Build/IOS/MyFirstIPhoneGamev01/DebugGame/CleanProject.sh
    ERROR: Unhandled exception: System.Exception: ** BUILD FAILED **
             at UnrealBuildTool.IOSToolChain.PostBuildSync (UnrealBuildTool.IOSPostBuildSyncTarget Target) [0x00cad] in <SOME GUID #1>:0
             at UnrealBuildTool.IOSPostBuildSyncMode.Execute (Tools.DotNETCommon.CommandLineArguments Arguments) [0x00018] in <SOME GUID #1>:0
             at UnrealBuildTool.UnrealBuildTool.Main (System.String[] ArgumentsArray) [0x002bb] in <SOME GUID #1>:0
  [Remote] Downloading C:\Users\[Windows_User_Name]\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-MyFirstIPhoneGamev01-IOS-DebugGame_Remote.txt

ever find a solution?

Here are the steps that worked for me. I’m not sure what was necessary and what was cosmetic, but it worked!

1/ Restarting my Mac.
2/ Running security unlock-keychain -p MYPASSWORD login.keychain.

Worked like a charm!