tvOS is the operating system for Apple TV.

Posts under tvOS tag

118 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Errors occurred in the app thinning process
Hello, Me and my team is currently having problems with a tvOS app we are trying to submit for review. Every time we upload a binary to App Store Connect we get back the following mail While processing your tvOS app, errors occurred in the app thinning process, and your app couldn’t be thinned. If your app contains bitcode, bitcode processing may have failed. Because of these errors, this build of your app will not be able to be submitted for review or placed on the App Store. For information that may help resolve this issue, see Tech Note 2432. Best regards,The App Store Team We have tried to follow the troubleshooting proposed in the Tech Note 2432 and exporting for Ad Hoc worked only when using Xcode 11.6 and not Xcode 12, and nothing else we tried with Xcode 12 worked. All of this leads me to believe that there is something on apple side that might cause problems with the binary uploaded. Does anyone have any information on this?
8
1
5.5k
Jul ’23
Xcode 13.0 can't pair to Apple TV 4K (tvOS 15.0)
On Xcode 13.0, I can no longer pair with an Apple TV 4K (tvOS 15.0). Until now it has always worked but since the new update to tvOS 15.0 and Xcode 13.0 I can no longer connect. I have gone through the following steps to connect: Open remote app and devices settings on Apple TV 4K (tvOS 15.0). Open Devices and Simulators in Xcode 13.0. Select Apple TV in the list and press "Pair". Code appears on the Apple TV and I can enter it in an Xcode window. After the code input, there is a short loading sign that a connection is being established. After a few seconds, the whole thing stops without an error message and the "Pair" button is visible again. Does anyone have the same problem? I would like to optimize my apps for tvOS 15 and test them on a physical device.
24
1
20k
May ’24
tvOS: How to avoid fast-forwarding in AVPlayerViewController
Due to legal restrictions I need to prevent my app's users from skipping and fast-forwarding the content that is played by AVPlayerViewController. I use playerViewController(:willResumePlaybackAfterUserNavigatedFrom:to:) and playerViewController(:timeToSeekAfterUserNavigatedFrom:to:) delegate methods to control the skipping behaviour. However, those delegate methods are only triggered for skip +/- 10, but not for fast-forwarding/rewinding.  Is there a way to prevent fast-forwarding in addition to skipping in AVPlayerViewController? Here is an example of the code I use: class ViewController: UIViewController {   override func viewDidAppear(_ animated: Bool) {     super.viewDidAppear(animated)     setUpPlayerViewController()   }   private func setUpPlayerViewController() {     let playerViewController = AVPlayerViewController()     playerViewController.delegate = self guard let url = URL(string: "https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8") else {       debugPrint("URL is not found")       return     }     let playerItem = AVPlayerItem(url: url)     let player = AVPlayer(playerItem: playerItem)     playerViewController.player = player     present(playerViewController, animated: true) {       playerViewController.player?.play()     }   } } extension ViewController: AVPlayerViewControllerDelegate {   public func playerViewController(_ playerViewController: AVPlayerViewController, willResumePlaybackAfterUserNavigatedFrom oldTime: CMTime, to targetTime: CMTime) { // Triggered on skip +/- 10, but not on fast-forwarding/rewinding     print("playerViewController(_:willResumePlaybackAfterUserNavigatedFrom:to:)")   }   public func playerViewController(_ playerViewController: AVPlayerViewController, timeToSeekAfterUserNavigatedFrom oldTime: CMTime, to targetTime: CMTime) -> CMTime {     // Triggered on skip +/- 10, but not on fast-forwarding/rewinding     print("playerViewController(_:timeToSeekAfterUserNavigatedFrom:to:)")     return targetTime   } }
2
1
1.1k
Sep ’23
Settings.bundle in tvOS 15.0 seems to no longer work.
I have an App that builds for iOS, iPadOS, macOS and Apple TV, which was last released to all the App Stores in April. Preferences/settings are handled by the App itself except for the Apple TV variant, where I use a Settings bundle. This worked fine until tvOS 15.0, where it appears that tvOS is not updating the value of the App’s settings from NSUserDefaults when the Settings App opens. I have been working on this problem off and on for the last week and am at wits end. I’ve searched WWDC videos looking for a clue, there must be some simple change I cannot see. I’ve made clean projects for iOS and tvOS, and using the identical OBJ-C code and Settings plist entries, the iOS version works perfectly, the tvOS version fails in the simulator and on the device. I am not trying to synchronize Settings across devices, just persist across restarts on a single device. My code stores data correctly in NSUserDefaults, it simply seems that tvOS Settings App is not reading values from there for display, nor writing changes that the user makes from Settings back to user defaults. None of the types in the test projects work: TexField, Switch, Title. The test code is so simple I hesitate to include it, but the code and the NSUserDefaults key identifiers do match. This code will preset my App’s version number for Settings to display in iOS 15 but not tvOS 15. It used to work in tvOS 14: <key>DefaultValue</key> <string>DefaultVersionValue</string> <key>Type</key> <string>PSTitleValueSpecifier</string> <key>Title</key> <string>Version</string> <key>Key</key> <string>VersionKey</string> </dict> ```   NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];    [ud registerDefaults:@{      @"TextFieldKey" : @"TextFieldValue",      @"VersionKey" : @"VersionValue"    }];        [ud setObject:@"3.14" forKey:@"VersionKey"]; Any idea? Many thanks.
4
0
819
May ’24
tvOS App Icon Errors
I made a minor change the UI of my tvOS App, and am now getting errors related to the App Icon. I have confirmed that all the background images DO match the requirements but App Store Connect won't let me upload: App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '400x240'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '800x480'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '1280x768'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '2560x1536'. App Store Connect Operation Error Invalid Image Asset. The App Store Icon must only contain an image with size (1280pt × 768pt @1x). Refer to https://developer.apple.com/tvos/human-interface-guidelines/icons-and-images/app-icon for more information Have the standards changed? Or is there another issue I should be looking at? Thanks!
2
0
1.4k
Mar ’24
Network Framework not picking WatchOS 9+
As you can see in this open source repository, I am trying to test out the code provided when you download the Apple sample "Building a custom peer-to-peer protocol" I bought a new Apple TV in order to work with this. But I have had so many issues! First I realized that the functionality is only available from WatchOS 9 or greater, but my Apple Watch 3 won't update to WatchOS 9. Then I got another watch, but it had to be updated. Then had to turn on the Developer Mode and then I was having a issues where it kept saying that the phone & watch needed to be unlocked, over and over -.-. Then finally after building the app on the watch from my computer using Xcode (latest), the problem I am now having is that the app on the AppleTV only detects the phones in the network, and not this new Apple Watch. -,- So now I just have a bunch of new technology that is doing nothing I have read through so many tutorials but can't tell why it doesn't detect it. It seems like the DDDevicePickerViewController is not returning the watch. The other question I have is, can I use the Network Framework to connect to multiple devices at the same time? (Think Texas hold em poker on Apple TV but with cards on each player's phone)
3
0
1.8k
Oct ’23
Random AirPlay error from iPhone 14 Max attempted connection of tvOS 16.2 public beta
I am getting a periodic error message appearing on my iPhone 14 Pro Max. It pops up occasionally on the Home or Lock screens, and says: AirPlay Unable to connect to "Living Room". Where "Living Room" is presumed to be my 2021 Apple TV 4K. (My HomePod minis are also designated as part of the "Living Room" group.) When this happens, I am not trying to AirPlay to anything, and the Apple TV 4K is off. The streaming box is connected to a Sony Bravia X90J TV which has AirPlay capabilities; it's also off. In my iPhone settings (iOS 16.1.2), I have turned off "Automatically AirPlay to TVs", but that has not fixed the problem. I am running the latest consumer beta of tvOS on the Apple TV 4K, so this may be a bug related to that OS. However, before I report it as such, since it appears on the iPhone, I wanted to check first to see if it's a known iOS issue vs. a problem with 16.2 beta. Thanks.
1
1
1.7k
Jul ’23
How to override the Audio Track Details underneath the audio panel in AVPlayer.
https://learn.microsoft.com/en-us/answers/questions/320776/how-to-override-the-audio-track-details-underneath.html Audio/subtitles #EXT-X-MEDIA:NAME="eng-300",TYPE=AUDIO,LANGUAGE="eng”,GROUP-ID="audio",CODECS="mp4a.40.2",DEFAULT=YES,AUTOSELECT=YES,URI="300/2043--profile--4.3.m3u8" #EXT-X-MEDIA:NAME=“eng-500",TYPE=AUDIO,LANGUAGE=“eng”,GROUP-ID="audio",CODECS="mp4a.40.2",DEFAULT=NO,AUTOSELECT=YES,URI="500/2043--profile--4.3.m3u8" Currently we are getting English, English are audio track names Requirement’s : We should show like English(Dolby) , English(Stereo) please provide suggestions will be helpful to us 1.Since we are using TVOS native AvPlayer so customisation was not possible
1
2
925
Jul ’23
tvOS/SwiftUI: toolbar item steals focus
I'm trying to add a brand logo to a SwiftUI tvOS interface. The main UI is a TabView. Focus works fine until I try to add a ToolbarItem. Once I do that it seems to steal focus and my TabView becomes unusable. Here's a simple example that demonstrates the problem: struct TestView: View { var body: some View { NavigationView { TabView { Text("Screen One") .tabItem({ Text("One") }) Text("Screen Two") .tabItem({ Text("Two") }) Text("Screen Three") .tabItem({ Text("Three") }) } .toolbar { ToolbarItem(placement: .navigationBarLeading) { Image(systemName: "house.fill") } } } } } How can I keep focus from getting messed up? Should I not be using the toolbar to add the logo? It looks like just adding toolbar causes a UINavigationBar to be drawn on top of the tab bar, which is why it isn't getting focus. Still not sure how to fix it though...
2
0
991
Sep ’23
Xcode 15.0 Beta: NEPacketTunnelProvider is only available in tvOS 17.0 or newer
I'm researching to develop a VPN application on tvOS 17.0, but even if I set the dev target version to 17.0, it still prompts me that the API is not available. 'NEPacketTunnelProvider' is only available in tvOS 17. 0 or newer I have 2 xcodes installed on my computer, I tried switching to sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer, but it still doesn't work. Is there anything else I need to set?
5
0
1.4k
Oct ’23
Cannot play videos on tvOS 16.
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.
0
2
808
Jul ’23
Digit Entry Screen - Numeric Keyboard Overlapping with Backspace Button in Apple TV Hebrew Application
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.
0
0
1k
Jul ’23
Airplay Video automation
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
0
0
756
Jul ’23
tvOS Search: keyboard grid broke on RTL
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)
0
0
525
Jul ’23
NEVPNProtocolIPSec unavailible on Apple TV?
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?
3
0
790
Sep ’23
TVML Basic and Technical Questions from TVML Rookie
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.
0
1
708
Jul ’23
Apple TV main screen blank after install tvOS 17 beta
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.
1
0
767
Jul ’23
Facetime for tvOS17 works w iphone but not ipad
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.
0
0
479
Jul ’23