tvOS top shelf doesn't show up on Testflight installs; wrong app ID?

I have a tvOS app Top Shelf extension that works great on the simulator. But when I deploy it to devices via TestFlight, I only get a static top shelf image, not my top shelf extension.


I noticed just now when trying to submit it again that, in the Submit To App Store dialog, in the Entitlements section, the Application-Identifier prefix is *different* from my main app's app ID prefix. As a test, I looked at my watchOS extensions on my main app in this same upload dialog, and there the prefix is the same as the main app's app ID prefix.


Is this causing my top shelf extension not to show up on a real device? How do I fix this?


Thanks.

Accepted Reply

I debugged it on a device. It would just crash with a return value of zero. I narrowed it down to a problem in my code between using UIGraphicsBeginImageContext & UIGraphicsEndImageContext. Turns out I didn't need that code.


Everything works great now.

Replies

This jogged my brain about a problem a couple years ago.


https://stackoverflow.com/questions/18460586/is-it-safe-to-change-the-appid-prefix-between-updates


I submitted a request to Apple support. I hope this fixes the issue.

So.


It turns out the "automatic signing" in Xcode upload to App Store was using an Xcode-generated wildcard App ID, which had a legacy (non-Team ID) prefix. I deleted that wildcard App ID, generated an app extension-specific App ID, then downloaded & installed it, and rebuilt.


Then I got another error "Profile doesn't match the entitlements file's value for the application-identifier entitlement", so I found this:

https://stackoverflow.com/questions/46148523/profile-doesnt-match-the-entitlements-files-value-for-the-application-identifi


So then I went back to the Extension configuration in Xcode, and in the Capabilities tab I turned on, then off, the iCloud capability (probably could've done any of them), rebuilt & uploaded and it was accepted.


Just tested an install on an actual Apple TV via TestFlight, and, alas, it's still not working.

I debugged it on a device. It would just crash with a return value of zero. I narrowed it down to a problem in my code between using UIGraphicsBeginImageContext & UIGraphicsEndImageContext. Turns out I didn't need that code.


Everything works great now.