tvOS is the operating system for Apple TV.

tvOS Documentation

Posts under tvOS tag

158 Posts
Sort by:
Post not yet marked as solved
2 Replies
325 Views
Hi, I'm trying to develop a simple app, that presents some dashboard on the screen, and in the background I'm using some music app (Apple Music or Spotify) - while I see my dashboard. While listening to music, I’ve noticed that after a few minutes, (1-2), the music app takes priority, displaying the album art, title and artist. how do I prevent it? thanks a lot in advance!
Posted
by
Post not yet marked as solved
0 Replies
119 Views
Hi all, I have downloaded my entire apple movie library to my Mac so I can stream it to my various devices locally. What I’d like to do is show the cover art in plex and when I click it it launches to the movie in the computers app on my Apple TV. Getting the cover art in plex is easy enough, but is there any way to launch an Apple TV app to go directly to a specific content location? Example: can I do something like http:/{Apple TV IP}/computers?movie=UP
Posted
by
Post not yet marked as solved
2 Replies
345 Views
Hi there, I'm experiencing several crashes on JavaScriptCore pas_panic_on_out_of_memory_error, only on devices with tvOS 15.4 and 15.4.1. This happens with users using the app for several hours as well as 5 seconds after launching the app. Devices: AppleTV6,2 and AppleTV5,3 Thread 14 — JavaScriptCore pas_panic_on_out_of_memory_error (JavaScriptCore) JavaScriptCore bmalloc_try_iso_allocate_impl_impl_slow (JavaScriptCore) JavaScriptCore bmalloc_heap_config_specialized_local_allocator_try_allocate_small_segregated_slow (JavaScriptCore) JavaScriptCore bmalloc_allocate_impl_casual_case (JavaScriptCore) JavaScriptCore ***::String::String(char16_t const*, unsigned int) (JavaScriptCore) JavaScriptCore JSC::LiteralParser<char16_t>::parsePrimitiveValue(JSC::VM&) (JavaScriptCore) JavaScriptCore JSC::LiteralParser<char16_t>::parse(JSC::ParserState) (JavaScriptCore) JavaScriptCore JSC::jsonProtoFuncParse(JSC::JSGlobalObject*, JSC::CallFrame*) (JavaScriptCore) JavaScriptCore llint_entry (JavaScriptCore) JavaScriptCore llint_entry (JavaScriptCore) JavaScriptCore llint_entry (JavaScriptCore) JavaScriptCore llint_entry (JavaScriptCore) JavaScriptCore vmEntryToJavaScript (JavaScriptCore) JavaScriptCore JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) (JavaScriptCore) JavaScriptCore JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*) (JavaScriptCore) JavaScriptCore vmEntryToNative (JavaScriptCore) JavaScriptCore JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) (JavaScriptCore) JavaScriptCore JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) (JavaScriptCore) JavaScriptCore JSObjectCallAsFunction (JavaScriptCore) JavaScriptCore -[JSValue invokeMethod:withArguments:] (JavaScriptCore) ITMLKit -[IKJSObject invokeMethod:withArguments:] (ITMLKit) ITMLKit -[IKJSEventListenerObject invokeMethod:withArguments:thenDispatchEvent:extraInfo:] (ITMLKit) ITMLKit __43-[IKJSXMLHTTPRequest setRequestReadyState:]_block_invoke (ITMLKit) ITMLKit -[IKAppContext _doEvaluate:] (ITMLKit) ITMLKit -[IKAppContext _evaluate:] (ITMLKit) ITMLKit __41-[IKAppContext evaluate:completionBlock:]_block_invoke (ITMLKit) ITMLKit -[IKAppContext _sourcePerform] (ITMLKit) ITMLKit -[IKConcurrentEvaluator lockSchedulingForEvaluation:] (ITMLKit) ITMLKit IKRunLoopSourcePerformCallBack (ITMLKit) CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (CoreFoundation) CoreFoundation __CFRunLoopDoSource0 (CoreFoundation) CoreFoundation __CFRunLoopDoSources0 (CoreFoundation) CoreFoundation __CFRunLoopRun (CoreFoundation) CoreFoundation CFRunLoopRunSpecific (CoreFoundation) ITMLKit -[IKAppContext _jsThreadMain] (ITMLKit) Foundation __NSThread__start__ (Foundation) libsyste...ad.dylib _pthread_start (libsystem_pthread.dylib) libsyste...ad.dylib thread_start (libsystem_pthread.dylib) This issue seems very similar to this existing thread, although not sure its related
Posted
by
Post not yet marked as solved
0 Replies
141 Views
I'd like to develop a music visualizer app for tvOS which has the ability to listen to whatever background audio is playing (like Spotify, Pandora, etc.). Does anyone know if this is even possible on iOS/tvOS? In other words, there would have to be some functionality that allows the system audio output to be treated like an audio input. I imagine that it would be the same functionality as doing a screen recording capture, at least the audio part. My goal is to be able to do this programatically (Objective-C) so that the user doesn't have to do anything, it just "works" out of the box, so to speak. Thanks
Posted
by
Post marked as solved
1 Replies
989 Views
I'm able to build and run the TV app with the TVTopShelf extension on simulators and physical Apple TVs but I get an error when I try to validate (or distribute) the archive built from XCode. The error says: App Store Connect Operation Error - Asset validation failed The log files don't provide more information: "Error Domain=ContentDelivery Code=90362 "App Store Connect Operation Error" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=App Store Connect Operation Error, NSLocalizedRecoverySuggestion=Asset validation failed}" As far as I know the certificate, the identifiers and the provisioning profiles for both the tvOS app and the TVTopShelf extension are OK. When I choose to manually select signing options, I can set the provisioning profiles for both the app and the extension and XCode does not complain about them. Is there something specific to know when distributing an app with an extension app? Is there some configuration to set on AppStoreConnect side? Or common pitfalls to avoid? Thanks for your help.
Posted
by
Post not yet marked as solved
0 Replies
161 Views
I have a ATV4k 32 GB that the audio has stearted curtting out regularly for about 3 seconds and about every 2-3 minutes. It started out being once in a while, now it's regularly across most streaming apps but most severely AppleTV+. serial# DY5DMBLWJ1WF
Posted
by
Post not yet marked as solved
0 Replies
253 Views
Hi Team, In tvOS based on Siri/IR Remote, Keyboard layout will be differently. Is there a way to identify whether user is using Siri Remote or IR Remote, so that we update the UI accordingly. We are using react native or tvOS development and search results UI is developed in React Native. So, we wanted to know which remote user is using.
Posted
by
Post not yet marked as solved
1 Replies
263 Views
I have a UICollectionViewController in shared iOS/tvOS code. On iOS I use context menus while I fallback to UIAlertController (alert sheet) triggered by a long press on tvOS. viewDidLoad: override func viewDidLoad() {     super.viewDidLoad() // ...     #if os(tvOS)     let longPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(longPressAction(_:))) collectionView.addGestureRecognizer(longPressGestureRecognizer)     #endif } Selector: #if os(tvOS) @objc func longPressAction(_ sender: UIGestureRecognizer) {     guard sender.state == .began else {         return     }     if let indexPath = collectionView.indexPathForItem(at: sender.location(in: collectionView)) {         let ac = UIAlertController(/* ... */) // alert sheet         present(ac, animated: true, completion: nil)     } } #endif Upon long pressing, the alert sheet gets displayed properly on tvOS but the first tap on one of the sheet actions is ignored (this calls longPressAction again with a .cancel state). I tried inserting a sender.isEnabled = false after the guard but it simply caused the .cancel state to come in faster while still eating the first tap. Suggestions?
Posted
by
Post marked as solved
2 Replies
301 Views
I have a UITableViewController shared between my iOS and tvOS apps. In order to refresh some of the cells, I call reloadRows. It works fine as far as updating the cell's data but, on tvOS, it moves the focus back to the top of the table. I've noticed that preferredFocusEnvironments does not get called (unlike what happens when I do reloadData). This is pretty much the same issue mentioned in the following post (years ago): https://developer.apple.com/forums/thread/67219 Any suggestions?
Posted
by
Post not yet marked as solved
0 Replies
266 Views
Hi, In the past, I have tried to make an app that reads JSON from a remote server. I tried to use the same steps that are done with an iOS app, without success. I need to know if its even possible and where I would need to look to get this up and running. Thanks, Dan Uff
Posted
by
Post not yet marked as solved
1 Replies
295 Views
Hi! I learnt that tvOS 15's playback has a new red "LIVE" badge next to title view. The LIVE badge appears when the video is streaming. However, how does it know the video is live streaming and manage to display? Is the information which defines Live streaming included in metadata? I watched WWDC 21 and read an official document but couldn't find the answer. WWDC21: https://developer.apple.com/videos/play/wwdc2021/10191/
Posted
by
Post marked as Apple Recommended
6.5k Views
When archiving and uploading a build of our tvOS app to App Store Connect with Xcode 13.3RC, it gets rejected with TMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path. When archiving and uploading with Xcode 13.2.1 the build is accepted and processed. I could not find any rpath issues when inspecting the binary with otool -L and otool -l. Has anyone else experienced the this issue with Xcode 13.3RC? I've filed feedback FB9952607
Posted
by
Post not yet marked as solved
0 Replies
196 Views
Hi, I am creating audio player in tvos which is quite similar to Podcast App (Playing in background and stoping when user press pause button from Tv Remote). It is working fine when app is in foreground but creating issue when app is background. Audio Player is not getting stopped when user is pressing play/Pause button from remote. I have added MPRemoteCommandCenter target to my home controller. And I am using my audio player as single ton class. Below is snap shot of my code  private func setUpCommand() {     let commandCenter = MPRemoteCommandCenter.shared()     commandCenter.playCommand.isEnabled = true     commandCenter.pauseCommand.isEnabled = true     commandCenter.playCommand.addTarget {(commandEvent) -> MPRemoteCommandHandlerStatus in       PodcastPlayer.shared.playPauseCommad()       return .success     }      commandCenter.pauseCommand.addTarget {(commandEvent) -> MPRemoteCommandHandlerStatus in       PodcastPlayer.shared.playPauseCommad()       return .success     }   } Above code is not triggering when app is in background.
Posted
by
Post not yet marked as solved
1 Replies
300 Views
I am unable to get In-App Purchases working on a tvOS app target. The IAP SKProductsRequest is successful when running the same code in my iOS target/simulator, but does not work in either a tvOS simulator or physical device. class StoreManager: NSObject, ObservableObject, SKProductsRequestDelegate, SKPaymentTransactionObserver {          //FETCH PRODUCTS     var request: SKProductsRequest!          @Published var premium = SKProduct()          func getProducts() {         print("Start requesting products ...")         let productID = "com.willswire.appname.premium"         let request = SKProductsRequest(productIdentifiers: Set([productID]))         request.delegate = self         request.start()     }          func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {         print("Did receive response")                  if let product = response.products.first {             DispatchQueue.main.async {                 self.premium = product             }         }                  for invalidIdentifier in response.invalidProductIdentifiers {             print("Invalid identifiers found: \(invalidIdentifier)")         }     }          func request(_ request: SKRequest, didFailWithError error: Error) {         print("Request did fail: \(error)")     }          //HANDLE TRANSACTIONS     @Published var transactionState: SKPaymentTransactionState?          func purchaseProduct() {         if SKPaymentQueue.canMakePayments() {             let payment = SKPayment(product: self.premium)             SKPaymentQueue.default().add(payment)         } else {             print("User can't make payment.")         }     }          func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {         for transaction in transactions {             switch transaction.transactionState {             case .purchasing:                 transactionState = .purchasing             case .purchased:                 UserDefaults.standard.setValue(true, forKey: "premium")                 queue.finishTransaction(transaction)                 transactionState = .purchased             case .restored:                 UserDefaults.standard.setValue(true, forKey: "premium")                 queue.finishTransaction(transaction)                 transactionState = .restored             case .failed, .deferred:                 print("Payment Queue Error: \(String(describing: transaction.error))")                 queue.finishTransaction(transaction)                 transactionState = .failed             default:                 queue.finishTransaction(transaction)             }         }     } }
Posted
by
Post not yet marked as solved
0 Replies
535 Views
I reset the old player item(remove all observers also) and avplayercontroller then add a new avplayerviewcontroller instance and avplayer and player item on playing a new asset/stream etc. It works fine and no crash in tvos 14, 13 etc. But in tvos 15.2 and above i get the following stack trace. Below are the details i could collect from firebase, please check if it could help you to infer the cause of the crash. Thanks! Crashed: com.apple.main-thread SIGSEGV 0x00000007f2e51110 Crashed: com.apple.main-thread 0 libobjc.A.dylib        0x7624 class_getMethodImplementation + 32 1 Foundation           0xa1f30 _NSKVONotifyingOriginalClassForIsa + 28 2 Foundation           0x9db38 _NSKeyValueObservationInfoGetObservances + 272 3 Foundation           0xa8c50 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 244 4 Foundation           0xa9540 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68 5 Foundation           0xa2080 _NSSetObjectValueAndNotify + 284 6 AVKit             0xe6b8 -[AVInterstitialController dealloc] + 32 7 AVKit             0x356e4 -[AVPlayerControllerTVExtras .cxx_destruct] + 144 8 libobjc.A.dylib        0x7d68 object_cxxDestructFromClass(objc_object*, objc_class*) + 112 9 libobjc.A.dylib        0x1dad0 objc_destructInstance + 88 10 libobjc.A.dylib        0x24f90 _objc_rootDealloc + 52 11 libsystem_blocks.dylib     0x37f8 _Block_release + 184 12 libdispatch.dylib       0x4f84 _dispatch_client_callout + 16 13 libdispatch.dylib       0x12164 _dispatch_main_queue_callback_4CF + 916 14 CoreFoundation         0x7a698 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 15 CoreFoundation         0x74b18 __CFRunLoopRun + 2528 16 CoreFoundation         0x73bf4 CFRunLoopRunSpecific + 572 17 GraphicsServices        0x6afc GSEventRunModal + 160 18 UIKitCore           0xa9ccd0 -[UIApplication _run] + 1080 19 UIKitCore           0xaa20cc UIApplicationMain + 164 20 XXXXXXX          0xc474 (Missing UUID xxxxxxxxx…) 21 ???              0x1030e91d0 (Missing)
Post not yet marked as solved
0 Replies
182 Views
Hello! We are currently trying to develop a TVos Application using SwiftUI, which uses the regular siri-remote-commands for the primary navigation. However, we would like to develop a custom remote control acting as Bluetooth-Keyboard, which has additional keys such as numbers to improve accessibility amongst technically unskilled people. (For prototyping we use an Apple Magic Keyboard) It seems to me tough, that no Keyboard-Inputs apart from the ones also aviable on the Siri remote, are able to be intercepted in any way outside of Textfields in TVos, is that correct? I tried accessing the Keyboard via the CoreBluetooth stack, but connected HIDs are not showing up there (By design, how i learned) Is there any way to recieve non-siri-remote-compliant Keyboard-Inputs (such as the numbers) on TVos, without an overlay popping up?
Posted
by
Post not yet marked as solved
2 Replies
482 Views
I reset the old player item(remove all observers also) and avplayercontroller then add a new avplayerviewcontroller instance and avplayer and player item on playing a new asset/stream etc. It works fine and no crash in tvos 14, 13 etc. But in tvos 15.2 and above i get the following stack trace. Foundation - _NSKVONotifyingOriginalClassForIsa Foundation _NSKVONotifyingOriginalClassForIsa  Foundation _NSKeyValueObservationInfoGetObservances  Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:]  Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]  Foundation _NSSetObjectValueAndNotify  AVKit -[AVInterstitialController dealloc]  AVKit -[AVPlayerControllerTVExtras .cxx_destruct]