tvOS is the operating system for Apple TV.

tvOS Documentation

Posts under tvOS tag

124 Posts
Sort by:
Post not yet marked as solved
1 Replies
1.2k Views
I have the first generation Apple TV 4K. When I installed the beta software, FaceTime is not available. Is the first generation Apple TV 4K not capable of running FaceTime?
Posted
by
Post not yet marked as solved
2 Replies
500 Views
As per https://developer.apple.com/ios/submit/, it mentions that "Please note, starting April 2023, all iOS and iPadOS apps submitted to the App Store must be built with Xcode 14.1 and the iOS 16.1 SDK." Is it true for a tvos app upgrade build submission too or Can I still go with xcode 13 for it. Thanks
Posted
by
Post not yet marked as solved
1 Replies
616 Views
This is my first tvOS app. my problem is I've been trying to create a tvOS app icon to be displayed. Ive used the parallax previewer it looks great i even exported it. But couldn't figure out how to import into my project, even though i went through the forums. Then I added the images into the stack spots like i did in parallax even adjusting the sizes. it shows correctly in the simulator before i go to it, then when i select it it shrinks to the corner Before: After If anyone can help me I'd appreciate the help, I've spent two days on this.
Posted
by
Post not yet marked as solved
0 Replies
771 Views
What is causing the problem with the app and how should I approach the solution? I have taken over the development of a video viewing application that runs on tvOS. Recently, a user reported that he could not play videos on tvOS 16. I built the application in xcode and tried to play the video on tvOS 16.4 in simulator. Then a symbol similar to 🚫 appeared on the video player and the video could not be played. UIKit and TVML Kit JS are used in the source code. Video source is HLS with H.264 codec When playback failed, Xcode displayed the following error message. 023-05-26 12:59:58.477905+0900 hoge_tvOS[35421:14197398] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x6000007080a0 H:|-(95)-[UIStackView:0x155247910] (active, names: '|':UIView:0x155247770 )>", "<NSLayoutConstraint:0x6000007082d0 UIStackView:0x155247910.trailing == UIView:0x155247770.trailing - 95 (active)>", "<NSLayoutConstraint:0x6000007f38e0 H:|-(0)-[UIView:0x155247770] (active, names: '|':_AVFocusContainerView:0x151d431f0 )>", "<NSLayoutConstraint:0x6000007f3930 UIView:0x155247770.trailing == _AVFocusContainerView:0x151d431f0.trailing (active)>", "<NSLayoutConstraint:0x60000070b1b0 '_UITemporaryLayoutWidth' _AVFocusContainerView:0x151d431f0.width == 0 (active)>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000007082d0 UIStackView:0x155247910.trailing == UIView:0x155247770.trailing - 95 (active)> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. I have confirmed in the past that it can be played on tvOS 14. Thanks for reading.
Posted
by
Post not yet marked as solved
0 Replies
998 Views
We have developed an Apple TV application with a Hebrew (RTL layout) interface. The application utilizes a Swift-based Digit Entry view controller for pin entry. However, we are encountering an issue where the numeric keyboard numbers overlap with the backspace class TVDigitEntryViewController : UIViewController The problem specifically occurs when the Apple TV language is set to English, while the application language is set to Hebrew with RTL layout. As a result, the number 1 from the numeric keyboard is hidden behind the backspace button, as shown in the attached image. We are seeking a solution or suggestions on how to resolve this issue and ensure that the numeric keyboard is properly aligned with the backspace button in our Hebrew Apple TV application.
Posted
by
Post not yet marked as solved
0 Replies
696 Views
Hi! I am trying to set up some tests on AppleTV and i figured the way to do them is by using airplay video. The issue here is i want the tests to be automatically executed and i don't seem to see any way to automatize airplay except for using applescript with quicktime player. I tried to write a script that could do that but i get the "wrong index" error. My code below: to replaceFrontQTPlayerWithFile(aFile) tell application "QuickTime Player" activate try set frontDoc to front document close front document on error err number errNum if errNum is -1719 then -- There is no open document else if errNum is -10000 then -- Front doc exists, but does not really... else log err end if end try open aFile tell application "System Events" to tell process "QuickTime Player" tell window 1 click button 4 delay 1 pick menu item "WRO-CT-IE-ATV-2" of menu 0 of button 4 end tell end tell play front document -- Hide QTP #tell application "System Events" # keystroke "h" using command down #end tell end tell end replaceFrontQTPlayerWithFile on run set unixFile to "/Users/aet/signals/roomba_sdr_vfr_no_audio.mov" set macFile to POSIX file unixFile set fileRef to (macFile as alias) my replaceFrontQTPlayerWithFile(fileRef) end run Here i have two questions: Is there any other way to do that (maybe some airplay API/command line tool that could help me)? If not is there a way to make my code work? I am using macOS 12 device with tvOS 16 AppleTV
Posted
by
Post not yet marked as solved
0 Replies
489 Views
Hi there! I am working on a tvOS application with a UISearchController. I have a problem when the grid keyboard is selected in the settings (Settings->General->Keyboard Layout). When i use RTL the whole search screen breaks because i use the built in segment control in UISearchController.searchBar.scopeButtonTitles When I do not add it, then everything is displayed well. How can I fix this bug without creating a separate segment control object? Environment tvOS 16+ UIKit The problem exists on the Simulator as well as on the Apple TVs I tested: 4K (2nd generation) and 4K (1st generation)
Posted
by
Post not yet marked as solved
3 Replies
757 Views
I'm porting my VPN app to tvOS 17. Here's some code which works just fine in iOS but doesn't in tvOS 17: func toggleVPN() { let vpnManager = NEVPNManager.shared() vpnManager.loadFromPreferences { (error) in if let error = error { print("Could not load VPN Configurations: \(error.localizedDescription)") return } if vpnManager.connection.status == .connected || vpnManager.connection.status == .connecting { vpnManager.connection.stopVPNTunnel() } else { vpnManager.isEnabled = true vpnManager.isOnDemandEnabled = true vpnManager.localizedDescription = "tvpn" let p = NEVPNProtocolIPSec() p.authenticationMethod = .sharedSecret // or .certificate p.serverAddress = <REDACTED> p.username = "client" p.useExtendedAuthentication = true // Retrieve password and shared secret references from the keychain let secretData = <REDACTED>.data(using: .utf8)! let passData = <REDACTED>.data(using: .utf8)! p.sharedSecretReference = try! VPNKeychain.persistentReferenceFor(service: "vpn", account: "SharedSecret", password: secretData) // I took this part from Apple dev forums, it's tested in iOS p.passwordReference = try! VPNKeychain.persistentReferenceFor(service: "vpn", account: "Password", password: passData) vpnManager.protocolConfiguration = p vpnManager.saveToPreferences { (error) in if let error = error { print("Could not save VPN Configurations: \(error.localizedDescription)") return } do { try vpnManager.connection.startVPNTunnel() } catch { print("Could not start VPN Connection: \(error.localizedDescription)") } } } } } in iOS the VPN connects successfully, however in tvOS saveToPreferences returns error Code 1: Could not save VPN Configurations: Missing protocol or protocol has invalid type Another thing I noticed, that there's no com.apple.developer.networking.vpn.api entitlement for tvOS, but NEVPNManager is available there according to documentation. Could you advise what's the problem with my code?
Posted
by
Post not yet marked as solved
0 Replies
650 Views
Hi Guys, I did lot of iOS, tvOS and macOS developemnt with UIKit and SwiftUI, but TVML appears to have really steep learning curve. When searching online and in this forum, posts are 7 years old and most often there are no replies. Is TVML something already obsolete and abandoned by Apple? Does it make sense to try quickly building streaming app using TVML? Is it better to start in SwiftUI and build templates from scratch and forget about TVML? What's nice that I can quickly build a page with collections of videos, however I struggle for several hours to do the simplest thing like adding a simple element with title, subtitle and play button. Why this doesn't display anything inside stackTemplate? <banner> <stack> <title>My Title</title> </stack> </banner> Why this doesn't display anything inside stackTemplate? <collectionList> <shelf id="row0"> <section binding="items:{videos}"> <prototypes> <lockup prototype="play" videoURL="https://storage.googleapis.com/media-session/sintel/trailer.mp4" > <title style="margin: 20; color: white; font-size: 60" binding="textContent:{title}"/> </lockup> </prototypes> </section> </shelf> If I add image to the loclkup element, it works and displays image and title. But if I want to add only title and subtitle and play button, it doesn't work. Is img manadatory inside lockup element? In documentation I cannot find, which subelement is mandatory and which is optional. Why cannot I add stack element as a prototype into the section element? Although I'm a native developer and don't really like HTML, I thought that TVML works in a similar way and I can add almost any element into any other element, like building HTML and TVML platform will stack up UI elements based on that. However it appears to be severely limited. Rules for even a basic element inside another layout element are so strict that I cannot tell ahead if it's going to work. Why doesn't it at least display elements that are defined correctly? Usually when one of the elements is invalid, then the whole section or shelf or container in general is hidden from view. It's impossible to build UI from the ground up. For example I thought I could add lockup element with title, see how it looks, than add subtitle and continue adding elements one by one. However if lockup with title simply doesn't display at all, I cannot figure out what's wrong, there is no error message in the console. Documentation is insufficient, it's not possible to figure out from that how each TVML UI elements works, what's mandatory and what's optional, sometimes I was actually add element inside another element even though docs didn't say it's possible. Like adding stack to some element, which I no longer rememeber. Is it possible to debug TVML somehow? Is it possible to debug JS in Xcode? Is there any TVML preview like in case of xib or SwiftUI? So far I always have to rebuild the app and look in the simulator screen. But often it caches the results and I have to delete the app from simulator, clean the build and rebuild again. It's very time consuming. Is there nay way to clear the cache (hot key)? Thanks.
Posted
by
Post not yet marked as solved
1 Replies
733 Views
I had first posted this in the Apple community discussions and Apple removed it and directed me to this developer site. Apple TV 4th gen model A1625, tvOS 17 beta, older Samsung TV- non-4K, Macbook Air M1, 2020, Ventura 13.4.1 (c) Have used this ATV 4+ years on this TV - always worked. Installed the beta last night. After powered off, then on, ATV appears to turn on, light is on, but no regular ATV main screen, just blank. Tried the usual unplug and plug in again, multiple times. Tried different HDMI cable that I know is OK. Checked the 3 HDMI jacks in the TV by connecting my Macbook to each jack and my Macbook screen appeared on the TV and I could watch my Youtube TV channels on the TV. Tried to check the ATV for updates or other "fixes" by connecting it to Macbook Air using USB-C cable. The ATV appeared in the finder as a device on Macbook, option appeared to update the ATV, selected and it tried to install but returned advice that could not connect to the software update server - multiple attempts at this brought same result. Internet search suggested also to open iTunes while connected, but ATV did not appear anywhere in iTunes screen as a device available - was supposed to be able to update in iTunes per this search advice. Also, tried, per other Apple internet search, using the remote to reset the ATV by pressing and holding the back/menu button and the "monitor icon" button until the light blinked rapidly, then unplugging ATV, waiting, then plugging in again - no help. Also, tried using suggestion to press and hold the back/menu button and the volume down button until rapid blinking and that was supposed to go to reset - no result either. The main ATV screen did not appear in any attempt. But oddly, there were several times when I unplugged and waited, then plugged in again, that the Apple logo (the apple with the bite out) appeared for 5 seconds or so, then the screen goes to blank, indicating there was some signal coming from the ATV to the TV. How can I remove the beta without the screen so I can get into settings? How can I reset to factory settings without going into settings and instead using connection to my Macbook Air? Did I "brick" this ATV by updating to tvOS beta? This is first and last time I'll ever attempt to use a beta on any Apple device.
Posted
by
Post not yet marked as solved
0 Replies
463 Views
I was able to connect my iphone 12mini for Facetime, but when I tried my ipad (8th gen 11,6) I point the ipad's camera to the screen for the QR code, it recognizes it, then the tiny yellow words pop up on the ipad at the bottom saying, "Coonect to this appleTV", when I try to click it nothing happens. In fact, it refocuses the focus square at that point. So THAT's not working for me. Anyone else have this and a fix? But I'll say, the iphone 12mini camera works great and people say my audio sounds good on it 15 ft away with a tiled floor room.
Posted
by
Post not yet marked as solved
0 Replies
533 Views
Hi - I can't locate where to trust Charles certificate in Settings > General > About after the update to tvOS 16.6. The menu item is no longer present. I can still install the profile using Apple Configurator but it will not take effect. Restarting the system did not make any difference.
Posted
by
Post not yet marked as solved
0 Replies
446 Views
Beta 4 is out and taking a look at my Apple TV I'm still on beta 1. As far as I can remember from previous betas this was always an automatic install. Pushing "Software Update" just tells me I'm up to date (with beta1)
Posted
by
Post not yet marked as solved
1 Replies
1.6k Views
Hi I have Apple TV 4K (5th gen) A1842. TVOS is 17 (21J5318f) and ios is 17 (21A5291h). I am not seeing any FaceTime icon on Apple TV. Any tips on how to FaceTime using an Apple TV? I am not a developer but a regular user who pays for developer license just to always have all betas. Seeking guidance as to what I may be doing wrong or not doing to not be able to FaceTime on Apple TV. regards ASB
Posted
by
Post not yet marked as solved
0 Replies
444 Views
I have a UITableView that lists the files located in the app alphabetically. As there are over 1500 files, I'm trying to implement functionality to navigate by letter of the alphabet when the right button is clicked on the remote. The issue I'm having is that the TableView indeed moves to the right spot, but instead of being highlighted like it normally would, I get a lighter highlighted color, and clicking select does nothing. If I then navigate normally by pressing down, it moves it back up to the 2nd item in the list. ```- (void)viewDidLoad { [super viewDidLoad];`` // We're setting the stage! self.tableView.delegate = self; self.tableView.dataSource = self; self.definesPresentationContext = YES; self.currentIndex = 0; // Time to call the stars for a rehearsal. [self populateTheView]; // Let's make room for our magical focus director. self.dapperFocusGuide = [[UIFocusGuide alloc] init]; [self.view addLayoutGuide:self.dapperFocusGuide]; // Red carpet time! [self.dapperFocusGuide.topAnchor constraintEqualToAnchor:self.tableView.topAnchor].active = YES; [self.dapperFocusGuide.leftAnchor constraintEqualToAnchor:self.tableView.leftAnchor].active = YES; [self.dapperFocusGuide.widthAnchor constraintEqualToAnchor:self.tableView.widthAnchor].active = YES; [self.dapperFocusGuide.heightAnchor constraintEqualToAnchor:self.tableView.heightAnchor].active = YES; }- (void)populateTheView { NSBundle *bundle = [NSBundle mainBundle]; self.title = @"Devo Songs"; self.files = [bundle pathsForResourcesOfType:@"pdf" inDirectory:@"WorshipSongs"]; NSString *documentsDirectoryPath = [self.files objectAtIndex:self.currentIndex]; self.filenames = [[documentsDirectoryPath lastPathComponent] stringByDeletingPathExtension]; NSMutableArray *names = [NSMutableArray arrayWithCapacity:[self.files count]]; for (NSString *path in self.files) { [names addObject:[[path lastPathComponent] stringByDeletingPathExtension]]; } self.files = [names sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self becomeFirstResponder]; // Initial spotlight position. self.dapperFocusGuide.preferredFocusEnvironments = @[self.tableView.visibleCells.firstObject]; } - (BOOL)canBecomeFirstResponder { return YES; } - (void)handleRightButtonPress { // Get the current name. NSString *currentName = self.files[self.currentIndex]; // Get the current letter. NSString *currentLetter = [currentName substringToIndex:1]; // Find the next index starting from the current index. NSInteger nextIndex = self.currentIndex + 1; while (nextIndex < self.files.count) { NSString *nextName = self.files[nextIndex]; NSString *nextLetter = [nextName substringToIndex:1]; if (![nextLetter isEqualToString:currentLetter]) { break; } nextIndex++; } // Check if we found a valid next index. if (nextIndex < self.files.count) { // Scroll the table view to the row corresponding to the next letter. [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:nextIndex inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO]; // Update the current index to the new index. self.currentIndex = nextIndex; // Deselect the current selected row (if any). NSIndexPath *previousSelectedIndexPath = [self.tableView indexPathForSelectedRow]; if (previousSelectedIndexPath) { [self.tableView deselectRowAtIndexPath:previousSelectedIndexPath animated:NO]; } // Select the cell at the specified index. NSIndexPath *indexPathToSelect = [NSIndexPath indexPathForRow:self.currentIndex inSection:0]; [self.tableView selectRowAtIndexPath:indexPathToSelect animated:NO scrollPosition:UITableViewScrollPositionNone]; UITableViewCell *cellToFocus = [self.tableView cellForRowAtIndexPath:indexPathToSelect]; self.dapperFocusGuide.preferredFocusEnvironments = @[cellToFocus]; } else { // If we have reached the end of the list, reset the index to the first element. self.currentIndex = 0; // Scroll back to the top of the table view. [self.tableView setContentOffset:CGPointZero animated:NO]; // Deselect the current selected row (if any). NSIndexPath *previousSelectedIndexPath = [self.tableView indexPathForSelectedRow]; if (previousSelectedIndexPath) { [self.tableView deselectRowAtIndexPath:previousSelectedIndexPath animated:NO]; } // Select the cell at the specified index. NSIndexPath *indexPathToSelect = [NSIndexPath indexPathForRow:self.currentIndex inSection:0]; [self.tableView selectRowAtIndexPath:indexPathToSelect animated:NO scrollPosition:UITableViewScrollPositionNone]; UITableViewCell *cellToFocus = [self.tableView cellForRowAtIndexPath:indexPathToSelect]; self.dapperFocusGuide.preferredFocusEnvironments = @[cellToFocus]; } }
Posted
by
Post not yet marked as solved
1 Replies
616 Views
My AppleTV (4K, latest version) only passes through a PCM Stereo audio signal to my soundbar instead of a Dolby 5.1 on shows that say they are 5.1. Oddly, Dolby Atmos works fine. I've tried various settings on the AppleTV and my SamsungTV, but I can't get anything but a Stereo PCM audio on non-atmos content. Note: I am using the Beta TVs 17, so I'm thinking it could be a glitch in the new software.
Posted
by
Post not yet marked as solved
1 Replies
840 Views
Hi! Anyone noticed problems with some "older" airplay audio devices? My Chord Poly streamer worked (not super well but it was manageable) on tvOS 16 but on 17 (currently in public beta) there is no sound at all.
Posted
by
Is3
Post not yet marked as solved
0 Replies
282 Views
After the last beta update, some how the atv remote was constantly sending a volume down signal to my tv, even though I use homepods for the default audio. Reset and update software resolved the problem.
Posted
by
Post not yet marked as solved
0 Replies
456 Views
Hi, In this article here: https://developer.apple.com/documentation/xcode/interacting-with-your-app-in-the-tvos-simulator#Navigate-using-a-physical-remote-control ...it gives steps on how to pair the Siri Remote so that it works with the simulator. However, when I follow the steps, the remote shows up in the Bluetooth list as a "generic device" only labelled by its serial number, and it definitely can't control the simulator. Just me?
Posted
by