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

Apple TV support 1: podspec and code changes for commonly used modules #24329

Merged
merged 12 commits into from
Sep 11, 2023

Conversation

douglowder
Copy link
Contributor

@douglowder douglowder commented Sep 8, 2023

Why

First of a series of PRs to add Apple TV support for many (but not all) Expo SDK modules.

This PR makes Apple TV able to compile for apps using react-native-tvos@0.72.4-0 and ONLY the following modules:

  • expo
  • expo-application
  • expo-constants
  • expo-eas-client
  • expo-file-system
  • expo-font
  • expo-json-utils
  • expo-keep-awake
  • expo-manifests
  • expo-modules-core
  • expo-splash-screen
  • expo-structured-headers
  • expo-updates-interface
  • expo-updates

How

  • Add tvOS to podspecs
  • Native code changes wrapped in #if TARGET_OS_TV (for Objective C) or #if os(tvOS) (for Swift)
  • Import source for the ASN1Decoder Swift framework used by expo-updates, as the public podspec for that framework does not yet support tvOS

Test Plan

  • Manual testing with a template still in development
  • Existing CI for iOS should pass (nothing should be broken)

Checklist

@linear
Copy link

linear bot commented Sep 8, 2023

ENG-10042 Add Apple TV support to Expo SDK

Now that React Native TV repo is at 0.72.4, even with core, we can start adding partial support for Apple TV.

Included:

  • Support for the modules used in all apps created with create-expo-app
  • Support for expo-updates
  • Support for expo-av (minus recording features)
  • Support for expo-apple-authentication
  • Custom template for TV (maybe expo-template-tv)

Possibly included in future:

  • expo-router
  • expo-dev-client and friends

Excluded:

  • Modules specifically for phone features, or web features (no web on Apple TV)
    • expo-camera
    • expo-barcode-scanner
    • expo-battery
    • expo-cellular
    • expo-contacts
    • expo-face-detector
    • expo-haptics
    • expo-local-authentication
    • expo-location
    • expo-screen-capture
    • expo-screen-orientation
    • expo-sensors
    • expo-speech
    • expo-standard-web-crypto
    • expo-status-bar
    • expo-web-browser

@expo-bot expo-bot added the bot: needs changes ExpoBot found things that don't meet our guidelines label Sep 8, 2023
@douglowder douglowder requested a review from expo-bot September 8, 2023 03:23
@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions bot: passed checks ExpoBot has nothing to complain about and removed bot: needs changes ExpoBot found things that don't meet our guidelines bot: suggestions ExpoBot has some suggestions labels Sep 8, 2023
Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

Looking at the commit history and open PRs on the ASN1Decoder repo, I think it's unlikely a PR will get merged and published, but I still think it's worth a shot (in parallel to this PR).

Just a few inline comments. Will defer to others for the higher-level review about tvos since I've never dealt with it.

packages/expo-av/ios/EXAV/EXAV.m Outdated Show resolved Hide resolved
packages/expo-constants/ios/ConstantsModule.swift Outdated Show resolved Hide resolved
@douglowder
Copy link
Contributor Author

Looking at the commit history and open PRs on the ASN1Decoder repo, I think it's unlikely a PR will get merged and published, but I still think it's worth a shot (in parallel to this PR).

PR has been submitted: filom/ASN1Decoder#39

@douglowder douglowder requested a review from wschurman September 8, 2023 23:34
@douglowder douglowder requested a review from Kudo September 9, 2023 02:07
Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

Agree about adding CI for this in a follow-up. Otherwise this will break pretty quickly since most of us ever build for TV locally.

Approving for my addressed comments, but wait for an approval from @Kudo as well to land as he is more familiar with it.

@douglowder douglowder force-pushed the doug/eng-10042-add-apple-tv-support-to-expo-sdk branch from a41b21c to 5b97b8a Compare September 10, 2023 19:35
@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions and removed bot: passed checks ExpoBot has nothing to complain about labels Sep 10, 2023
@douglowder douglowder force-pushed the doug/eng-10042-add-apple-tv-support-to-expo-sdk branch from 0897858 to 271749a Compare September 10, 2023 20:01
@douglowder douglowder requested a review from tsapeta September 10, 2023 20:02
@douglowder douglowder force-pushed the doug/eng-10042-add-apple-tv-support-to-expo-sdk branch from 57f60ae to 72a9b91 Compare September 11, 2023 00:41
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Sep 11, 2023
@douglowder douglowder merged commit ef90178 into main Sep 11, 2023
10 checks passed
@douglowder douglowder deleted the doug/eng-10042-add-apple-tv-support-to-expo-sdk branch September 11, 2023 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants