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

feat: add tvOS support #8111

Merged
merged 6 commits into from
Nov 7, 2024
Merged

feat: add tvOS support #8111

merged 6 commits into from
Nov 7, 2024

Conversation

mikehardy
Copy link
Collaborator

Description

This supercedes:

It is based on that PR from @adamkoch but I can't push to that branch and I have done a series of little fixups on it

Related issues

Discussion:

Release Summary

This should be a squash merge, the PR title should serve for release as conventional commit message

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

The base of the PR style-wise is adding the platform to package.json then using it in podspecs, that is tested already by library consumer so should work

The compile ifdefs will be tested on iOS at least and that should be sufficient


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Adds compatibility with tvOS (using react-native-tvos) for RNFirebase packages: app, auth, firestore, functions, storage and app check
@mikehardy mikehardy added the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 2, 2024
Copy link

vercel bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 7:31pm

@mikehardy mikehardy force-pushed the @mikehardy/tvos-support branch from 6707df3 to be74e45 Compare November 2, 2024 19:26
@@ -55,7 +55,7 @@
static __strong NSMutableDictionary *emulatorConfigs;
// Used for caching credentials between method calls.
static __strong NSMutableDictionary<NSString *, FIRAuthCredential *> *credentials;
#if !TARGET_OS_TV
#if TARGET_OS_IOS
Copy link
Collaborator Author

@mikehardy mikehardy Nov 2, 2024

Choose a reason for hiding this comment

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

@@ -55,18 +55,18 @@ - (void)configure:(FIRApp *)app
}

if ([providerName isEqualToString:@"appAttest"]) {
if (@available(iOS 14.0, macCatalyst 14.0, tvOS 15.0, watchOS 9.0, *)) {
if (@available(iOS 14.0, macOS 11.0, macCatalyst 14.0, tvOS 15.0, watchOS 9.0, *)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@"debug provider to guarantee invalid tokens in this invalid configuration.");
self.delegateProvider = [[FIRAppCheckDebugProvider alloc] initWithApp:app];
}
}

if ([providerName isEqualToString:@"appAttestWithDeviceCheckFallback"]) {
if (@available(iOS 14.0, *)) {
if (@available(iOS 14.0, macOS 11.0, macCatalyst 14.0, tvOS 15.0, watchOS 9.0, *)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this should have been guarded for all the platforms during initial implementation, oversight

@@ -77,7 +77,7 @@
"firebase": "11.4.0",
"iosTarget": "13.0",
"macosTarget": "10.15",
"tvosTarget": "12.0"
"tvosTarget": "13.0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 7, 2024
@mikehardy mikehardy merged commit d301ccf into main Nov 7, 2024
18 of 19 checks passed
@mikehardy mikehardy deleted the @mikehardy/tvos-support branch November 7, 2024 16:55
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.

3 participants