custom apple tvOS app crashes after a few days

109 Views Asked by At

I made a custom apple TV app in Xcode and installed it on an apple TV. It works fine for a few days, then it crashes and becomes unavailable.

Is this because something is wrong with the code or expected behavior for apps manually installed on apple TV?

Any help is appreciated!

2

There are 2 best solutions below

2
Jesse Milam On

Have you tried using Apple's Leaks instrument to check for some sort of memory leak? If your app is crashing after a few days, this would suggest a possible memory leak so would be worth looking into.

https://developer.apple.com/library/content/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html#//apple_ref/doc/uid/20001883-SW2

The Leaks instrument provides leak-detection capabilities identical to those in the leaks command-line tool. The Leaks instrument records all allocation events that occur in your application and then periodically searches the application’s writable memory, registers, and stack for references to any active memory blocks. If it does not find a reference to a block in one of these places, it deems the block a “leak” and displays the relevant information in the Detail pane.

0
Yidan Wang On

The culprit of the crash is the lack of appropriate licensing. Once I registered as an Apple Developer and paid the subscription fee, the app stopped crashing after a few days.