Download

iOS distribution build failed when the developer name in provision file contains punctuations(space, apostrophe)

Hi, recently I tried to set up my iOS project, and there is a “CodeSign Failed” problem when it comes to distribution build. The development build works fine, I can upload an .ipa file to a remote physical device(iPhone 12) to run it. However, the distribution build fails to generate the .ipa file.

Engine: UE5.0.0
OS: macOS Big Sur 11.4

I published an iOS app before, so basically I know the use of certificate and provision. I can almost confirm the problem is not from using the wrong certificate or provision. The problem is easy to understand but tricky to solve, it is about the punctuation issue.

My iOS developer name(company name) follows this format: Xyz’s Games Inc.

I believe having space characters is acceptable, since it works in development build, but the apostrophe(’) is a problem, it is messed up with the quotation marks(") by the system.

Output log:

  1. UATHelper: Packaging (IOS): Running: /usr/bin/env UBT_NO_POST_DEPLOY=true /usr/bin/xcrun xcodebuild build -workspace “/Users/Xyz/Documents/UnrealProjects/ProjectName/ProjectName_IOS.xcworkspace” -scheme ‘ProjectName’ -configuration “Shipping” -destination generic/platform=iOS -sdk iphoneos CODE_SIGN_IDENTITY=“iPhone Distribution: Xyz’s Games Inc. (N30VXQGVJE)” PROVISIONING_PROFILE_SPECIFIER=a85fe778-567c-43f7-96f1-5460b4ec0c80
  2. UATHelper: Packaging (IOS): Command line invocation:
  3. UATHelper: Packaging (IOS): /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build -workspace /Users/Xyz/Documents/UnrealProjects/ProjectName/ProjectName_IOS.xcworkspace -scheme ProjectName -configuration Shipping -destination generic/platform=iOS -sdk iphoneos “CODE_SIGN_IDENTITY=iPhone Distribution: Xyzs” Games Inc. “(N30VXQGVJE) PROVISIONING_PROFILE_SPECIFIER=a85fe778-567c-43f7-96f1-5460b4ec0c70”
  4. UATHelper: Packaging (IOS): CODE_SIGN_IDENTITY = iPhone Distribution: Xyz
  5. UATHelper: Packaging (IOS): SDKROOT = iphoneos14.5
  6. UATHelper: Packaging (IOS):
  7. UATHelper: Packaging (IOS): xcodebuild: error: Unknown build action ‘Games’.
  8. UATHelper: Packaging (IOS): Took 3.221346s to run env, ExitCode=65
  9. UATHelper: Packaging (IOS): ERROR: CodeSign Failed

The problem is located at line 1 and 3:
Line 1: CODE_SIGN_IDENTITY=“iPhone Distribution: Xyz’s Games Inc. (N30VXQGVJE)”
Line 3: “CODE_SIGN_IDENTITY=iPhone Distribution: Xyzs” Games Inc. “

Line 1 is correct, but line 3 is messed up. My company name is broken into 2 chunks: Xyzs and Games. For some reason, the apostrophe is replaced by none and a new quotation mark is added behind it, then the string(CODE_SIGN_IDENTITY=iPhone Distribution: Xyzs) is being wrapped by a pair of quotation marks, which violates the syntax of this command line and causes the error.

My thought and potential solutions are:

  1. Is it still possible to compile it using Xcode directly to avoid this problem? How? I searched a lot, but couldn’t find a detailed tutorial of how to do it, like opening it in Xcode and configure. Xcode doesn’t have this concern, special punctuations are accepted.
  2. Run “xcodebuild build” in cmd: This will cause error of “ProjectName_IOS.xcworkspace doesn’t exist”, my project is pure blueprint, so no xcworkspace is generated inside the project folder.
  3. There is nothing to do with the provision, I can’t change the company name, otherwise it won’t be valid.

Can anyone provide solutions to this case? Thanks.

I solved it. A straightforward way is to package a development build and resign the .ipa. There are many ways to resign the .ipa, either using command line or softwares. I watched a tutorial and used iOS App Signer from Github to replace the development provision with a distribution provision, then I could upload the new .ipa to TestFlight. It got approved and can run on iOS devices.

How to resign .ipa: https://www.youtube.com/watch?v=7vtKo5XNrns

iOS App Signer: https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqa28yVnNFSWRNRWZzWEFRd3NlM0JFc2VyMXdHd3xBQ3Jtc0trWmNWMGhiN0s3bzdRTzk2QlBTUklyLVZRYUtnWEgyUHdkRnhxX2dsaElJbk1HZkJ0YTJUTUtTYVJKbTd4anJ6bmR2SjM5OTYtcVVqN081OW9HQTBRNzFlRlg0aDRDd2tIMEVfTm9iOTczRVNGTXBYdw&q=https%3A%2F%2Fgithub.com%2FDanTheMan827%2Fios-app-signer%2Freleases%2Fdownload%2F1.13.1%2FiOS.App.Signer.app.zip

1 Like