I put a supervised Apple TV in sigle app mode. Things were working fine until I unplugged the device from power.After replugging power, the designated app restarted correctly, but the Apple TV lost its pairing with the Mac I previously used for the configuration and there is not way to make it visible again. Choosing paired devices from the Apple Configurator 2 won't show anything.Even unplugging or trying a reset via remote (menu+home for 6 seconds) won't improve the situation: the Apple TV just restarts with the designated app and won't show up among paired devices.Even Xcode won't show the Apple TV among connected devices.Is there any way to exit from this ? Is there a way to force disable single app mode ? (so to at least gain access to Apple TV's settings menu)
I've noticed since beta one on the ATV4k that the audio has stearted curtting out regularly for about 3 seconds and about every 10-15 minutes. It started out being once in a while, now it's regularly across all streaming apps (netflix, amazon, disneynow, nickjr, plex). Submitted a bug report on it awhile ago, haven't heard anything back.
Post not yet marked as solved
`After following the sample code of `UIKitCatalog`, I find that the search keyboard always collapses when you try to focus to the search results while Apple's apps (TV Shows, Movies...) won't do that. I really dislike the collapse animation. Is there anyway to prevent that just like Apple's own apps?
Post not yet marked as solved
I updated my Apple TV 4k without usb-c port using tvOS 13 beta 2 ota. Now my Apple TV 4K shows a warning triangle the provides a link to support.apple.com/appletv/restore. I was not able to restore the Apple TV. So I brought it to an Apple Store they were not able to help me.
Post not yet marked as solved
I signed up for the Public Beta Program, and updated some of my devices, but I can't get to turn the "get beta updates" in my Apple TV. I am already logged in with the same Apple ID used for the Beta program, but nothing... I have another Apple TV that I did not have any problems installing the update. I need some help please 🙂
Post not yet marked as solved
We use a UIScrollView but manage our own virtualization and when fast scrolling kicks in tvOS adds a secret child to our UIScrollView of type _UIFocusFastScrollingIndexBarView and gives it focus. I don't see shouldUpdateFocus being called for when this happens so I can't stop it. This is wreaking havok with our input and virtualization systems.We've tried scrollView.indexDisplayMode = .alwaysHidden but that doesn't stop this.
Post not yet marked as solved
tvOS14 has no option to choose an output source so No Airplay to homepods. Has the Option moved or been removed from this version? I see nothing about it in the release notes
Post not yet marked as solved
I have been struggling to get a functional UISearchController in a SwiftUI app, under a tab bar. I've scoured the web and documentation, and managed to get something almost there, however the keyboard on the search view does not respond to left and right controls. I've seen a post on StackExchange where someone has a similar issue, but no solution.
Can anyone help to show how to make a functional search view in a SwiftUI app on tvOS 13 ?
One thing to note, while working through the views, I discovered a bug in USearchView which doesn't set a horizontal constraint for the keyboard area in one of its' inner views. I include a fix for that which adds in the constraint if one can't be found.
I've attached the full source, just add to an empty tvOS SwiftUI project (and remove AppDelegate and ContentView)
TestSearch.swift - https://developer.apple.com/forums/content/attachment/af387dcd-4501-44b3-90ac-f71177634103
The UISearchView HostingView:
struct PageView<Page: View>: View {
var viewController: UIHostingController<Page>
@ObservedObject var state: SearchState
init(_ resultsView: Page, state: SearchState) {
self.viewController = UIHostingController(rootView: resultsView)
self.state = state
}
var body: some View {
PageViewController(controller: viewController, state: state)
}
}
struct PageViewController: UIViewControllerRepresentable {
var controller: UIViewController
@ObservedObject var state: SearchState
func makeUIViewController(context: Context) -> UINavigationController {
let searchController = UISearchController(searchResultsController: controller)
searchController.searchResultsUpdater = state
searchController.searchBar.placeholder = NSLocalizedString("Enter search (e.g. Shawshank)", comment: "")
let searchContainer = UISearchContainerViewController(searchController: searchController)
searchContainer.title = NSLocalizedString("Search", comment: "")
let searchNavigationController = UINavigationController(rootViewController: searchContainer)
return searchNavigationController
}
func updateUIViewController(_ searchContainer: UINavigationController, context: Context) {
if searchContainer.children.count > 0,
let searchController = (searchContainer.children[0] as? UISearchContainerViewController)?.searchController,
let searchControllerView = searchController.view,
searchController.children.count > 1,
let uiKBFocusView = searchController.children[1].view,
!searchControllerView.constraints.reduce(false, {$0 || ($1.firstAttribute == NSLayoutConstraint.Attribute.centerX) }){
let horizontalConstraint = NSLayoutConstraint(item: uiKBFocusView, attribute: NSLayoutConstraint.Attribute.centerX, relatedBy: NSLayoutConstraint.Relation.equal, toItem: searchControllerView, attribute: NSLayoutConstraint.Attribute.centerX, multiplier: 1, constant: 0)
searchControllerView.addConstraints([horizontalConstraint])
}
}
}
The Search State and results view
class SearchState: NSObject, ObservableObject, UISearchResultsUpdating {
@Published var text: String = ""
func updateSearchResults(for searchController: UISearchController) {
let searchBar = searchController.searchBar
self.text = searchBar.text ?? ""
}
}
I have in my project different code which is responsible for the blur effect in my app. In tvOS 13 this worked fine but in tvOS 14 I have to remove the code otherwise the app will crash. What exactly do I have to change in the code to make it run on tvOS 14. Thanks for the help.
private func sharedSetup(effect: UIBlurEffect, radius: CGFloat = 90) {			
let UICustomBlurEffect = NSClassFromString("_UICustomBlurEffect") as! UIBlurEffect.Type
let raw = effect.value(forKey: "_style") as! Int
let style = UIBlurEffect.Style(rawValue: raw)!
let effect = UICustomBlurEffect.init(style: style)						
effect.setValue(1.0, forKey: "scale")		
effect.setValue(radius, forKey: "blurRadius")			
effect.setValue(UIColor.clear, forKey: "colorTint")
self.blurEffect = effect	
}
Post not yet marked as solved
Hi,
I'm having an issue with TVCollectionViewFullScreenLayout. The requirement is that a user can pick from a collection view of items which then presents a new ViewController with a UICollectionView using TVCollectionViewFullScreenLayout populated with cells derived from TVCollectionViewFullScreenCell, with the initial position set to the same item the user selected.
Calling collectionView.scrollToItemAt initially works but then it snaps back one position to the previous cell. Simply adding one to the index position leaves the user with an ugly animation as the view loads and then scrolls to the correct position.
I investigated the .centerIndexPath property but this is get only.
An example of the correct behaviour can be found in the TV app when selecting a title from a horizontal list of suggestions. The view that is presented starts with the item the user selected.
Post not yet marked as solved
I'm really struggling to get a reliable connection to my Apple TV4 from Xcode. Using these steps:
https://support.apple.com/en-us/HT208088
When it works, it's beautiful. But when I make a couple of changes to the code and redeploy the Apple TV goes black (was formally running our app), and Xcode tells me to connect the Apple TV.
Occasionally I get a message saying "This device has been ignored in the devices panel", which isn't as helpful as it sounds.
Checking the Devices and Simulators menu, I can see it's disconnected. I have tried the following:
Restarting the Apple TV
Restarting Xcode
Unpairing the Mac from the Apple TV
Confirmed all devices are on the exact same wifi (e.g. not a 2.4g one)
When I run through the steps to connect again it just fails quietly in the Devices and Simulators, stays in the "Discovered" section, and only asks me to "pair". It has no problem interacting with the Apple TV to prompt it for a 6 digit code.
Any advice would be greatly appreciated.
Post not yet marked as solved
Hi there,
I just downloaded the Sample Code provided by de developer documentation in order to run a simple Client-Server app with TVML Kit for tvOS. https://developer.apple.com/documentation/tvmljs/creating_a_client-server_tvml_app
I'm following the docs step by step and after running the server in the terminal. I would go and open the project in Xcode and hit the build button. It would lauch the simulator but I get the following error in the simulator:
This operation couldn't be completed (TVMLKitErrorDomain error 3.)
And in my console I would get this:
CreateTVMLApp[82816:2094742] [Image] _TVAssetGroup failed to purge cache path: Shared Asset Group, Error Domain=NSCocoaErrorDomain Code=4 "“SharedImageCache” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/aeum3893/Library/Developer/CoreSimulator/Devices/A976E6FD-6B0D-4C24-BB4C-DDA1F31B0F01/data/Containers/Data/Application/9AC60995-C9EB-4051-803B-334E1A06F9DC/Library/Caches/com.example.apple-samplecode.creating-a-basic-tvml-app/SharedImageCache, NSUnderlyingError=0x6000004168e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-01 09:01:42.238202-0500 CreateTVMLApp[82816:2094742] [Image] _TVAssetGroup failed to purge cache path: LSM Asset Group, Error Domain=NSCocoaErrorDomain Code=4 "“LSMImageCache” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/aeum3893/Library/Developer/CoreSimulator/Devices/A976E6FD-6B0D-4C24-BB4C-DDA1F31B0F01/data/Containers/Data/Application/9AC60995-C9EB-4051-803B-334E1A06F9DC/Library/Caches/com.example.apple-samplecode.creating-a-basic-tvml-app/LSMImageCache, NSUnderlyingError=0x60000042c870 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-01 09:01:42.238767-0500 CreateTVMLApp[82816:2094742] [Image] _TVAssetGroup failed to purge cache path: Trick Play Asset Group, Error Domain=NSCocoaErrorDomain Code=4 "“TrickPlay” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/aeum3893/Library/Developer/CoreSimulator/Devices/A976E6FD-6B0D-4C24-BB4C-DDA1F31B0F01/data/Containers/Data/Application/9AC60995-C9EB-4051-803B-334E1A06F9DC/Library/Caches/com.example.apple-samplecode.creating-a-basic-tvml-app/TrickPlay, NSUnderlyingError=0x600000447450 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-01 09:01:42.239321-0500 CreateTVMLApp[82816:2094742] [Image] _TVAssetGroup failed to purge cache path: Photo Stream Asset Group, Error Domain=NSCocoaErrorDomain Code=4 "“PhotostreamImages” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/aeum3893/Library/Developer/CoreSimulator/Devices/A976E6FD-6B0D-4C24-BB4C-DDA1F31B0F01/data/Containers/Data/Application/9AC60995-C9EB-4051-803B-334E1A06F9DC/Library/Caches/com.example.apple-samplecode.creating-a-basic-tvml-app/PhotostreamImages, NSUnderlyingError=0x60000042ca20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-01 09:01:42.264212-0500 CreateTVMLApp[82816:2094742] [Image] _TVAssetGroup failed to purge cache path: AR Asset Group, Error Domain=NSCocoaErrorDomain Code=4 "“ARFileCache” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/aeum3893/Library/Developer/CoreSimulator/Devices/A976E6FD-6B0D-4C24-BB4C-DDA1F31B0F01/data/Containers/Data/Application/9AC60995-C9EB-4051-803B-334E1A06F9DC/Library/Caches/com.example.apple-samplecode.creating-a-basic-tvml-app/ARFileCache, NSUnderlyingError=0x60000042cc00 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-01 09:01:42.383110-0500 CreateTVMLApp[82816:2094742] screen parameters are unexpected: MGScreenClass1920x1080x1x40 SCREEN_TYPE(1920,1080,1, 40)
2021-02-01 09:01:42.415012-0500 CreateTVMLApp[82816:2095237] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-02-01 09:01:42.498897-0500 CreateTVMLApp[82816:2095248] [System] <IKAppContext (0): 0x60000337f100> Unable to start script (http://localhost:9001//application.js) because of SyntaxError: Unexpected token '<': {
line = 1;
sourceURL = "http://localhost:9001//application.js";
}
2021-02-01 09:01:42.499296-0500 CreateTVMLApp[82816:2094742] [System] App Context Failed with Error: Error Domain=ITMLKitErrorDomain Code=101 "(null)" UserInfo={line=1, sourceURL=http://localhost:9001//application.js}
appController(_:didFail:) invoked with error: Error Domain=TVMLKitErrorDomain Code=3 "(null)"
Apparently, it cannot find the application.js file, but not sure why and how to go about this
Post not yet marked as solved
I'm new in SwiftUI and Apple TV applications and I was wondering how to detect swipe gesture on remote control for TvOS in SwiftUI for the ContentView. Every time I search I just found solutions for UIKit or for iPhone/iPad since the drag gesture is not available to tvOS.
The plan for this gesture when swipe left or right present menus/side panels on the screen and focus on theses views.
Can anyone give some advice/tutorial or demo?
Thanks in advance and KR,
rpessoa
I've raised a bug with Apple already, but I was wondering if anyone else is experiencing this weird issue:
When playing music on the Apple TV and associated HomePod(s) in Home Cinema mode with ARC enabled, I am unable to add a Sonos speaker as the AirPlay 2 target.
As a workaround I can first add a second Apple device (be it an Apple TV or solo HomePod not running Home Cinema audio), then add the Sonos speaker into the group, and the audio plays. Interestingly enough, removing the second Apple device from the group does not stop the Sonos speaker from playing from the original Apple TV and HomePod combo.
I've been able to replicate this in tvOS 14.5.1 and 14.6. I'm assuming that it is likely an issue with the Home Cinema mode with ARC, which is in Beta after all.
Regardless of how I set UIUserInterfaceStyle in info.plist, setting overrideUserInterfaceStyle on a UIViewController seems to do absolutely nothing (though the setting in info.plist doe override the system setting). Is overrideUserInterfaceStyle no longer supported? I'd like to provide a way for my users to override their system-wide dark or light mode in my app.
Post not yet marked as solved
Per the title, 14.7 was running on an original 4K ATV (not the latest one) and I was watching content on it yesterday then all of a sudden screen goes blank, and ATV is fast flashing the LED. Its been doing this ever since. How do I resolve this and what caused it as this literally happened while just consuming content ?
Thanks
Post not yet marked as solved
I am trying to implement the new iPod wheel style scrubbing gesture that was recently added to AVPlayerController on my custom Player UI built on top of AVPlayer .
I can not find any new API reporting this kind of gestures from the remote control, is there some API that I am missing that is actually reporting these gestures?
Otherwise, how would you recommend to implement something like that? Should I use the GameController SDK in order to get the actual position of the user's finger?
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.
Post not yet marked as solved
Hello,
Is there a way how to detect long press on arrow on new Siri remote?
UILongPressGestureRecognizer detect only presses on select button (small circle). How we can detect long press on the directional wheel?
Post not yet marked as solved
Hello I have Apps and I have just discovered they do not work with new Apple TV 4k remote, in Appstore desc it says Apple TV remote 1st gen required, Im confused why is the touch swipe on 4k remote not backward compatible also I never got any correspondence about updating apps to accomondate new remote this is ridiculous and I cannot find docs on new remote