x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Update: Here is a screencast of the whole process.

Update 2: Discovered a workaround. Scroll down to the "accepted answer" at the bottom of the page.

tvOS distribution packaging is not working at all for me. I managed to workaround the development packaging issues through the patch + workaround in this answerhub post I started in October.

Now I need to package for distribution, and I am having no luck.

My app is named "Topple Town". The certificate(s), app id(s), and provision(s) are all brand-new, made just for this app. I will list the various things that I have tried thus far.

HERE IS EXACTLY WHAT I HAVE TRIED

This is on a Mac Pro (Late 2013), 10.11.6, Xcode 8.1

All of the certificate/id/provision stuff is done using the web gui of Apple's "Certificates, Identifiers & Profiles" section of developer.apple.com

  1. Generate Production certificate of type App Store and Ad Hoc. You can't choose it's name...they auto name it Nathaniel Stocks, because that's my name. Type is set to iOS Distribution. I am somewhat concerned that there is nothing tvOS-specific, but there are no options for App Store certificates other than this one that I selected.

  2. Generate App ID on Apple's site: Name: Topple Town, ID com.agileperception.toppletown

  3. Create Distribution Provisioning Profile. Name: Topple Town tvOS Distribution Profile, Type: tvOS Distribution, App ID: Topple Town (com.agileperception.toppletown)

  4. Delete ALL certificates from Keychain Access and delete ALL provisions on my Mac from ~/Library/MobileDevice/Provisioning Profiles

  5. Download the certificate from step #1. In Project Settings > iOS I click Import Certificate and select the downloaded certificate file, which succeeds (see screenshot after step 6)

  6. I download the provision from step #3. I click Import Provision and select the downloaded file, which succeeds (see screenshot below) alt text

  7. I set Bundle Display Name to Topple Town

  8. I set Bundle Name to toppletown

  9. I set Bundle Identifier to com.agileperception.toppletown

  10. I select File > Package Project > tvOS, which causes an instant error.

    ...and you get these errors

MessageLogErrorScreenshot

Here is the full text of the output log from the session: tvOS_distribution_errors_from_output_log.txt

You can see the certificate and provision getting imported on lines 271-275. Everything after that is from trying to make the package.

So what now?

I have also tried the following variations:

  1. Wildcard App ID's with corresponding Provisioning Profiles that use them.

  2. Checking the boxes next to the provision and certificates

  3. Upgrading to 4.14.0

  4. Building 4.13.2 from source with this additional patch

Nothing I have tried so far has so much as changed the error message that I get.

Tell me what I should try, and I will dutifully try it! I just want to get my project onto the app store for tvOS!

Product Version: UE 4.14
Tags:
more ▼

asked Nov 29 '16 at 04:50 AM in Bug Reports

avatar image

CleanCut
2.1k 66 84 77

avatar image Samantha Sutton ♦♦ STAFF Dec 02 '16 at 07:32 PM

CleanCut,

Try reinstalling your certificates and provisions through the Editor, not Xcode. There is a known issue for this which isn't fixed in 4.14.0 (UE-38006).

Thanks!

avatar image CleanCut Dec 02 '16 at 08:37 PM

Samantha, I'm very sorry but that has no effect.

I deleted all certificates from Keychain access. I deleted all provisions from ~/Library/MobileDevice/Provisioning Profiles/. I opened my project in 4.14.0. I imported the certificate and provision through the Editor. I attempted to package for tvOS on the desktop and received the same set of errors.

As a side note, please be aware that the commit linked to from UE-38006 is present in the 4.14.0-release tag in GitHub. (ie the listed patch is IN 4.14.0).

What else can I try?

avatar image Samantha Sutton ♦♦ STAFF Dec 02 '16 at 09:55 PM

Have you made sure your Worldwide Developer Relations Intermediate Certification is up to date?

https://developer.apple.com/support/certificates/expiration/

avatar image CleanCut Dec 02 '16 at 11:38 PM

I have never seen that before! Unfortunately, that also does not change the errors at all. Same behavior. I tried deleting all certificates and provisions, then deleting the expired WDRIC (the new one is already there), then also deleting all other expired items in Keychain, then importing the distribution certificate and provision through the editor. All that, and the exact same "not found" errors. This was all on 4.14.0.

On the bright side, it did fix this other issue I was experiencing, so I will update that answerhub post. That's something. Now I have two machines I can try things on.

What else can I try?

avatar image Samantha Sutton ♦♦ STAFF Dec 06 '16 at 07:37 PM

CleanCut,

I'm so happy to hear that at least one of your issues has been resolved thus far. So I ran a test today and I ran into the 'provisions not found' error while packaging for tvOS.

I spoke with our tvOS Specialist to ensure there wasn't an actual issue. He then tested and did not have a problem.

I was able to resolve it by doing the following:

  • Closed the Editor

  • Removing my provisions from the provisioning profile

  • Opened the Editor back up

  • Added only the Provisions that I needed for tvOS

  • Added only the certificate that would be used for tvOS

  • Packaged the project for tvOS

This corrected the issue for me. I know you have double checked multiple times that you've used the correct provisions and certificates, but you might need a complete refresh.

There was some provisioning logic changed when Xcode was updated therefore, any older certificates/provisions were causing errors during packaging.

Upload new logs as you continue testing, please.

avatar image CleanCut Dec 06 '16 at 08:01 PM

I have deleted ALL the provisions and certificates every time. I have only been using certificates/provisions for tvOS during this process. I don't know what you expect to change(?)

Nevertheless, I will run through the entire process again as you laid out with both 4.13.2 and 4.14.0 and attach the logs as you request. I just upgraded my workstation to macOS Sierra last night, so perhaps that will affect something as well (though my laptop is already on macOS Sierra and exhibits the same behavior).

By the way, there is only one certificate type for distribution. Were you testing with production/distribution settings? This is different than developer settings. Also, what value did you put for your App ID? Did it use a wildcard at all?

The certificate I created was the "Production: App Store and Ad Hoc" certificate, and it names itself ios_distribution.cer externally and iPhone Distribution: Nathaniel Stocks (...) internally, despite the fact that I'm using it for tvOS.

certificate types

avatar image CleanCut Dec 07 '16 at 04:15 AM

Deleted all certificates and provisions beforehand macOS Sierra 10.12.1 Xcode 8.1 UE 4.13.2

  • Distribution certificate

  • Distribution provision for app id com.agileperception.toppletown

alt text alt text alt text alt text

link text

avatar image CleanCut Dec 07 '16 at 04:26 AM

Deleted all certificates and provisions beforehand, macOS Sierra 10.12.1, Xcode 8.1, UE 4.13.2

  • Distribution certificate

  • Distribution provision for app id *

alt text alt text alt text alt text link text

avatar image CleanCut Dec 07 '16 at 04:34 AM

Deleted all certificates and provisions beforehand, macOS Sierra 10.12.1, Xcode 8.1, UE 4.14.0

  • Distribution certificate

  • Distribution provision for app id com.agileperception.toppletown

alt text alt text alt text alt text link text

avatar image CleanCut Dec 07 '16 at 04:40 AM

Deleted all certificates and provisions beforehand, macOS Sierra 10.12.1, Xcode 8.1, UE 4.14.0

  • Distribution certificate

  • Distribution provision for app id *

alt text alt text alt text alt text link text

avatar image rckt26 Dec 04 '16 at 09:02 PM

I get the same error on a Windows. I haven't tried it on a mac yet. I have a valid certificate and tvOS mobileprovision profile and they both show green in the Project settings and I'm using a new blank project.

If I have the iOS mobileprovision profile present also with the same bundle identifier it tries to use the iOS profile instead of the tvOS profile and of course I get an entitlement error because it used the wrong profile.

avatar image CleanCut Dec 05 '16 at 05:30 PM

Glad to know it's a cross-platform bug. Hopefully that means it will get more attention.

avatar image rckt26 Dec 28 '16 at 07:48 AM

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.

avatar image CleanCut Dec 30 '16 at 08:16 PM

@rckt26 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.

avatar image Muzaheed Apr 04 '17 at 01:23 PM

were u able to solve it in 4.14.3 ?

is there any plan to solve this problem in 4.15 ?

avatar image CleanCut Apr 04 '17 at 04:57 PM

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 https://answers.unrealengine.com/questions/544748/uploading-tvos-project-error-itms-90513-itms-90471.html

avatar image Muzaheed Apr 04 '17 at 07:42 PM

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

avatar image CleanCut Apr 04 '17 at 07:44 PM

Yes, iOS works fine for me without any errors.

avatar image Muzaheed Apr 07 '17 at 08:20 AM

by any chance are u using Xcode7 for ios?

avatar image CleanCut Apr 07 '17 at 03:40 PM

No, I use the latest Xcode 8.x

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

tvOS Distribution Package PARTIAL Workaround (4.14)

Bug UE-39501

Thanks to @rckt26 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:

alt text

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:

alt text

You get a little farther on the unreleased 4.15 branch

alt text

Extra Tips:

more ▼

answered Dec 30 '16 at 09:05 PM

avatar image

CleanCut
2.1k 66 84 77

avatar image nomahr STAFF Jan 27 '17 at 06:09 PM

CleanCut,

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:

4) 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!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

CleanCut,

Thank you for pointing out that it's distribution having the issue. I have submitted a JIRA UE-39501 to our developers for this issue. Please check our public Jira for updates.

Thanks!

more ▼

answered Dec 08 '16 at 04:02 PM

avatar image CleanCut Dec 08 '16 at 04:43 PM

Thank you!!!

avatar image CleanCut Dec 08 '16 at 05:10 PM

Samantha, first off, thanks for all your help so far!

Next, it appears that you marked my issue regarding *development* provisions and certificates as a duplicate of this one and that the comments were locked.

1) I never received a notification email that that issue was marked as a duplicate. In addition to the comments being locked, that makes it really difficult to notice and tell you that it's not a duplicate! Is this an AnswerHub bug?

2) It's not a duplicate. It's a problem with development provisions, instead of distribution ones.

I notice that you seem to be able to run the development profiles fine, yourself, but I can't get it to work following those same steps.

I am really trying to get to market on the AppleTV, so these issues are really important to me. So, I'm going to wipe my hard drive and install macOS Sierra from scratch and reinstall programs individually without restoring from backup. At the very least, perhaps I could deploy to the AppleTV in development mode to continue QA testing.

If you would go unlock the other AnswerHub post, we could continue our conversation there.

avatar image Samantha Sutton ♦♦ STAFF Dec 08 '16 at 05:16 PM

Thanks for pointing that out, it's very easy to believe questions are duplicates when they're so similar. I'm opening it back up. Please reply back to it when you've done the checks on your end to try and resolve the issue.

I'll post the steps on that one too, in case anyone else runs across it. :)

avatar image Muzaheed Apr 13 '17 at 03:57 PM

Sorry. For keep poking u about the issue. But it seems you are the only one who kept hitting on the issue.

I am going to try out your manual way of sigining ipa . Before trying it out one question,were you able to submit your ipa to appstore using that method?

avatar image CleanCut Apr 13 '17 at 04:47 PM

I think I'm the only one who cares about deploying to tvOS, is what it is.

No, I have never been able to submit a tvOS .ipa to the app store, no matter what. The current bugs have a ticket marked as expected to be fixed in 4.16. Which is the same process I went through with the earlier bugs in 4.15.

Before all this I would have thought a globally broken build process for an entire platform would have merited a hotfix. :-(

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Cleancut,

This suggestion may seem obvious and something you may have tried already but I was getting a slightly different error than yours when I didn't check the box for the provision and certificate in the project settings.

Best of luck, Omar

more ▼

answered Dec 09 '16 at 06:32 AM

avatar image

nomahr STAFF
6 1

avatar image CleanCut Dec 09 '16 at 05:11 PM

@nomahr I am happy to (re)try anything that could possibly get it working again. Thanks for the suggestion.

Checking the boxes of my distribution certificate and a distribution provision with a specific app id doesn't appear to have any effect.

I'm on UE 4.14.1 now, with a from-scratch installation of macOS Sierra, and I revoked/deleted all my production certificates/provisions and recreated them from scratch just a moment ago.

alt text alt text alt text alt text output log file for distribution cert plus specific app id provision

avatar image CleanCut Dec 09 '16 at 05:20 PM

UE 4.14.1, Xcode 8.1, fresh macOS Sierra.

Checking the boxes of my distribution certificate and a distribution provision with a wildcard app id also doesn't appear to have any effect.

alt text alt text alt text alt text output log file for distribution cert plus wildcard app id provision

avatar image Samantha Sutton ♦♦ STAFF Dec 09 '16 at 06:03 PM

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. :)

avatar image CleanCut Dec 09 '16 at 08:45 PM

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

avatar image nomahr STAFF Dec 09 '16 at 06:03 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

CleanCut,

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.

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!

more ▼

answered Dec 15 '16 at 04:28 PM

avatar image CleanCut Dec 15 '16 at 06:29 PM

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?

avatar image CleanCut Dec 15 '16 at 06:36 PM

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

avatar image CleanCut Dec 15 '16 at 07:46 PM

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).

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?

alt text alt text

avatar image Samantha Sutton ♦♦ STAFF Dec 21 '16 at 10:19 PM

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!

avatar image CleanCut Dec 23 '16 at 05:19 AM

Samantha, 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.

alt text alt text

avatar image CleanCut Dec 27 '16 at 07:53 PM
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question