tvOS is the operating system for Apple TV.

tvOS Documentation

Posts under tvOS tag

124 Posts
Sort by:
Post not yet marked as solved
2 Replies
499 Views
When we try to push blueprint for MDM over Wi-Fi in apple TV it fails, but in over the cable it works properly. After pushing the blueprint over Wi-Fi, the device gets rebooted and go through setup steps, at the end we don't see the step for Mobile Device Management. I'm attaching a sample Profile we attach to blueprint and Screenshot of Blueprint configuration.
Posted
by _kvnryn.
Last updated
.
Post not yet marked as solved
0 Replies
345 Views
In a tvOS app I have two buttons and would like to determine which one has focus when selected. Using func pressesBegan works for nw. override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) { guard let selected = UIScreen.main.focusedItem else { return } Xcode tells me that focusedItem is deprecated and I should use -[UIWindowScene focusSystem].focusedItem instead. Any suggestions on a code snippet that could be used. Thanks
Posted
by Boomer.
Last updated
.
Post not yet marked as solved
1 Replies
404 Views
I'm trying to improve our application to receive and handle events from a bluetooth keyboard. To intercept incoming events I use sendEvent: method. But I get a different event type for a different key. For example when I press 'Esc' key I get an event type is UIEventTypePresses (and event is a instance of UIPressesEvent class) but when I press 'ArrowUp' key I get an event type is 4 (there is no enum value for that number) and event is a instance of UIPhysicalKeyboardEvent class. In the first case I found a documentation of UIPressesEvent and I can implement handler for it. But for the second case I didn't find any documentations of UIPhysicalKeyboardEvent nether in the online documentation nor in the Xcode help. How can UIPhysicalKeyboardEvent events be handled? Is the any documentation for that? My target OS is tvOS 17.1
Posted Last updated
.
Post not yet marked as solved
0 Replies
427 Views
The alertController.view.tintColor = .yellow statement does not seem to take effect in TVOS 17 when creating alerts. Interestingly, when using the same alert code on TVOS 16, the specified color is applied successfully. I'm seeking assistance in resolving this discrepancy and would appreciate any guidance or solutions you can provide. I could understand that the Alert design aswell is modified which is not mentioned in the release notes of TVOS 17. Please help me out here. TVOS 17: TVOS 16:
Posted
by Ganesh56.
Last updated
.
Post not yet marked as solved
0 Replies
471 Views
Hello, I have a SwiftUI application that uses NavigationSplitView. It's working great on iOS, iPad, and macOS. I decided to give it a try on tvOS. After it builds, it will not allow user interaction on the NavigationSplitView's sidebar. I've tried various view focus modifiers without any success. I'd also expect this to "just work" as default behavior. I have filed FB13447961 on this issue. Here is a distillation of the code that demonstrates the problem. Any ideas? Thank you. enum Category : String, CaseIterable { case first case second case third } enum Detail : String, CaseIterable { case one case two case three } struct DetailView : View { let category : Category? var body: some View { if let category { Text(category.rawValue) List(Detail.allCases, id: \.self) { detail in NavigationLink(value: detail) { Text(detail.rawValue) } } } else { Text("Select Category") } } } struct ContentView: View { // NOTE: If this category is set to something, it will show that category's detail. // The problem is that the NavigationSplitView sidebar does not have, nor does not // seem to be able to get focus. @State var category: Category? @State var path : [Detail] = [] var body: some View { NavigationSplitView { List(Category.allCases, id: \.self, selection: $category) { category in Text(category.rawValue) } } detail: { NavigationStack(path: $path) { DetailView(category: category) .navigationDestination(for: Detail.self) { detail in Text("\(detail.rawValue)") } } } } } #wwdc2023-10162 #wwdc20-10042
Posted
by Bolsinga.
Last updated
.
Post not yet marked as solved
2 Replies
401 Views
I have an existing unlisted app on MacOS. I'd like to launch a tvOS version. However I can't figure out how the users would actually install the app. Unlike Mac/iOS, there isn't a browser for them to open the install link...
Posted Last updated
.
Post not yet marked as solved
0 Replies
349 Views
My app uses Core Data to store user data. It doesn't have login or profile mechanisms, because user data is tied to the user's Apple ID and synced via iCloud using CloudKit. I've recently added the User Management capability, and checked Runs as Current User to allow each Apple TV user to have access to its own data. Everything works as expected: I press and hold the TV button to select a different user in Control Center; The system shows a switching user UI; And the app is relaunched using the new user's Apple ID and data from iCloud. The problem is that switching users apparently causes the local Core Data managed database to be reset, removing all data from the previous user. This is inconvenient because every time we switch users, the newly selected user has to wait for CloudKit to download all its data back into the app. And it takes a while, especially for users that have more than a few hundred items in the database. Ideally, tvOS should maintain the user data on-device, and only switch to a different database according to the active user. This way data would not need to be downloaded from scratch every time a user is switched. Is there a setting I can configure or a checkbox I can check to enable this behavior, or is this something not possible yet on tvOS?
Posted Last updated
.
Post not yet marked as solved
0 Replies
286 Views
Using userInfo, title or subtitle properties of the UNNotificationContent class is not possible because restrictions on access to these parameters (API_UNAVAILABLE(tvos)) Are there any passing methods of data by FCM Push notifications on tvOS? Thank you
Posted
by Dva_.
Last updated
.
Post not yet marked as solved
0 Replies
529 Views
Webp images work on iOS and iPadOS. But it doesn't work on tvOS. In fact, Apple say that: But why doesn't it happen? Is there a way that it works on tvOS?
Posted
by seyma.
Last updated
.
Post not yet marked as solved
0 Replies
436 Views
Hello friends, my Apple TV A2843 is connected to a Pioneer SC-LX904 AVR that passes the signal to a Sony XR-90J TV. The TV is set to Enhanced Dolby Vision and the AVR HDMI is set to Enhanced too. The Format on my Apple TV is 4K Dolby Vision at 60HZ. Auto Frame and Dynamic Range match are on. The Color is set to RGB 24 bit automatically when the DV 60HZ format is selected and I cannot switch the Color from RGB back to YUV 4.4.4, 4.2.2 or 4.2.0. 4K Dolby Vision works perfectly at 60HZ and 50HZ. 4K Dolby Vision is not working (pink distorted Picture) at 23.9HZ and 29.9HZ When I swap the Apple TV A2843 with a Apple TV A1842 everything works perfectly. When I connect the Apple TV A2843 directly to the tv's HDMI 2.1 everything works perfectly. Months ago on March 2023 the problem was fixed with the 16.4 Beta (16.4 20L5474e) and it came back with the 16.4 RC and 16.4 Public. I haven't seen a fix since then. I have an older Apple TV A1842 that works fine all the time. Thank You
Posted
by JRBou.
Last updated
.
Post not yet marked as solved
0 Replies
409 Views
0 I have a TV app which is used in Fitness industry where 6 smart TVs connected to Apple TVs and the App playing videos from a local server. Unitl tvOS 17.0 everything was smooth but soon after that we are facing a strange issue in that sometimes same Video is playing 6x or more faster than normal rate only in 1 random TV. I can see 12 min video finished playing in 1.3 min. Video Codecs: MPEG-4 AAC, H.264. Is these format affects speed in Apple TV? TVs are initially runs Intro videos, then warm up, then exercise and at last cooldown. I added the code for exercise background timer video where I am facing issue. On top on background video there are other 4 videos playing in loop. Please find attached image. I am using AVPlayer, Swift 5, Xcode 5 and tvOS 17.0, Apple TV 4K. code-block import UIKit import AVKit import AVFoundation class ViewController: UIViewController { @IBOutlet weak var workoutCircuitContainerView: UIView! var workoutCircuitPlayerItem: AVPlayerItem? var workoutCircuitPlayerLayer: AVPlayerLayer? var workoutCircuitPlayer: AVPlayer? var isWorkoutCircuitPlayerObserverAdded: Bool = false private var workoutCircuitObserverContext = 0 override func viewDidLoad() { super.viewDidLoad() } override func viewWillAppear(_ animated: Bool) { initializeWorkoutCircuitPlayer() } func initializeWorkoutCircuitPlayer() { workoutCircuitPlayer?.pause() workoutCircuitPlayerLayer?.removeFromSuperlayer() self.removeWorkoutCircuitPlayerObservers() startWorkoutCircuitPlayer() } func startWorkoutCircuitPlayer() { guard let streamURL = URL(string: "http://192.168.1.116:3001/videos/CARDIO_Work_Circuit1.mp4") else { return } self.workoutCircuitPlayerItem = AVPlayerItem(url: streamURL as URL) self.workoutCircuitPlayer = AVPlayer(playerItem: self.workoutCircuitPlayerItem) self.workoutCircuitPlayerLayer = AVPlayerLayer(player: self.workoutCircuitPlayer!) self.workoutCircuitPlayerLayer!.videoGravity = AVLayerVideoGravity(rawValue: AVLayerVideoGravity.resizeAspectFill.rawValue) self.workoutCircuitPlayerLayer!.frame = self.workoutCircuitContainerView.bounds self.workoutCircuitContainerView.layer.addSublayer(self.workoutCircuitPlayerLayer!) self.workoutCircuitPlayer!.addObserver(self, forKeyPath: "timeControlStatus", options: [.old, .new], context: nil) self.playWorkoutCircuitPlayer() self.addWorkoutCircuitPlayerObservers() } func playWorkoutCircuitPlayer() { workoutCircuitPlayer?.play() } func addWorkoutCircuitPlayerObservers() { if !isWorkoutCircuitPlayerObserverAdded { workoutCircuitPlayer?.addObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), options: [.old, .new], context: &workoutCircuitObserverContext) NotificationCenter.default.addObserver(self, selector: #selector(self.workoutCircuitPlayerDidFinishPlaying), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: workoutCircuitPlayer?.currentItem) NotificationCenter.default.addObserver(self, selector: #selector(self.workoutCircuitPlayerStalled(note:)), name: .AVPlayerItemPlaybackStalled, object: self.workoutCircuitPlayer?.currentItem) isWorkoutCircuitPlayerObserverAdded = true } } @objc func workoutCircuitPlayerDidFinishPlaying(notification: NSNotification) { // play cool down videos code } @objc func workoutCircuitPlayerStalled(note: NSNotification) { if let playerItem = note.object as? AVPlayerItem { playerItem.seek(to: (workoutCircuitPlayer?.currentTime())!, completionHandler: nil) self.workoutCircuitPlayer!.play() } } func removeWorkoutCircuitPlayerObservers() { if isWorkoutCircuitPlayerObserverAdded { workoutCircuitPlayer?.removeObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), context: &workoutCircuitObserverContext) NotificationCenter.default.removeObserver(self, name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: workoutCircuitPlayer?.currentItem) NotificationCenter.default.removeObserver(self, name: NSNotification.Name.AVPlayerItemPlaybackStalled, object: workoutCircuitPlayer?.currentItem) isWorkoutCircuitPlayerObserverAdded = false } } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
296 Views
class SearchController: UISearchController { override func viewDidLoad() { super.viewDidLoad() } override func viewWillDisappear(_ animated: Bool) { let appDelegate = UIApplication.shared.delegate as! AppDelegate AppDelegate.searchFlag = true DispatchQueue.main.async(execute: { self.searchBar.text = "abc" }) } override func viewWillAppear(_ animated: Bool) { self.view.frame.origin.y = 400 self.view.frame.origin.x = 400 } } how to add this SearchController on search view controller because when use this code self.present(appDelegate.searchController, animated: true, completion: nil) it is showing full width screen
Posted Last updated
.
Post not yet marked as solved
0 Replies
343 Views
For iOS, it can send tap() event to an element, that means it doesn't need to explicitly navigate the UI to focus on the element first. Based on the document "Available in iOS and for Touch Bar interactions in macOS.", such events (like tap, click) don't support for tvOS , seems like for tvOS XCTest, I have to explicitly navigate the UI to locate the element first, and then send remote event like "select()" to trigger the click event. Anyone know is this the only way for tvOS?
Posted Last updated
.
Post not yet marked as solved
0 Replies
384 Views
I don't know if it's just me lately but it seems the review guys for app submissions and updates have lost several hundred thousand brain cells. I guess it depends on who actually touches your submission but I've had a lot of copyright and random app performance rejections for like the past year and a half. There are no performance issues with the apps created as they're all made the same just pointing to different content which all work and after a resubmission it gets passed anyway. The copyright one makes sense for new apps and that's always provided yet somehow they sometimes miss that it's been included with the submission anyway and eventually passes when pointed out or resubmitted, but they'll also do it for updates to apps that have been published for years now and even when adding another platform. Ex Apple TV app around for years then add an IOS version for it BAM flagged for rejection over copyright. Some apps being updated from v1X to 2X BAM flagged for copyright. It doesn't make any sense. Anyone else seeing this? The support guys never answer my questions. Just spam the same copy/paste posts. Quite infuriating.
Posted Last updated
.
Post not yet marked as solved
0 Replies
416 Views
I'm interested in determining whether another AppleTV app is currently playing a video or not, without accessing the actual content or violating any privacy policies. I'm aware of the privacy and security concerns related to accessing other app's data, and I want to ensure that any solution I implement is in compliance with Apple's guidelines and respects user privacy. My goal is to provide enhanced user experiences without compromising security or privacy. Is there any legitimate and secure way to achieve this functionality? I appreciate any guidance or information you can provide on this matter. Thank you for your time and assistance! :)
Posted
by Eetu.
Last updated
.
Post not yet marked as solved
2 Replies
540 Views
Current Behavior I'm working with latest AppleTV 4k upgraded with beta version i.e 17.2 tvOS(real device) , on which we execute some automated tests using appium for some of our in-house app's when i'm trying to build the tvOS webDriverAgent project with below command( running from webdriver agent default project path) it is throwing following error. command : xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner_tvOS -destination 'id=4d61282d6871dd9006c73a8e7e8f20298ed82e00' test response: Ineligible destinations for the "WebDriverAgentRunner_tvOS" scheme: { platform:tvOS, id:4d61282d6871dd9006c73a8e7e8f20298ed82e00, name:Living Room, error:Living Room’s tvOS 17.0 doesn’t match WebDriverAgentRunner_tvOS.xctest’s tvOS 17.2 deployment target. Upgrade Living Room’s tvOS version or lower WebDriverAgentRunner_tvOS.xctest’s deployment target. } Note: I'm able to successfully build the tvos webDriverAgentLib_tvOS and webDriverAgentRunner_tvOS tvOS runner from Xcode, no error for Target devices there i have set it to 17.2 image attached but when i tried to run the command xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner_tvOS -destination 'id=4d61282d6871dd9006c73a8e7e8f20298ed82e00' test, it is complaining about deployment target. Even i tried to set the tvOS deployment target to 17.0 and build the i had below issue which was expected because my AppleTV is deployed with 17.2 version when u tried to run above command by downgrading the target got below response: Response Logs : 2023-11-07 13:25:40.722 xcodebuild[19962:485925] DTDeviceKit: Started connection with 00008020-0011188A1A50003A xcodebuild: error: Unable to find a destination matching the provided destination specifier: { id:4d61282d6871dd9006c73a8e7e8f20298ed82e00 } Available destinations for the "WebDriverAgentRunner_tvOS" scheme: { platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Any tvOS Device } { platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Any tvOS Simulator Device } Expected Behavior since i'm using all the latest drivers, plugin's, appium , xcode and macos it should build the tvOS webdriverAgent properly. since i'm able to launch the app for iphone with 17.1 os version with the same setup. Environment: and i have the following versions installed on mac, all are almost latest and some are beta version's too. MAC ----SONOMA 14.1 XCODE --- 15.1 beta (15C5042i) Appium --- 2.2.1 CLI version execute-driver-3.0.19 [installed (npm) uiautomator2-2.34.0 [installed (npm)] [Up to date] xcuitest -5.8.1 [installed (npm)] [Up to date] NPM version ---8.15.0 NODE version --v16.17.1 Real Device --AppleTV 4k upgraded with beta version i.e 17.2 tvO Further Information: with this issue, want to know whether tvOS beta version is supported by latest webdriverAgent Project. or do i need to wait for official release of 17.2 as i'm using Beta version
Posted Last updated
.
Post marked as solved
3 Replies
495 Views
Hello, found a issue with tvOS 17. When I use either a frame or padding, the button highlight has no round corners anymore, seems like the left and right margin of buttons is not displayed. Works perfectly fine on tvOS 16. Is this a bug? Any way to fix this? struct ListOfButtons: View { var values = (0...13).map{"item \($0)"} @State var selectedValue: String = "item 0" var body: some View { List(values, id: \.self) { item in Button { selectedValue = item } label: { Text(item) } } .frame(width: 200, height: 900) .padding(40) .background(Color.cyan) } } tvOS 16.4: tvOS 17:
Posted
by webhelp.
Last updated
.
Post not yet marked as solved
0 Replies
392 Views
How to achieve Speech-to-text input in tvOS, like - Tapping a mic button on speaking by the user, the audio should convert into text.
Posted
by ShankarKr.
Last updated
.
Post not yet marked as solved
0 Replies
240 Views
I have an Apple TV and I would like to choose an specific photo album as screensaver. my current solution is to use remote control API, but it is not reliable given I need to count the "down" the "left" keys and assume where the photo album would be. is there a way to choose the album by name? using API? or deploying some configuration profile? thanks, Hiro
Posted
by hirohashi.
Last updated
.