Skip to content

feat(app, sdks)!: update underlying SDKs w/related forward porting #7157

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

Merged
merged 8 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/scripts/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
},
"main": "lib/index.js",
"dependencies": {
"firebase-admin": "^11.3.0",
"firebase-functions": "^4.2.1"
"firebase-admin": "^11.8.0",
"firebase-functions": "^4.4.0"
},
"devDependencies": {
"firebase-functions-test": "^3.0.0",
"typescript": "^4.9.5"
"firebase-functions-test": "^3.1.0",
"typescript": "^5.0.4"
},
"private": true
}
4 changes: 2 additions & 2 deletions .github/workflows/tests_e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
name: iOS
runs-on: macos-12
# TODO matrix across APIs, at least 11 and 15 (lowest to highest)
timeout-minutes: 60
timeout-minutes: 80
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Pod Install
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
timeout_minutes: 20
retry_wait_seconds: 30
max_attempts: 3
command: yarn tests:ios:pod:install
Expand Down
2 changes: 1 addition & 1 deletion docs/app-distribution/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add the plugin to your `/android/build.gradle` file as a dependency:
buildscript {
dependencies {
// ...
classpath 'com.google.firebase:firebase-appdistribution-gradle:3.2.0'
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you do not meet these prerequisites, follow the links below:
- [React Native - Setting up the development environment](https://reactnative.dev/docs/environment-setup)
- [Create a new Firebase project](https://console.firebase.google.com/)

Additionally, current versions of firebase-ios-sdk have a minimum Xcode requirement of 13.3, which implies a minimum macOS version of 12 (macOS Monterey).
Additionally, current versions of firebase-ios-sdk have a minimum Xcode requirement of 14.1, which implies a minimum macOS version of 12.5 (macOS Monterey).

## Installation

Expand Down Expand Up @@ -218,7 +218,7 @@ project.ext {
// Overriding Library SDK Versions
firebase: [
// Override Firebase SDK Version
bom : "31.4.0"
bom : "32.1.0"
],
],
])
Expand All @@ -233,7 +233,7 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the

```ruby
# Override Firebase SDK Version
$FirebaseSDKVersion = '10.7.0'
$FirebaseSDKVersion = '10.10.0'
```

Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.
Expand Down
1 change: 0 additions & 1 deletion packages/app-check/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ dependencies {
api appProject
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion('firebase', 'bom')}")
implementation 'com.google.firebase:firebase-appcheck-playintegrity'
implementation "com.google.firebase:firebase-appcheck-safetynet"
implementation "com.google.firebase:firebase-appcheck-debug"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.google.firebase.appcheck.debug.InternalDebugSecretProvider;
import com.google.firebase.appcheck.debug.internal.DebugAppCheckProvider;
import com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory;
import com.google.firebase.appcheck.safetynet.SafetyNetAppCheckProviderFactory;
import com.google.firebase.inject.Provider;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -87,10 +86,6 @@ public String getDebugSecret() {
}
}

if ("safetyNet".equals(providerName)) {
delegateProvider = SafetyNetAppCheckProviderFactory.getInstance().create(app);
}

if ("playIntegrity".equals(providerName)) {
delegateProvider = PlayIntegrityAppCheckProviderFactory.getInstance().create(app);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/app-check/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ export namespace FirebaseAppCheckTypes {
export interface ReactNativeFirebaseAppCheckProviderAndroidOptions
extends ReactNativeFirebaseAppCheckProviderOptions {
/**
* The android provider to use, either `safetyNet` or `playIntegrity`. default is `playIntegrity`, `safetyNet` is deprecated.
* The android provider to use, either `debug` or `playIntegrity`. default is `playIntegrity`.
*/
provider?: 'debug' | 'safetyNet' | 'playIntegrity';
provider?: 'debug' | 'playIntegrity';
}

export interface ReactNativeFirebaseAppCheckProvider extends AppCheckProvider {
Expand Down Expand Up @@ -212,14 +212,14 @@ export namespace FirebaseAppCheckTypes {
* Activate App Check
* On iOS App Check is activated with DeviceCheck provider simply by including the module, using the token auto refresh default or
* the specific value (if configured) in firebase.json, but calling this does no harm.
* On Android you must call this and it will install the SafetyNet provider in release builds, the Debug provider if debuggable.
* On Android if you call this it will install the PlayIntegrity provider in release builds, the Debug provider if debuggable.
* On both platforms you may use this method to alter the token refresh setting after startup.
* On iOS if you want to set a specific AppCheckProviderFactory (for instance to FIRAppCheckDebugProviderFactory or
* FIRAppAttestProvider) you must manually do that in your AppDelegate.m prior to calling [FIRApp configure]
*
* @deprecated use initializeAppCheck to gain access to all platform providers and firebase-js-sdk v9 compatibility
* @param siteKeyOrProvider - This is ignored, Android uses DebugProviderFactory if the app is debuggable (https://firebase.google.com/docs/app-check/android/debug-provider)
* Android uses SafetyNetProviderFactory for release builds.
* Android uses PlayIntegrityProviderFactory for release builds.
* iOS uses DeviceCheckProviderFactory by default unless altered in AppDelegate.m manually
* @param isTokenAutoRefreshEnabled - If true, enables SDK to automatically
* refresh AppCheck token as needed. If undefined, the value will default
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class FirebaseAppCheckModule extends FirebaseModule {
rnfbProvider = new ReactNativeFirebaseAppCheckProvider();
rnfbProvider.configure({
android: {
provider: 'safetyNet',
provider: 'playIntegrity',
},
apple: {
provider: 'deviceCheck',
Expand Down
4 changes: 2 additions & 2 deletions packages/app-distribution/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ dependencies {
api appProject
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
// TODO remove the specific version once it is out of beta and participates in bom versioning
implementation 'com.google.firebase:firebase-appdistribution-api:16.0.0-beta06'
implementation 'com.google.firebase:firebase-appdistribution-api:16.0.0-beta08'
// TODO demonstrate how to only include this in certain build variants
// - perhaps have firebase.json name the variants to include, then roll through variants here and only
// add the dependency to variants that match? Or... (PRs welcome...)
// implementation 'com.google.firebase:firebase-appdistribution:16.0.0-beta06'
// implementation 'com.google.firebase:firebase-appdistribution:16.0.0-beta08'
}

ReactNative.shared.applyPackageVersion()
Expand Down
6 changes: 3 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@
},
"sdkVersions": {
"ios": {
"firebase": "10.7.0",
"firebase": "10.10.0",
"iosTarget": "11.0",
"macosTarget": "10.13"
},
"android": {
"minSdk": 19,
"targetSdk": 33,
"compileSdk": 33,
"firebase": "31.4.0",
"firebase": "32.1.0",
"firebaseCrashlyticsGradle": "2.9.2",
"firebasePerfGradle": "1.4.2",
"gmsGoogleServicesGradle": "4.3.15",
"playServicesAuth": "20.3.0"
"playServicesAuth": "20.5.0"
}
}
}
8 changes: 2 additions & 6 deletions packages/auth/e2e/multiFactor.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ describe('multi-factor', function () {
} catch (e) {
e.message
.toLocaleLowerCase()
.should.containEql(
'[auth/invalid-verification-code] The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms'.toLocaleLowerCase(),
);
.should.containEql('[auth/invalid-verification-code]'.toLocaleLowerCase());

const verificationId = await firebase
.auth()
Expand Down Expand Up @@ -440,9 +438,7 @@ describe('multi-factor', function () {
// THEN an error message is thrown
e.message
.toLocaleLowerCase()
.should.containEql(
'[auth/invalid-verification-code] The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms'.toLocaleLowerCase(),
);
.should.containEql('[auth/invalid-verification-code]'.toLocaleLowerCase());

return Promise.resolve();
}
Expand Down
3 changes: 2 additions & 1 deletion packages/firestore/e2e/Bundle/namedQuery.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ describe('firestore().namedQuery()', function () {
snapshot.docs[0].metadata.fromCache.should.eql(true);
});

it('returns QuerySnapshot from firestore backend when omitting "source: cache"', async function () {
// TODO: log upstream issue - this broke with BoM >= 32.0.0, source always appears to be cache now
xit('returns QuerySnapshot from firestore backend when omitting "source: cache"', async function () {
const docRef = firebase.firestore().collection(BUNDLE_COLLECTION).doc();
await docRef.set({ number: 4 });

Expand Down
Loading