Apple TV

RSS for tag

Discuss hardware-specific topics related to Apple TV.

Posts under Apple TV tag

20 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

tvOS 18.0 Siri back button behavior bug
On testing my app with tvOS 18, I have noticed the Siri Remote back button no longer provides system-provided behavior when interacting with tab bar controller pages. Instead of moving focus back to the tab bar when pressed, the back button will close the app, as if the Home button was pressed. This occurs both on device and in the Simulator. Create tvOS project with a tab bar controller. Create pages/tabs which contain focusable items (ie. buttons) Scroll down to any focusable item (ie. a button or UICollectionView cell) Hit the Siri Remote back button. See expect behavior below: Expected behavior: System-provided behavior should move focus back to the tab bar at the top of the screen. Actual results: App is closed and user is taken back to the Home Screen. Has anyone else noticed this behavior?
1
0
331
Aug ’24
Problems when Preparing Apple TV via Apple Configurator 2
Model: Apple TV 4K (3rd generation) Wi-Fi & Ethernet 128GB I am an Apple Systems Admin for a school district. A contractor working on new buildings/upgrades for us purchased Apple TVs outside of our Apple account. When attempting to add these Apple TVs to Apple School Manager and enroll them into our MDM (via Apple Configurator 2 version 2.17), i'm running into a few problems. When inputting the Pair Code: -Says “Pairing Failed (-402653161)”--this error code only takes me to Apple Forums that end up answerless -But device still shows up under Paired Devices and in Configurator On Step 3 of 4 when “Preparing Apple TV—Activating TVOS” -An unexpected error has occurred with “Apple TV”. The device is not connected. [ConfigurationUtilityKit.error – 0x25B (603)]--this error code also only points me to Apple Forums for Configurator problems regarding iPads -only option is “Stop” -Appears that Configurator is still working in the background Click Stop (as it is my only option), then Apple TV then disappears from Configurator. Devices appear to be wiping OS/reinstalling OS and then going back to factory default settings. They are not being added to our ASM account. Any ideas?
6
4
702
Aug ’24
UICollectionView can't keep the focused row stick to the top
I'm creating a Netflix like app on tvOS, here is my compositional layout that I use with my collectionView. private func createLayout() -> UICollectionViewCompositionalLayout { return UICollectionViewCompositionalLayout { (section, _) -> NSCollectionLayoutSection? in // item let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(1.0)) let item = NSCollectionLayoutItem(layoutSize: itemSize) item.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 10, bottom: 0, trailing: 10) // group let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1/5), heightDimension: .estimated(350)) let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item]) // section let section = NSCollectionLayoutSection(group: group) section.orthogonalScrollingBehavior = .groupPaging let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(UIFont(name: "MyFont", size: 36)!.lineHeight)) let sectionHeader = NSCollectionLayoutBoundarySupplementaryItem( layoutSize: headerSize, elementKind: "SectionHeader", alignment: .top) section.boundarySupplementaryItems = [sectionHeader] section.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 20, bottom: 30, trailing: 0) return section } } So: My collection view is composed by several row (that are the sections). Each section is composed by groups containing 1 item each. Each section can be scrolled horizontally. And you can scroll vertically to move from a section to an other. I'm expecting to have the following behavior when scrolling: Horizontal scrolling: Before focus shifts -------------------------- | vA vB vC vD vE | | [v1] v2 v3 v4 v5 | | vU vW vX vY vZ | -------------------------- After focus shifts -------------------------- | vA vB vC vD vE | | [v2] v3 v4 v5 v6 | | vU vW vX vY vZ | -------------------------- Vertical scroll: Before focus shifts -------------------------- | [vA] vB vC vD vE | | v1 v2 v3 v4 v5 | | vU vW vX vY vZ | -------------------------- After focus shifts -------------------------- | [v1] v2 v3 v4 v5 | | vU vW vX vY vZ | | vF vG vH vI vJ | -------------------------- Thanks to section.orthogonalScrollingBehavior = .groupPaging the horizontal scrolling is working as expected. (I've put 1 item per group to achieve this) But I'm going crazy with the vertical scroll, I'm not able to achieve it as expected, the focused section still centered verticaly on the screen ! What I'm getting: Before focus shifts -------------------------- | [vA] vB vC vD vE | | v1 v2 v3 v4 v5 | | vU vW vX vY vZ | -------------------------- After focus shifts -------------------------- | vA vB vC vD vE | | [v1] v2 v3 v4 v5 | | vU vW vX vY vZ | -------------------------- After an other focus shifts -------------------------- | v1 v2 v3 v4 v5 | | [vU] vW vX vY vZ | | vF vG vH vI vJ | -------------------------- I've tried to play with the didUpdateFocusIn function without success func collectionView(_ collectionView: UICollectionView, didUpdateFocusIn context: UICollectionViewFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { if let nextFocusedItemIndexPath = context.nextFocusedIndexPath { let section = nextFocusedItemIndexPath.section let sectionIndexPath = IndexPath(item: 0, section: section) collectionView.scrollToItem(at: sectionIndexPath, at: .top, animated: true) } } The collectionview is behaving strangely when using the didUpdateFocusIn function and I feel it's not the good way to perform what I'm expecting... I've also try to play with the scrollViewWillEndDragging function without success func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: } Everything that I tried looks like a hack and I can't believe Apple has not plan something for this use case, which is in my sense a common use case....
1
0
308
Aug ’24
AppleTV Simulator SiriRemote not working in App
Hi, I'm having a small App in the AppleTV-Simulator which is supposed to use the Siri-Remotes Swipe-Gesture. It works perfect on the real device but on the simulator the Swipe-Gesture is not recognized in the App but it works on the Start-Screen of the Simulator using the simulated Siri-Remote app. Here is the code which sets up the xAxis ans yAxis value change handlers: #if targetEnvironment(simulator) // Simulator let siriRemote = GCController.controllers().filter { controller in if controller.vendorName == "Gamepad" { return true } else { return false } } let sController = siriRemote.first! let inputProfile = sController.physicalInputProfile let dPad = inputProfile.dpads["Direction Pad"] self.dPad = dPad self.dPad!.xAxis.valueChangedHandler = self.directionPadXAxisValueChangeHandler self.dPad!.yAxis.valueChangedHandler = self.directionPadYAxisValueChangeHandler } #else // Device if let _ = ( notification.object as? GCController)?.microGamepad { let microProfileController = notification.object as! GCController self.microGamePad = microProfileController.microGamepad self.dPad = self.microGamePad!.dpad self.dPad!.xAxis.valueChangedHandler = self.directionPadXAxisValueChangeHandler self.dPad!.yAxis.valueChangedHandler = self.directionPadYAxisValueChangeHandler } #endif Any help is greatly appreciated. Cheers, Frank
0
0
425
Jun ’24
Focused Tab Item Color in Apple TV Tab Bar Isn't Changing in SwiftUI
I'm developing an Apple TV OS app using SwiftUI. I'm encountering an issue with the color of the tab item. I want the color of the tab item to turn green when focused; for instance, when the tab item is selected, its background color should be green. Below is my current code, but it's not working. I've tried several other approaches, but none have worked. struct ContentView: View { @State private var selectedTab = 0 var body: some View { ZStack(alignment: .topLeading){ TabView(selection: $selectedTab) { HomeView() .tabItem { AppColors.gradientColor1 Label("Home", image: "home-dash") } .tag(0) ProductsView() .tabItem { Label("Products", image: "open box-search") } .tag(1) SearchView() .tabItem { Label("Search", image: "search") } .tag(2) } .accentColor(Color.green) .background(.black) Image("amazontabbarlogo") } } }
0
0
443
May ’24
Excluding Apple TV 5,3 (Apple TV HD 2015) from supported device list for for our game?
We have built the game on Unreal engine 4 and we have optimised the game to run on tvOS devices newer than 2017 (viz. Apple TV 4k and above). We could not bring it down to support Apple TV HD (2015) due to its visual and memory requirements. Is there a way to exclude Apple TV HD from support list. We couldnt find any required device capability to add to info.plist (eg: iphone-ipad-minimum-performance-a12, we tried it but this does not work for tvOS build).
0
1
566
Mar ’24
Apple TV 4K (HDMI + WIFI ONLY) cannot prepare into MDM
Hello, my company ordered Apple TV 4K HDMI + WIFI only.. The device has no ethernet or USB-C port. Only has HDMI and power port. I read on Apple's website to connect to Apple configurator I have to do it via WIFI. I followed the steps from the Apple website (https://support.apple.com/en-ca/guide/apple-configurator-2/cada1ba9dab1/mac) but once I'm paired to the Apple TV and I try to "Prepare" in Apple configurator to get the device setup on MDM it tells me the AppleTV device is already prepared and asks to "Erase" which I do then the Apple TV is back to the beginning setup screen and no longer connected to WIFI... Once I run through the setup again and get back on WIFI and goto pair screen it says the same thing when I try to prepare again.. Just going in circles and not getting anywhere.. Anyone have a solution? Prepare Apple TV HD or Apple TV 4K using Wi-Fi or Ethernet Make sure your Apple TV is connected to the same network your Mac is connected to. Make sure the Apple TV is at the first screen of the Setup Assistant that says Pair Your Remote. Launch Apple Configurator 2 . From the Apple Configurator 2 menu, choose Paired Devices. Select your Apple TV in the Paired Devices list, then click Pair. Enter the six-digit personal identification number (PIN) that appears on the screen of your Apple TV. Select your Apple TV in the device window of the Apple Configurator 2. Click Prepare and follow the onscreen instructions to set up your Apple TV.
1
2
875
Feb ’24
"devicectl device process launch --start-stopped" attach debugger from command line
Topic : Attaching debugger via lldb to remote process on tv device Current status I launch an app on a remote tv device that is paired to a macbook using the command xcrun devicectl device process launch --start-stopped -d XXXX-XXXXXX, com.metasample.SampleApp -j launch.json App is launched in stopped state and waiting for debugger to be attached to continue execution Using the XCode->Debug->Attach to Process, I am able to select the process and connect to the process and execute the app through the debugger. Expectation I would want to replace step 3 and use a command line instead to attach the debugger to the remote process instead of doing it via XCode.(the reason is to automate the execution without any manual intervention) I know the process id of the app on the remote tv device when i inspect the launch.json file that is created when the launch the app. eg pid 312 I also know the ip address of the device eg ip 192.168.178.29 However I do not know how to establish the debug session using lldb from command line. I launch lldb in the command line and execute these commands platform select remote-tvos target create /Users/works/apps/SampleApp-Payload/SampleApp.app/SampleApp gdb-remote 192.168.178.29: "what is the port?" - I do not know what port to connect to? Many Thanks for your suggestions and inputs on how to connect to the remote app via command line lldb.
0
2
1.6k
Jan ’24
Xcode: Generating a profile without a real Apple TV device?
I’m developing this tvOS app, and it builds and runs fine locally in Simulator. However, when I do Product > Archive (so I can upload it to app store later), it fails with error in the screenshot. Looks like Xcode is trying to sign the app with a certificate, but could not find a valid profile to do so. Since I don't have a physical Apple TV device, I'm unable to add an Apple TV to the Devices list on developer.apple.com, thus unable to create a profile. Is the any way around this issue to archive my tvOS app?
2
0
681
Jan ’24
Could not save vpn Configuration in Apple tvOS 17 .
<array> <string>dns-settings</string> <string>packet-tunnel-provider</string> </array> <key>com.apple.security.application-groups</key> <array/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.personal-information.location</key> <true/> <key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)</string> </array> ⚠️ Could not save VPN Configuration: Missing protocol or protocol has invalid type vpn connection error started with error : Missing protocol or protocol has invalid type
2
0
612
Jan ’24
Apple TV A2843 Dolby Vision Pink Distorted Picture at 23.9Hz and 29.9Hz Pioneer SC-LX904 Sony XR-90J
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
0
0
638
Nov ’23
AVPlayer playing video 6x or more faster than normal rate
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 } } }
0
0
622
Nov ’23
Detecting Video Playback Status of Other Apps on AppleTV?
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! :)
0
0
591
Nov ’23