iOs Provisioning certificate for Unreal Engine works on one computer but not on another

Guys I do hope you can help me.

Back in February I went through all the hassle of creating a certificate as Apple Developer and asking my tutor to create me a provisioning file and add my devices (Apple Developer University Program). It all worked on my MacBookPro and I was happy. Unreal would highlight in green my provisioning file and my Certificate as iPhone developer.

enter image description here

Fast forward a month and I'm doing an Internship 8hours across the globe. First thing I do is having my new tutor assign me an iMac, I install Xcode, Unreal, set up my account on Xcode, create a certificate for the iMac, download the provisioning file and double click it (shouldn't be needed anyways). Test Deploying an app on my iPhone and done, it works.

Switch over to Unreal, let's test this new AR template, open project settings and...the provisioning file is RED, saying "No Valid Certificate Found", with my certificate as iPhone Developer RIGHT UNDER THERE. enter image description here

If I import manually the provisioning file it is the same "No Valid Certificate found" problem If I try building and deploying anyways I get this error:

LogPlayLevel: Code Signing Error: Provisioning profile "bartolomei-provisioning" doesn't include signing certificate "iPhone Developer: Massimo Bortolamei (2HEP25L8WM)".

LogPlayLevel: Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'

and it doesn't make any sense since on the very next MacBook Pro on this same desk everything works fine!

What I tried:

  • playing around with timezones and shifting to GMT 0

  • checking that my Apple Worldwide Developer Relations Certification Authority is up to date.

  • looking at many many posts on Answerhub

  • close and reopen everything multiple times

  • redoing everything from scratch

  • deleting all the provision files in the folder Library/MobileDevice/ProvisioningProfiles and importing only the one downloaded from Dev Center manually.

  • you name it

What am I missing? I have other things on which to be stuck on, this can't be one! Thanks for help

LogPlayLevel: ********** STAGE COMMAND STARTED **********
LogPlayLevel: Creating UE4CommandLine.txt
LogPlayLevel: Creating Staging Manifest...
LogPlayLevel: CookPlat IOS, this IOSPlatform
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 16.000683
LogPlayLevel: UPL Init: None
LogPlayLevel: Cleaning Stage Directory: /Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS
LogPlayLevel: Copying NonUFSFiles to staging directory: /Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS
LogPlayLevel: Copying DebugFiles to staging directory: /Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS
LogPlayLevel: Copying UFSFiles to staging directory: /Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS
LogPlayLevel: Running: mono "/Users/Shared/Epic Games/UE_4.19/Engine/Binaries/DotNET/IOS/DeploymentServer.exe" Backup -file "/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS/Manifest_UFSFiles_IOS.txt" -file "/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS/Manifest_NonUFSFiles_IOS.txt" -de
vice fb578a13b17996a6436737f8863e068d017d8256 -bundle it.polimi.ARkitTest
LogPlayLevel:   [deploy] Created deployment server.
LogPlayLevel:   [DD] Trying to connect to mobile device running iOS ...
LogPlayLevel:   [DD] Mobile Device 'iPhone di Massimo' connected
LogPlayLevel:   Failed to connect to bundle 'it.polimi.ARkitTest' with Unknown error 0xE80000B7
LogPlayLevel:   [DD]  ... File to be written '/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS\iPhone di Massimo_Manifest_UFSFiles_IOS.txt'
LogPlayLevel:   [DD]  ... File to be written '/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Saved/StagedBuilds/IOS\iPhone di Massimo_Manifest_NonUFSFiles_IOS.txt'
LogPlayLevel:   [DD]  ... Error: Failed to connect to bundle 'it.polimi.ARkitTest'
LogPlayLevel:   [DD]
LogPlayLevel:   Exiting.
LogPlayLevel: Took 3.09494s to run mono, ExitCode=1
LogPlayLevel: ********** STAGE COMMAND COMPLETED **********
LogPlayLevel: ********** PACKAGE COMMAND STARTED **********
LogPlayLevel: Package /Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/ARkitTest.uproject
LogPlayLevel: UPL Init: None
LogPlayLevel: Project: /Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/ARkitTest_IOS.xcworkspace
LogPlayLevel: Running: mono "/Users/Shared/Epic Games/UE_4.19/Engine/Binaries/DotNET/UnrealBuildTool.exe" -XcodeProjectFiles -project="/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/ARkitTest.uproject" -platforms=IOS -game -nointellisense -IOSdeployonly -ignorejunk -nocreatestub -NoHotReload -ignorejunk
LogPlayLevel:   Discovering modules, targets and source code for project...
LogPlayLevel:   Writing project files... 0%33%67%100%
LogPlayLevel: Took 15.178321s to run mono, ExitCode=0
LogPlayLevel: Running: /usr/bin/env UBT_NO_POST_DEPLOY=true /usr/bin/xcrun xcodebuild build -workspace "/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/ARkitTest_IOS.xcworkspace" -scheme 'ARkitTest' -configuration "Development" -destination generic/platform=iOS -sdk iphoneos CODE_SIGN_IDENTITY="iPhone Developer: Massimo Bortolamei (2HEP25L8WM)" 
PROVISIONING_PROFILE_SPECIFIER=80bdffbe-a8a7-4914-a570-1d62ff3e2ddf
LogPlayLevel:   Build settings from command line:
LogPlayLevel:       CODE_SIGN_IDENTITY = iPhone Developer: Massimo Bortolamei (2HEP25L8WM)
LogPlayLevel:       PROVISIONING_PROFILE_SPECIFIER = 80bdffbe-a8a7-4914-a570-1d62ff3e2ddf
LogPlayLevel:       SDKROOT = iphoneos11.2
LogPlayLevel:   2018-03-15 16:48:49.903 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/massimobortolamei/Documents/Unreal Projects/ARkitTest/Config/DefaultEditor.ini" failed, errno = 2
LogPlayLevel:   2018-03-15 16:48:51.376 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.19/Engine/Config/BaseEditorLayout.ini" failed, errno = 2
LogPlayLevel:   2018-03-15 16:48:51.596 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.19/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/alembic/houdini/SOP_AlembicIn/OPalembic/Object_1alembicarchive/Help" failed, errno = 2
LogPlayLevel:   2018-03-15 16:48:51.600 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.19/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/alembic/houdini/SOP_AlembicIn/OPalembic/Object_1alembicxform/Help" failed, errno = 2
LogPlayLevel:   2018-03-15 16:48:52.055 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.19/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/hdf5/tools/testfiles/tmulti-g.h5" failed, errno = 2
LogPlayLevel:   2018-03-15 16:48:52.072 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.19/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/hdf5/tools/testfiles/tnoddlfile.ddl" failed, errno = 2
LogPlayLevel:   2018-03-15 16:48:52.125 xcodebuild[44958:1128209] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.19/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/hdf5/tools/testfiles/twithddlfile.ddl" failed, errno = 2
LogPlayLevel:   === BUILD TARGET ARkitTest OF PROJECT ARkitTest WITH CONFIGURATION Development ===
LogPlayLevel:   Check dependencies
LogPlayLevel:   Code Signing Error: Provisioning profile "bartolomei-provisioning" doesn't include signing certificate "iPhone Developer: Massimo Bortolamei (2HEP25L8WM)".
LogPlayLevel:   Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'
LogPlayLevel:   ** BUILD FAILED **
LogPlayLevel:   The following build commands failed:
LogPlayLevel:     Check dependencies
LogPlayLevel:   (1 failure)
LogPlayLevel: Took 5.906535s to run env, ExitCode=65
LogPlayLevel: ERROR: CodeSign Failed
LogPlayLevel:        (see /Users/massimobortolamei/Library/Logs/Unreal Engine/LocalBuildLogs/UAT_Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=32 (Error_FailedToCodeSign)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 26.393563
LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults: Error: Launch failed! Failed to Code Sign

and when opening project settings this happens

LogTemp: Running Mono...
LogTemp: Setting up Mono
LogTemp: /Users/Shared/Epic Games/UE_4.19/Engine /Users/Shared/Epic Games/UE_4.19
LogTemp: Executing iPhonePackager certificates Engine -bundlename it.polimi.ARkitTest
LogTemp: CWD: /Users/Shared/Epic Games/UE_4.19/Engine/Binaries/DotNET/IOS
LogTemp: Initial Dir: /Users/Shared/Epic Games/UE_4.19/Engine
LogTemp: Env CWD: /Users/Shared/Epic Games/UE_4.19/Engine/Binaries/DotNET/IOS
LogTemp: BranchPath = Massimos-iMac.local///Users/Shared/Epic Games/UE_4.19/Engine/Binaries/DotNET/IOS/../.. --- GameBranchPath = Massimos-iMac.local///Users/Shared/Epic Games/UE_4.19/Engine/Binaries/DotNET/IOS/../..
LogTemp: CERTIFICATE-Name:iPhone Developer: Massimo Bortolamei (2HEP25L8WM),Validity:VALID,StartDate:2018-03-15T06:28:26.0000000Z,EndDate:2019-03-15T06:28:26.0000000Z
LogTemp: CERTIFICATE-Name:iPhone Developer: Massimo Bortolamei (2HEP25L8WM),Validity:VALID,StartDate:2018-03-15T06:28:26.0000000Z,EndDate:2019-03-15T06:28:26.0000000Z
LogTemp:   Looking for a certificate that matches the application identifier 'EDG8TGNYUA.*'
LogTemp: PROVISION-File:003de59d-3ce0-4c26-83c4-526d9e957553.mobileprovision,Name:iOS Team Provisioning Profile: *,Validity:NO_CERT,StartDate:3/15/2018 6:41:32 AM,EndDate:3/15/2019 6:41:32 AM,Type:DEVELOPMENT
LogTemp:   Looking for a certificate that matches the application identifier 'EDG8TGNYUA.*'
LogTemp:   .. Failed to find a valid certificate that was in date
LogTemp: PROVISION-File:80bdffbe-a8a7-4914-a570-1d62ff3e2ddf.mobileprovision,Name:bartolomei-provisioning,Validity:NO_CERT,StartDate:2/23/2018 10:42:23 AM,EndDate:2/23/2019 10:42:23 AM,Type:DEVELOPMENT
LogTemp:   Looking for a certificate that matches the application identifier 'EDG8TGNYUA.*'
LogTemp: PROVISION-File:UE4_003de59d-3ce0-4c26-83c4-526d9e957553.mobileprovision,Name:iOS Team Provisioning Profile: *,Validity:NO_CERT,StartDate:3/15/2018 6:41:32 AM,EndDate:3/15/2019 6:41:32 AM,Type:DEVELOPMENT
LogTemp:   Looking for a certificate that matches the application identifier 'EDG8TGNYUA.*'
LogTemp:   .. Failed to find a valid certificate that was in date
LogTemp: PROVISION-File:UE4_80bdffbe-a8a7-4914-a570-1d62ff3e2ddf.mobileprovision,Name:bartolomei-provisioning,Validity:NO_CERT,StartDate:2/23/2018 10:42:23 AM,EndDate:2/23/2019 10:42:23 AM,Type:DEVELOPMENT
LogTemp:   Looking for a certificate that matches the application identifier 'EDG8TGNYUA.*'
LogTemp:   .. Failed to find a valid certificate that was in date
LogTemp: PROVISION-File:bartolomeiprovisioning.mobileprovision,Name:bartolomei-provisioning,Validity:NO_CERT,StartDate:2/23/2018 10:42:23 AM,EndDate:2/23/2019 10:42:23 AM,Type:DEVELOPMENT
LogTemp: MATCHED-Provision:,File:,Cert:

Solution 1:

Ok so, I was able to find what I think is a solution.

I have very basic understanding about code signing but it seems that the same keys and certificates I was using on my MacBookPro were linked somehow to the provisioning file I was using. Moving the provisioning file on the iMac would work fine for Xcode because it would manage things automatically, unfortunately Unreal doesn't do so and it would complain about missing signing keys. I then approached the problem from another side (since I don't have full permissions in the Dev Center because it is a university program) and looked into how to export the keys from one computer to another.

this addressed the issue perfectly The issues of exporting/importing certificate , private key under keychain access for Iphone

for the lazy: on the working pc go to Xcode>Preferences>Accounts>small gear icon next to + and - > export remember to put a password because it is very important stuff.

transfer the file to the other computer, double click, enter password and everything will be automatically imported!

close and reopen Xcode preferences and log into the account.

In unreal everything should be automagically imported.

Just remember to start from a clean situation (I had to import the file a couple of times actually) by manually deleting all keys and certificates from Keychain. This time unreal would show "Valid" next to the provisioning file, and while deploying it would ask for the keychain password.

And Done!