Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tvOS 13 to if available checks in Presentation Manager #360

Merged
merged 3 commits into from
Jan 17, 2021

Conversation

frydiggity
Copy link
Contributor

I'm working on a project that has an iOS as well as a tvOS version of the app. When I tried compiling the project with Siren against our tvOS target, it does not compile, as a result of the if #available checks in the Presentation manager. tvOS reasonably handles presenting an Alert (albeit as a full-screen overlay) and it works just fine in tvOS. As in iOS, it's difficult to test on a tvOS simulator, but on an actual AppleTV device, it does redirect to the App Store app to download the newest version just like iOS.

@@ -114,6 +114,11 @@ extension APIManager {

var items: [URLQueryItem] = [URLQueryItem(name: Constants.bundleID, value: Bundle.main.bundleIdentifier)]

#if os(tvOS)
let tvOSQueryItem = URLQueryItem(name: "entity", value: "tvSoftware")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain the name and value here? Is it documented somewhere? I'm having a hard time finding this info. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this from https://developer.apple.com/forums/thread/30633 and https://discussions.apple.com/thread/7922201
Looks like, as of 3 years ago or so, this is undocumented by Apple, but definitely does the trick to pull back tvOS App Store data from their query REST API.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@ArtSabintsev
Copy link
Owner

Thanks for the PR! I left a comment for clarification. Thanks!

@ArtSabintsev
Copy link
Owner

Thank you!

@ArtSabintsev ArtSabintsev merged commit 380f790 into ArtSabintsev:master Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants