Trying to package project for iOS but receive "CodeSign Failed" error

For the last 5 or 6 hours I keep trying to package a test build for my iOS game and constantly receive this error (UE 5.1.1)

Really, tried everything in different combinations.

  • I have paid Apple dev account;
  • Certificates, provision profile etc. filled out correctly (tried to recreate like 20 times);
  • Cert and provision are valid in Project settings on the iOS page;
  • Tried different packaging options (Shipping, Development also with Distribution turned on or off);
  • Bundle Name/ID set up correctly;
  • Restarted UE, rebooted Mac;
  • Tried Full rebuild;
  • Deleted Binaries and Build folders;
  • Read forums;

I don’t know what to do next and seeking for some help.

I not an experienced iOS developer but a few months ago I was able to package this project using UE 4.27.

1 Like

I didn’t change anything and for some reason it started working. The other problem is that the app crashes on the splash screen on the device now.

Hiya, I’ve been having the same issues now for over a week, where before I could build no problem. The only change I made since was update Xcode to the latest version.

I would love to know if you can remember anything you changed?

I have the exact same error

Thx for any help

~t

1 Like

Hi, I still have this problem sometimes and removing the Binaries folder before building the project helps me.

2 Likes

Awesome thx will try that… what version of Xcode are you using by chance? I have 14.3 and UE 5.1.1

~t

I don’t have my mac near me right now, can’t say exact Xcode version, but it’s the latest one + UE 5.1.1 as well.

I give up, I’ve spent hours trying everything as you mentioned, and still end up with

Command CodeSign failed with a nonzero exit code

RunUAT ERROR: AutomationTool was unable to run successfully. Exited with code: 32
PackagingResults: Error: CodeSign Failed
PackagingResults: Error: AutomationTool was unable to run successfully. Exited with code: 32
PackagingResults: Error: Failed to Code Sign

I even tried Distribution to go to TestFlight and still the same issue. I can’t believe how difficult this is, never had this many issues with other programs like FlutterFlow/Unity etc etc.

There has to be a solution… @SupportiveEntity ?

Hey there @tbelgrave! Your summoning ritual was successful but you ended up summoning a windows/linux user. Nevertheless let’s see what we can do.

I’ve been seeing some issues with users working in the latest version of Xcode since it had been the new target, and most commonly from projects that were migrated from UE4.27 up. Code signing is a step in verifying all of the project details, dependencies, and targeting and well signing the code. There should be errors listed in the full log that gives us insight into which portion is failing. May we see the full log?

1 Like

Morning! Thx as always @SupportiveEntity , please see below. After all this I think it’s the prompt I’m not seeing.

I followed this video to the T (21) How To Package UE5 Apps for Distribution to the Apple App Store - YouTube

I’m curious @Slydex44 ever since I stopped seeing this prompt, my issues started
image

Command CodeSign failed with a nonzero exit code
UATHelper: Packaging (IOS): ** BUILD FAILED **
UATHelper: Packaging (IOS): The following build commands failed:
UATHelper: Packaging (IOS):    CodeSign /*****\ ***/Epic\ Games/UE_5.1/Engine/Binaries/IOS/Payload/UnrealGame.app (in target 'UE5' from project 'UE5')
UATHelper: Packaging (IOS): (1 failure)

UATHelper: Packaging (IOS): ERROR: CodeSign Failed
UATHelper: Packaging (IOS):        (see /Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
UATHelper: Packaging (IOS): AutomationTool executed for 0h 0m 54s
UATHelper: Packaging (IOS): AutomationTool exiting with ExitCode=32 (Error_FailedToCodeSign)
PackagingResults: Error: CodeSign Failed
UATHelper: Packaging (IOS): RunUAT ERROR: AutomationTool was unable to run successfully. Exited with code: 32
PackagingResults: Error: AutomationTool was unable to run successfully. Exited with code: 32
PackagingResults: Error: Failed to Code Sign

Ahhh that could very well be it, if there’s a prompt to allow permissions it could be not receiving the request or the permissions could be set to deny through other means.

@SupportiveEntity @Slydex44

This is indeed it! I haven’t got it working in 5.1.1, but installed 5.2 Preview 2 and low and behold the prompt returned and built the package successfully. So we just need a way to reset this behaviour, now sure how to do that tho :frowning:

Seems drastic but maybe a reinstall of 5.1.1?

~t

A note, re-installing 5.1.1 didn’t work.

1 Like

It’s possible that you had checked always approve but it doesn’t seem to be working correctly there. Is there any location to see where keychain requests have been made?

1 Like

Hey there @tbelgrave! Another user had solved a similar issue over in this thread:

1 Like