Kodi on Apple TV 4k 2nd Gen

Intro

Notes on installing Kodi on a new Apple TV 4K (2nd generation). This didn’t go smoothly and it needs redone/updated anually when the certificate expires. If the solution I came up with also works for you, please let me know.

The Kodi Wiki HOW-TO here explains the steps in detail

I followed the steps as closely as I could, but it didn’t work for me. Here’s a note of the diagnostic steps I took, and the changes I made to get it installed and working successfully…

Problems & error messages

The process appeared to go well up until the point of installing the newly built and freshly signed ipa on the target device, but after a minute or two the XCode deploy step ended with a generic “Unable to install” followed by the name of the package was I was trying to deploy (and I tried quite a few!).

Example error messages:
Unable to install "kodi-20210422-3a7c0f50-master-tvos"
Unable to install "org.xbmc.kodi-tvos_19.1-0-tvos"

After clicking OK the process ended with no further info, so I went to look for some logs in XCode -> Windows -> Devices & Simulators -> “Open Console“:

then in the Console selected Devices (on the left), then my AppleTV from the list on the left, and narrowed things down by filtering for “Errors & Faults“.

I could then see that each attempted deploy had resulted in an error log entry like this:

Failed to install application at <~~~> : Error Domain=MIInstallerErrorDomain Code=37 "<~~~>" UserInfo={LegacyErrorString=<~~~>, FunctionName=<~~~>, SourceFileLine=652, NSLocalizedDescription=<~~~>}

This is the full original message – I haven’t taken out my details and replaced them with <—> or anything, there was just exactly the above: interesting elements being an installer error, code=37 and reference to line 652 in some source file… not a lot to go on.

There were no good hits from a search on this message at the time, and the few roughly related suggestions were where there was a mismatch between the deployment target version and the built application – e.g. when the app was built for a specific iPad version, but deployed to a later version. No good match and nothing obviously helpful.

What worked for me

I think it took a combination of two things to get this working for me.

The first thing was using an older version of the iOS App Signer application (details and link below) to sign my newly generated ipa file, while I was trying to replicate the steps from other guides as closely as possible.

The other thing I did just before that which seems to have contributed was to deploy the sample example “Hello World” XCode project to my device from XCode first, then was able to deploy the Kodi ipa (signed with the older App Signer), and it then “just worked”, after many failures.

Verification
I have recently deleted Kodi from  my device and tried to add the same singed Kodi ipa again - resulting in "Unable to install". 

After deploying the example app first, I was then able to replace it with the same signed Kodi ipa without issues.
iOS App Signer

Following the guide, I had originally downloaded and used the latest available version – 1.13.1 at the time – with no joy, but getting the older Version 1.7 (r17) worked for me with these settings:

These are the same settings I used when (unsucessfully) trying to sign with the latest version of the app.

Deploy XCode project to Apple TV

While trying to verify connectivity and permissions and rule some things out, I tried to deploy the sample project from XCode to my Apple TV. This was done by selecting my physical device (as opposed to the default emulator) as the deployment target, then building & deploying the “Hello world” project.

This worked and I could see a new application appear on my Apple TV home screen – when clicked in the Apple TV Menu page, it said Hello World, as you’d expect…

I could now see this application on the Installed Apps page for my device in XCode. When I then attempted to deploy the signed Kodi IPA I’d built, signed with the older iOS App Signer, this was replaced with Kodi and it now works as expected.

It would be great to know if both of these steps are required, or if just one of them was all that was needed. If you are hitting the same issue please let me know what works for you – deploying an initial test app then using the latest iOS App Signer, or not deploying the test app and using the older iOS App Signer version, perhaps?

Links

The older version of app signer I used was:

https://github.com/DanTheMan827/ios-app-signer/releases/download/r17/iOS.App.Signer.app.zip

and the deb file I used was org.xbmc.kodi-tvos_19.1-0-tvos.deb from:

https://mirrors.kodi.tv/releases/darwin/tvos/org.xbmc.kodi-tvos_19.1-0-tvos.deb

the end result is a happy Kodi install on my new Applt TV 4k 2nd Gen:

Pin It on Pinterest

%d bloggers like this: