-1

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!

rmaddy
  • 314,917
  • 42
  • 532
  • 579

2 Answers2

1

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.

  • Thanks Jesse! I used Objective C and did not use any malloc in my code. Could there still be memory leak? – Yidan Wang Jun 19 '17 at 15:07
  • It's rare (although still theoretically possible). You could run the application within the tvOS simulator and use the memory statistics to monitor usage over a period of time. This might be able to confirm or rule out possible memory issues. https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/MonitoringMemoryUsage.html – Jesse Milam Jun 19 '17 at 15:16
0

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.