# tvOS package for distribution fails to find valid certificate and valid provision \[UE-39501\] \[Workaround\]

**URL:** <https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770>\
**Category:** Platform & Builds\
**Tags:** provisioning-profile, unreal-engine, certificate, bug-report, packaging-projects, question\
**Created:** [November 29, 2016, 4:50am UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770 "2016-11-29T04:50:27Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_2bfba907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2bfba907](https://forums.unrealengine.com/u/anonymous_user_2bfba907)\
**Post date:** [December 9, 2016, 6:03pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/21 "2016-12-09T18:03:44Z")

</div>

The only other thing I can think of about my setup is that I signed in with my Apple ID in Xcode → Preferences → Accounts and downloaded the provision profiles through Xcode.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [December 9, 2016, 6:03pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/22 "2016-12-09T18:03:58Z")

</div>

I was able to package (in development) for tvOS in 4.14.1 on macOS Sierra without any trouble. Could you please submit your provisions and certificates to me through a private message on the forums?

Thank you. 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 9, 2016, 8:45pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/23 "2016-12-09T20:45:57Z")

</div>

I sent you a PM with a link for both the development and distribution files.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [December 15, 2016, 4:28pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/24 "2016-12-15T16:28:16Z")

</div>

,

After further investigation from our specialist, it is coming down to the provision and the certificates not matching properly. For instance, when your development provision is added to the engine, it says there aren’t any valid certificate. Your wildcard was imported during this test. I noticed that I wasn’t seeing them pop up at all, and it was because it was invalid and I had to hit the ‘all’ button. I did run into the error that you described on the distribution provisions however, it still seems to point to the provisions and certificates not matching up correctly or being created correctly.

I know you’ve went through the set up process multiple times but I am going to provide additional documentation.

- [App Distribution Guide: Troubleshooting][1]
- [App Distribution Guide: Maintaining Your Signing Identities and Certificates][2]

I hope that this helps. You might want to contact Apple Developer Support if you’re still not able to get the provisions and certificates to match up like they should.

Let me know!

[https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/Troubleshooting/Troubleshooting.html](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/Troubleshooting/Troubleshooting.html)  
[2]: [https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 15, 2016, 6:29pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/25 "2016-12-15T18:29:27Z")

</div>

Not matching properly…how??? I’ve given you descriptions and screenshots of the creation process as well as the certificates themselves. Can you not at least give me a hint as to WHAT doesn’t match?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 15, 2016, 6:36pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/26 "2016-12-15T18:36:00Z")

</div>

Or maybe describe exactly what _you_ do to create your certificate, provision, and app config?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 15, 2016, 7:46pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/27 "2016-12-15T19:46:23Z")

</div>

What would you have me change? I recreated my certificates and provisions again. I made sure my email address matched my Apple ID email address this time on both. The cert/provision names are super simple using only alphabet letters. The app id is always specific ([com.agileperception.com](http://com.agileperception.com)).

Saying “you’re certs and provisions are bad” isn’t very convincing. _All_ of the things I have tried for tvOS _actually work_ for iOS with the same values (except choosing the iOS instead of tvOS options during cert/provision creation).

If they work for app authors _not_ using UE4, I don’t see how you can blame the certificates and provisions.

Have you and the tvOS developer tried generating new certificates and provisions lately? Perhaps something has changed there that UE4 is not taking into account.

Would it help if I made a screencast of myself creating certs/provisions and running through the process for you to see exactly what I’m doing?

 ![118870-screen+shot+2016-12-15+at+12.40.54+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/8/7b8b655d9c29e7a8ed75f2966edff165308b6475.png)

![118891-screen+shot+2016-12-15+at+12.41.01+pm.png]()

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [December 21, 2016, 10:19pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/28 "2016-12-21T22:19:52Z")

</div>

Your set up looks fine from the screenshots provided. However, it looks as though you’re using a .cer file as the certificate. If you’re attempting to use this on a Mac other than the .CSR, you’ll need to generate a .p12 in Xcode. .cer files will only work on the computer that the .CSR was generated on.

If you’d like, we can further debug the issue if you could provide us with the .p12.

I’ll post this on your other question too, just in case - thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 23, 2016, 5:19am UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/29 "2016-12-23T05:19:55Z")

</div>

, I am doing this all on the same Mac.

I tried to generate a .p12 file (both to try and to send to you), but it does not seem to be an option (Note how the export to .p12 option is greyed out).

Do you have some instructions on how to generate the .p12 that might work? [These instructions appear current, but don’t work.][1]

 ![119680-screen+shot+2016-12-22+at+10.16.25+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/e/d7eb51b79abe9f091ffbb89db5bbf77be3808591.png)

 ![119711-screen+shot+2016-12-22+at+10.16.12+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/7/477911ccce671cd2c79ccf8380c7a4661fa50873.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 27, 2016, 7:53pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/30 "2016-12-27T19:53:17Z")

</div>

Please help. [- YouTube](https://youtu.be/q62aKkTwaMo)

---

<div class="post-metadata">

**Author:** ![rckt26](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rckt26](https://forums.unrealengine.com/u/rckt26)\
**Post date:** [December 28, 2016, 7:48am UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/31 "2016-12-28T07:48:59Z")

</div>

I’m able to launch on a mac but once I remove the iOS provisioning profiles and leave just the tvOS profiles I get the same error as you.

So if you haven’t already I would try creating iOS profiles with the same bundle id. I also had to make the project a coded project in order for it to get past a different error.

Another issue I just figured out is you want to open up the Application Loader from Xcode(Xcode-\>Open Developer Tool-\>Application Loader) not from the applications folder. I’m getting a couple of errors though that I need to figure out but opening Application Loader that way sees it as an tvOS app and the other does not.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 30, 2016, 8:16pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/32 "2016-12-30T20:16:28Z")

</div>

@ That was the key!!! After 5 weeks of effort to just package for tvOS, I can make my first submission to the iTunes store! I am going to post the summary as a separate “answer” so people can actually find it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 30, 2016, 9:05pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/33 "2016-12-30T21:05:27Z")

</div>

# tvOS Distribution Package PARTIAL Workaround (4.14)

## Bug [UE-39501][1]

_Thanks to @ for the key information leading to this workaround!_

- Import both development and distribution certificates (They will both be called “iOS” certs despite the fact that they work across both iOS and tvOS provisions)
- Import mobile provisions for each of the 4 combinations of development/distribution and iOS/tvOS (dev+iOS, dev+tvOS, dist+iOS, dist+tvOS)
- (Just) The tvOS provisions MUST use a wildcard identifier `*` to get past the _next_ bug that you will hit (the engine ignoring your config and trying to literally match `com.YourCompany.[PROJECT_NAME]` against your provision’s app id)
- `File > Package Project > tvOS`

It looks like this:

 ![120321-screen+shot+2016-12-30+at+1.24.05+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/2/7c246b8fbb238d4379c3cfa4ababde2bc2f9c547.png)

For DISTRIBUTION you then need to do the additional steps:

- Near the end of the output log is a long line that starts with `/usr/bin/codesign --force --sign ...` – copy this code signing line and keep it until we need it several steps along the way below
- Unzip the `.ipa' file either by opening it with `Archive Utility.app`or running`unzip filename.ipa`in the terminal. (This will extract it into a`Payload` folder)
- Open `Payload/UE4Game.app/Info.plist` in a text editor (or the plist editor) and change `YourName` in the bundle identifier to your organization name used on your apple developer account. For example, I changed my bundle identifier from `com.YourCompany.ToppleTown` to `com.agileperception.toppletown` – notice that the case (upper/lower) of the app id has to match your app id in Apple’s developer console _exactly_.
- Get the code signing command that you saved from a few steps ago (the one that starts with `/usr/bin/codesign...`) and run in in Terminal.app
- Re-zip the fixed package with `zip -r SomeName.ipa Payload`
- Upload your app by going to Xcode and selecting `Xcode > Open Developer Tool > Application Loader` and using _that_ version of the Application Loader that shipped with your current Xcode. This is stored inside Xcode itself, so using any other version will eventually get you into trouble.

**And that’s as far as this workaround gets you. There are at least 5 more bugs which I cannot yet work around:**

 ![120400-screen+shot+2016-12-31+at+1.00.06+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/3/c9354c20786dcfbf303942b577c25c8049ed663b.png)

## You get a little farther on the unreleased 4.15 branch

- You don’t have to do the unzipping, code signing, re-zipping
- You hit less errors uploading to the app store (these two errors have a separate post [here (for both of them)][4] and [here (for one of them)][5]:

 ![120428-screen+shot+2016-12-31+at+7.45.57+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/c/e7c31d0d7be3550f4ba8310c311cf1cc05a39ee6.png)

# Extra Tips:

- If your app fails to launch on the AppleTV after the installation step, try deleting the existing app from the AppleTV (hold down the main button on the app, then press play/pause, then select delete)
- The [GetPlatform blueprint node erroneously returns “IOS” on tvOS][7].

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2bfba907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2bfba907](https://forums.unrealengine.com/u/anonymous_user_2bfba907)\
**Post date:** [January 27, 2017, 6:09pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/34 "2017-01-27T18:09:05Z")

</div>

,

I was able to repro the issue you were seeing with certificates and provisions. Here’s what I did based on what has already been discussed in this thread:

1. Deleted all provision profiles and certificates

2. Imported TVOS distribution certificate and both IOS and TVOS distribution provision profiles with the appropriate bundle id

3. Imported the IOS development certificate as well

With these steps, I was getting the same error as you were, regarding missing provision and certificate. In the accepted answer, you mentioned also importing wildcard provision profile. So:

1. Imported the wildcard provision profile that mapped to the IOS development certificate from step 3

After this I was able to get past the errors and package the TVOS project. The build process for TVOS borrows/shares a lot with the IOS build process that’s why you need to also have IOS certificates and the provision profile that maps to it.

Separately, you seemed to have encountered the bundle id issue which should be fixed in the next update. The issue was that the project config INI files were not getting included into the config hierarchy so it would end up using the default value from Engine/Config base Engine INI files. So, after the next update is released, you should not need to go through the resigning since the plist will have the correct bundle id.

In short, your workaround is just how the build process works for TVOS and the bundle id issue will be fixed in the next update.

Cheers!

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [April 4, 2017, 1:23pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/35 "2017-04-04T13:23:19Z")

</div>

were u able to solve it in 4.14.3 ?

is there any plan to solve this problem in 4.15 ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [April 4, 2017, 4:57pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/36 "2017-04-04T16:57:36Z")

</div>

No.

No.

It’s pretty sad. I started trying to submit my project for the AppleTV on 26 November 2016. UE4 hasn’t been able to produce a submittable build yet.

It might be fixed in 4.16. See [Uploading tvOS project: ERROR ITMS-90513 & ITMS-90471 - Platform & Builds - Epic Developer Community Forums](https://answers.unrealengine.com/questions/544748/uploading-tvos-project-error-itms-90513-itms-90471.html)

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [April 4, 2017, 7:42pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/37 "2017-04-04T19:42:57Z")

</div>

did u try to pacakge it for ios ?  
I am having same issue . But my project is for ios. Not for tvos .

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [April 4, 2017, 7:44pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/38 "2017-04-04T19:44:04Z")

</div>

Yes, iOS works fine for me without any errors.

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [April 7, 2017, 8:20am UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/39 "2017-04-07T08:20:19Z")

</div>

by any are u using Xcode7 for ios?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [April 7, 2017, 3:40pm UTC](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770/40 "2017-04-07T15:40:58Z")

</div>

No, I use the latest Xcode 8.x

[Previous page](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770.md?page=1)

[Next page](https://forums.unrealengine.com/t/tvos-package-for-distribution-fails-to-find-valid-certificate-and-valid-provision-ue-39501-workaround/377770.md?page=3)
