Questions tagged [tvos]
tvOS is an operating system developed by Apple for the Apple TV based on its successful iOS operating system. The first beta was released on September 9th, 2015.
1,903
questions
88
votes
13
answers
96k
views
How to retrieve iPhone IDFA from API?
I would like to get the device IDFA. How to get this info from iOS official API ?
66
votes
9
answers
34k
views
How to extend iOS app to tvOS
I have an iOS app that I need to extend to tvOS.
All the information that I found are explaining how to start from scratch!
Is there any way to extend my app to tvOS or I should start a new project ...
50
votes
7
answers
14k
views
How to play YouTube content on tvOS
How would one play a YouTube video on Apple tvOS?
YouTube's embed feature works in iOS 9 as the OS has a UIWebView we can embed it into.
The new tvOS does not include a UIWebView so I cannot see a ...
35
votes
2
answers
20k
views
How can I get rid of "Update to recommended settings" warning?
I'm porting an iOS game to tvOS (Unity game). I have this annoying warning that I can't get rid of. Whenever I click on "Update to recommended settings" it pops up a window saying "...
27
votes
6
answers
21k
views
Web app in tvOS
Apple has released it's SDK for apple tv yesterday.
Most apps for TVs are web based (html, javascript and css) and I would like to port an existing tv web app to the tvOS.
The SDK in Xcode shows no ...
27
votes
6
answers
5k
views
Xcode 7.1 - Not authorized to use this service Error
I did a fresh install of OSX on my machine yesterday and installed Xcode 7.1. After having signed in with my developer account and fixing all code signing issues that come along, I wanted to upload my ...
26
votes
1
answer
1k
views
Custom fonts in a tvOS TVML app
Is there a way to use custom fonts in an Apple tvOS TVML based application? I've tried the @font-face at-rule to no avail.
<document>
<head>
<style>
@font-face {
...
25
votes
5
answers
6k
views
How to conditionally compile for tvOS in Swift
How do I conditionally compile code for iOS and tvOS in the same file in the Swift language?
I have tried all the Objective-C style #if etc. for TARGET_OS_TV as mentioned in the Apple docs, and some ...
25
votes
6
answers
24k
views
How do I play a video on tvOS for Apple TV?
I started a blank tvOS project and created the following code:
- (void)viewDidLoad
{
[super viewDidLoad];
AVPlayer *avPlayer = [AVPlayer playerWithURL:[NSURL URLWithString:@"http://www....
25
votes
1
answer
451
views
How to guide tvOS focus items for curved SKNodes
My tvOS app generates a game board using SKNodes that looks like the following:
Each shape, separated by lines, is an SKNode that is focusable (e.g. each colored wedge is composed of 5 SKNodes that ...
25
votes
1
answer
1k
views
tvOS: Is there anyway to prevent the search keyboard from collapsing on scroll?
So I have a standard setup for setting up a search view in my tvOS app.
let storyboard = UIStoryboard(name: "Main", bundle: nil)
guard let resultsController = storyboard....
24
votes
2
answers
2k
views
How to get a remote MAC address via IPv6 in iOS programmatically
I need to find a solution how to get the MAC address from the other device in the WiFi network. There is a good method how to do this for IPv4 (How does iOS app Fing get MAC Address?), but how to do ...
23
votes
8
answers
25k
views
Xcode 10 unexpected duplicate task: CopyPlistFile
Today I updated my Xcode from v.9.4.1 to v.10.0. Now I try to build my tvOS project and I see the following error: unexpected duplicate task: CopyPlistFile /Users/username/Library/Developer/Xcode/...
22
votes
10
answers
40k
views
UICollectionView sticky header in swift
I'm trying to create a sticky supplementary header, which stays on top all the time and won't response to scrolling events. The solutions I found so far still react on bounch scrolling and are fixed ...
21
votes
4
answers
5k
views
Use iPhone as a game controller in a tvOS app?
During the Apple TV announcement, the developers of Crossy Road demonstrated using an iPhone as a 2nd controller for an Apple tv game:
http://www.macrumors.com/2015/09/09/cooperative-play-for-crossy-...
21
votes
2
answers
5k
views
How to bridge TVML/JavaScriptCore to UIKit/Objective-C (Swift)?
So far tvOS supports two ways to make tv apps, TVML and UIKit, and there is no official mentions about how to mix up things to make a TVML (that is basically XML) User Interface with the native ...
21
votes
1
answer
14k
views
How to cancel DispatchQueue.main.asyncAfter(deadline: time) in Swift3? [duplicate]
Description:
I'm currently using the following code to see if the user has stopped typing in the searchBar. I would like to cancel it everytime the user immediately starts typing after 0.5 seconds.
...
20
votes
5
answers
17k
views
How to loop video with AVPlayerLooper
I try to loop a video in a TV OS app with the AVPlayerLooper because this should get rid of the pause/hicup when playing the video again. I watched the WWDC2016 video https://developer.apple.com/...
20
votes
3
answers
3k
views
AVPlayer error while playing on tvOS
I'm playing a video on tvOS using the following code:
NSString *filePath = [[NSBundle mainBundle] pathForResource:name ofType:@"mov"];
NSURL *fileUrl = [NSURL fileURLWithPath:filePath];
self.player =...
20
votes
2
answers
1k
views
Why is there a space between the cells in my UITableView
I have UITableView with 1 section and 10 rows with blue background. Why am I getting space between the cells? How do I remove it?
19
votes
1
answer
913
views
Is there any indication as to which Apple platforms allow inline assembly?
I've been trying to decypher for a while now what the status is of inline assembly on the various platforms since Apple announced bitcode.
As of right now (Xcode 7.1.1) this is what I observe:
OSX -...
18
votes
5
answers
4k
views
Can I use NSUserDefaults with tvOS?
The App Programming Guide for tvOS briefly states that
There is no persistent local storage for apps on Apple TV. This means that every app developed for the new Apple TV must be able to store data ...
18
votes
4
answers
5k
views
Can I mix UIKit and TVMLKit within one app?
I'm exploring tvOS and I found that Apple offers nice set of templates written using TVML. I'd like to know if a tvOS app that utilises TVML templates can also use UIKit.
Can I mix UIKit and TVMLKit ...
17
votes
3
answers
19k
views
AVPlayer with playback controls of avplayerviewcontroller
I am putting n avplayer inside of a view controller to customize some other elements of the view controller but I still want the playback and scrubbing controls used in AVPlayerViewController. Is ...
17
votes
3
answers
5k
views
TVML vs Custom App for Apple TVOS
Are there any advantage of using TVML over custom App (media based App not a game) for Apple TVOS? From what I read from Apple's documentation I could not figure out any such advantage (though it ...
17
votes
4
answers
13k
views
Has anyone reversed engineered the protocol used by Apple's iOS Remote app for controlling an Apple TV over IP?
I'm curious if it's possible for me to write programs that can control an Apple TV, specifically an Apple TV 4th gen running tvOS 9.1.1, like Apple's Remote app for iOS can. I'd like to send it ...
16
votes
1
answer
3k
views
Invalid Image Asset -Top Shelf Image - must be opaque
I am getting ERROR ITMS-90497, Invalid Image Asset -Top Shelf Image - must be opaque, when using this image:
I'm testing with this image to get it working and trying to upload a tvOS application to ...
16
votes
1
answer
8k
views
How do I deep link to Netflix on tvOS?
I'm hoping to open a deep link to a show or movie in the Netflix app on the new 4th gen Apple TV.
I'm able to make deep linking work on iOS. The link below will open the Netflix app to a specific ...
16
votes
2
answers
4k
views
Animate/zoom a focused custom view in tvOS
I have a custom UICollectionViewCell in my tvOS app. It has a UIImageView and some UILabels in it. I can get the cell to be focused by implementing the UIFocusEnvironment protocol without any issue, ...
15
votes
12
answers
35k
views
How to center align the cells of a UICollectionView in Swift3.0?
Description:
Answer for Objective-C and Swift2.0: How to center align the cells of a UICollectionView?
I usually would try to convert the Swift2.0 answer to the Swift3.0 solution, however the ...
15
votes
6
answers
4k
views
tvOS AVPlayerViewController Video Info
In the built-in apps for tvOS when you watch a video it shows information about that video when you swipe down. I can't find any information on how a developer can do this same thing. I'm sure it is ...
15
votes
2
answers
5k
views
How to detect a 'Click' gesture in SwiftUI tvOS
Using:
SwiftUI
Swift 5
tvOS
Xcode Version 11.2.1
I just want to detect a click gesture on the URLImage below
JFYI I am very new to Xcode, Swift and SwiftUI (less than 3 weeks).
URLImage(URL(string:...
14
votes
6
answers
23k
views
How can I force focus to change to a specific view in tvOS?
I am implementing custom code to handle a click on the Menu button on the Siri Remote.
How can I force focus to change to my custom menu when pressing the menu button?
14
votes
1
answer
2k
views
Turn off UITableView bottom/top gradient mask on tvOS?
On tvOS, UITableView applies a nice looking gradient mask to the top and bottom of the view. In most instances this is the desired appearance, but in some cases it is not. Is there a way to ...
14
votes
7
answers
4k
views
Opening the Apple TV App Store
Trying to build a tvOS app and one of the use cases I have is to be able to link off and open another app in the Apple TV App Store directly on a button click. Can someone please share a code snippet ...
14
votes
5
answers
4k
views
UICollectionViewCell to UIButton Focus in tvOS
I have a UICollectionView which contains 12-13 UICollectionViewCells. I can easily focus on the UICollectionViewCells and everything works. There is a UIButton outside the UICollectionView. If I am on ...
14
votes
3
answers
2k
views
Does the keyboard for a UITextField have to take up the whole screen?
It seems that the keyboard doesn't have to take up the whole screen, check UPDATE in the Question section of my post. Thanks.
Description
Use UITextField to place a full-screen keyboard on the ...
14
votes
2
answers
6k
views
InApp Purchases. No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox
I'm using .storekit configuration. When trying to make a purchase for such a product there is an error
<SKPaymentQueue: 0x600001240ce0>: Payment completed with error: Error
Domain=...
14
votes
2
answers
1k
views
Removing sandbox accounts from tvOS 13
I have been developing a tvOS app that uses in-app purchasing. As part of the development process, the app must be tested using iTunes sandbox user accounts. When beginning the in-app purchase using a ...
14
votes
1
answer
2k
views
React Native focus not changed in tvOS
Currently, I'm developing React Native app for TV platform and I'm able to play video on TV.
I added react-native-drawer in Video Player component and able to open/close drawer but not able to ...
13
votes
4
answers
2k
views
iTunes reject App Store Icon in tvOS 11 and Xcode 9
I faced with a problem in Xcode 9 (works fine in Xcode 8 before).
I can't upload tvOS build because of incorrect image asset for App Store icon.
But App Store icons have exactly 1280x768 size and 3 ...
13
votes
1
answer
6k
views
How to thoroughly rename a Universal Framework in Xcode?
I'm building a Framework, originally named Iris.
When trying to publish it as a Cocoapod I found out that there is an "Iris" framework already.
And while they have completely diferent purposes and ...
13
votes
12
answers
17k
views
Xcode stuck on copying cache files from device tvOS
I've been trying to connect my Apple TV with Xcode and it got stuck on copying cache files from device. It was connecting before as usual but suddenly it stopped.
Version Information
Apple TV : tvOS ...
13
votes
1
answer
3k
views
How do I open another application with tvOS?
Does UIApplication:openURL work?
NSString *iTunesLink = @"http://www.youtube.com/watch?v=TFFkK2SmPg4";
BOOL did = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
This ...
12
votes
2
answers
2k
views
Detect Siri Remote swipe in SwiftUI
How can you recognise Siri Remote swipe gestures from SwiftUI.
I seems like it has not yet been implemented, so how can I get around that?
12
votes
2
answers
2k
views
AVPlayer - play network video with separate audio URL without downloading the files first
I'm currently trying to play a video using AVPlayer that has separate sources for video and audio, so I combine them into a single AVPlayerItem as below:
let videoAsset = AVURLAsset(url: videoURL)
...
12
votes
1
answer
597
views
How to change tvOS system volume
On iOS we can use MPVolumeView to change the system volume but it's not available on tvOS.
Is there any API that allows us to change tvOS' system volume?
11
votes
4
answers
3k
views
Uninstall Apps on tvOS Simulator
How can i uninstall apps from tvOS simulator?
I already tried to long press the icon, but no "close button" appears.
I know, this is a Beta version, maybe in future they'll implement something like ...
11
votes
3
answers
2k
views
UIAlertController dismiss on tvOS with menu button
Does anyone know how to enable a UIAlertViewController which has been presented to be dismissed by clicking the "Menu" button on tvOS?
The Settings app on the Apple TV 4 features that behavior but it ...
11
votes
7
answers
10k
views
xcode tvos app exiting issue when overriding menu button
I am currently writing a tvOS app. I've been detecting and overriding the menu button with tapRecognizer to switch between storyboards and other functions. My issue is when I am on my home screen and ...