Conflicting provisioning settings for iOS distribution build in Xcode

Hello Tatev,
I am using same UE4 version and Xcode version.
I also have a this issue, Did you solve this problem?..

I want to create iOS build, but having some problems. I tried to create certificates and provisioning profiles from the developer.apple.com but when I used them I was having errors :(. After research I found that it is important to create certificates and provisioning profiles only in Xcode ([here is one of the links][1])

When I set the Xcode settings so that it will create certificates and provisioning profiles for developer it creates correct certificates with its provisioning profile. I import them into ue4 and package project. Great I have a developer build :).

But I need build for distribution.

So I change the Xcode settings so that it will create certificates and provisioning profiles for distribution, but Xcode says the following:

I’m using ue4 v4.16.1 and Xcode v8.3.3

Here is my questions:

  1. Am I doing something wrong?
  2. Is it Xcode bug?
  3. How can I resolve this?

Hello Tatev,

I have same problem 3 weeks ago. When I woke up the next day, the error was lost. So I think you should wait a bit approval of the certificate .Goodluck :slight_smile:

Ok here are the steps:

  1. Create certificate from Xcode : Xcode->Preferences->account setup->Mange Certificate → click on “+” button and choose iOS App Store

  2. in KeyChain Access : find the certificate (iPhone Distribution) and export it. It will create file with .p12 extension

  3. Goto Developer Account and create Provisioning profile for distribution(choose distribution certificate that created from Xcode (step 1)). Download it and double click for install

  4. Copy-Past the provisioning profile to ProjectDir\Build\IOS and rename it to projectName

  5. Open project in UE4. Goto project settings → IOS → import certificate → import .p12 file (step 2). UE4 will automatically import the provisioning profile

if after this step provisioning status will be “no valid Certificate found” then you may restart Mac. After that It become “Valid” for me :slight_smile:

  1. turn off project settings → IOS → automatic signing

  2. Goto project settings → Packaging → “Build Configuration” set to “Shipping” and turn on “for Distribution”

  3. open ProjectDir\Intermediate\IOS\ProjectName.entitlements file and be sure that “get-task-allow” is set to “NO”

  4. File → package project → IOS

Hi @Tatev, I don’t found automatic signing of 6).

The reason it worked for you the next day was because there is a very old bug in Apple’s certificate process whereby if you’re ahead of a certain timezone (such as off continental America) your certificate won’t be valid until the next day. I can’t fathom why, but there it is.

On the day you create your certificate, set your build machine’s date forward by one day. This will fix the issue. A day later you can set it back to the correct date.

I tried this with 4.18 & 4.19 on a fresh project but it doesn’t work for me. Building for distribution is really frustrating…

Really appreciate you outlining all this out, but unfortunately I just tried all of these steps on a Mac running Xcode 9.4, macOS High Sierra, Unreal Engine 4.20, and it immediately gave me an invalid signing certificate error when I tried packaging, despite all certificates and provisioning profiles being valid. Such a disappointment that this is such a pain in the ■■■.

It is a pain but once it works it’ll be fine.

You shouldn’t need to follow the steps above. Do everything you can on the apple dev certificate site and let XCode sync your certificates. Don’t bother loading anything into UE. They should just appear.

It also may be worth deleting all of your old cert and profile attempts, which are in a common location for all profiles.