Show common user interface elements from Apple TV in your native app using TVUIKit.

Posts under TVUIKit tag

6 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Compatibility of Liquid Glass Effect on Older Apple TV Models
Hello everyone, Following the WWDC 2025 announcement of tvOS 26 and the introduction of the new Liquid Glass effect, Apple published a press release mentioning that Liquid Glass is "available on Apple TV 4K (2nd generation and later)". This seems to exclude both the Apple TV HD and the 1st generation Apple TV 4K, even though both devices remain compatible with tvOS 26. Source: Apple Newsroom ( https://www.apple.com/newsroom/2025/06/apple-tv-brings-a-beautiful-redesign-and-enhanced-home-entertainment-experience ) I’m wondering: Will using UIGlassEffect or glassEffect(_:in:) on these older devices cause a crash? If not, will the effect fall back to a simple blur, or render as fully transparent? Is there an API or recommended way to detect whether the Liquid Glass effect is supported on the current device? Thanks in advance for your insights!
0
1
51
2w
Memory Leak in Apple TV(tvOS 17.4)
I found a memory leak in tvOS 17.4, but it's not happening in tvOS 18.0 here is the code flow 1.I have controller inside which I have tableView which in turn contains a collectionview here I have passed self to tableViewcell as delegate and then from tableview cell I have passed self again as delegate to collectionViewcell, but memory is not released, because self is retained "I have passed self as weak every where still memory leak is happening only in tvOS 17.4 and below versions. but in 18.0 and above versions it's fine"
1
0
326
Feb ’25
tvOS: Search Keyboard Unresponsive After Dismissing Custom Controller with Embedded TVDigitEntryViewController
Description I'm developing a tvOS application where I utilize a UISearchController embedded within a UISearchContainerViewController for search functionality. In a particular flow, a custom view controller contains a TVDigitEntryViewController as a child, with its modalPresentationStyle set to .blurOverFullScreen. The issue arises when a user initiates the PIN entry but decides to cancel and return to the search interface without entering a PIN. Upon returning, the search keyboard is no longer visible, and attempts to focus or interact with it are unsuccessful. Steps to Reproduce Initialize and present a UISearchContainerViewController that contains a UISearchController with a results view controller. Within the search results, present a custom view controller containing TVDigitEntryViewController as a child, setting its modalPresentationStyle to .blurOverFullScreen. Dismiss the custom view controller without entering a PIN (e.g., by pressing the Menu button on the remote). Observe that upon returning to the search interface, the keyboard is missing, and focus interactions are unresponsive. Observed Behavior After dismissing the custom view controller with TVDigitEntryViewController, the search keyboard does not reappear, and the focus system seems to lose track of the search input field. Expected Behavior The search keyboard should remain visible and functional after dismissing the custom view controller, allowing users to continue their search without interruption. Additional Context I have reviewed the TVDigitEntryViewController documentation (developer.apple.com) and related discussions on the Apple Developer Forums but have not found a solution to this specific issue. Questions Has anyone encountered a similar issue or have insights into why the search keyboard becomes unresponsive after dismissing a .blurOverFullScreen modal with a child TVDigitEntryViewController? Are there recommended practices to ensure the search keyboard remains active and focusable after such modal presentations? Any guidance or suggestions would be greatly appreciated. Thank you!
3
0
385
Feb ’25
Controlling the focus order in a UICollectionView
I'm running into a problem with the focus order in my UICollectionView in my tvOS app. The layout of my app is outlined in the following diagram On the uppermost layer I have a UITableView, each cell containing a single UICollectionView that can contain a variable number of UICollectionViewCells. When the user swipes down, I want the left-most item in the next row down to be selected, as follows: I've been able to get this to work for the majority of cases. The exception is when the previously focused item extends to the length of the screen - in this case the next focused item isn't the leftmost item, but rather the center item, as follows. Using focus guides won't really fit the use case here since collection views are dynamically generated. I've found that there is a function in UICollectionViewDelegate, indexPathForPreferredFocusedView that should help here but it only seems to be called intermittedly, even though I have set remembersLastFocusedIndexPath on the collectionview to true. I can force it to be called by calling setNeedsFocusUpdate() but I can't figure out a good place to call it - shouldUpdateFocus is too early and didUpdateFocus is too late. Is there some way to constrain the focus area of a view to a certain subset of it's frame - for example, the left-most quarter of its width? Or does anyone know of some other solution to this problem?
1
0
524
Jan ’25
[tvOS 18][SwiftUI] Severe ScrollView Lag after Update
Hello, I've upgraded both of my Apple TVs to tvOS 18. Since then, my app developed with SwiftUI has become almost unusable due to severe lag, particularly when scrolling in a LazyVStack. On the A1625 (Apple TV HD), the lag can last up to 20 seconds, while on the A2843 (Apple TV 4K, 3rd generation, Wi-Fi + Ethernet), it’s about one second. I can consistently reproduce the issue with this minimal example: @main struct MyApp: App { var body: some Scene { WindowGroup { ScrollView { LazyVStack { ForEach(0..<1000) { nb in Button("Item \(nb)") {} } } } } } } Using Instruments, I found that the hang is related to this call: 389.00 ms 71,4 % 6.00 ms +[_UIFocusRegionEvaluator __regionsByEvaluatingOcclusionsForBaseRegions:occludingRegions:baseRegionsCanOccludeEachOther:inSnapshot:] Unfortunately, I can't attach the Instruments trace directly here, but you can download it from this link: https://drive.google.com/file/d/1sEIwXhr7_ajjRHZevCIW6jNOlPjaeU6L/view?usp=sharing Important notes: The same screen, when written in UIKit, runs smoothly on both devices. After performing a factory reset on the older device, the performance issue disappeared. However, as you can imagine, I’m already receiving complaints from users who are understandably unwilling to reset their devices. Does anyone know of a workaround until this is addressed by Apple?
3
1
1.1k
Oct ’24