Skip to content

Commit

Permalink
feat(sdk): firebase-ios-sdk to 8.7.0 / firebase-android-sdk 28.4.1
Browse files Browse the repository at this point in the history
- add app distribution gradle plugin dependency in test app
- remove ios app check force refresh token workaround, underlying bug fixed

feature release for them, so feature release for us
  • Loading branch information
mikehardy committed Sep 14, 2021
1 parent aa48ea7 commit ee79ab3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
18 changes: 8 additions & 10 deletions packages/app-check/e2e/appcheck.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,15 @@ describe('appCheck()', function () {
}

// Force refresh should get a different token?
// TODO iOS tokens are stale because of https://github.com/firebase/firebase-ios-sdk/issues/8544
if (device.getPlatform() === 'android') {
const token2 = await firebase.appCheck().getToken(true);
token2.should.not.equal('');
const decodedToken2 = jwt.decode(token2);
decodedToken2.aud[1].should.equal('projects/react-native-firebase-testing');
if (decodedToken2.exp < Date.now()) {
Promise.reject('Token already expired');
}
(token === token2).should.be.false();
// TODO sometimes fails on android https://github.com/firebase/firebase-android-sdk/issues/2954
const token2 = await firebase.appCheck().getToken(true);
token2.should.not.equal('');
const decodedToken2 = jwt.decode(token2);
decodedToken2.aud[1].should.equal('projects/react-native-firebase-testing');
if (decodedToken2.exp < Date.now()) {
Promise.reject('Token already expired');
}
(token === token2).should.be.false();
});
});
describe('activate())', function () {
Expand Down
3 changes: 1 addition & 2 deletions packages/app-check/ios/RNFBAppCheck/RNFBAppCheckModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ - (dispatch_queue_t)methodQueue {
: (RCTPromiseResolveBlock)resolve
: (RCTPromiseRejectBlock)reject) {
FIRAppCheck *appCheck = [FIRAppCheck appCheckWithApp:firebaseApp];
[appCheck tokenForcingRefresh:NO // TODO Cannot use forceRefresh argument, if we send 'YES' in
// https://github.com/firebase/firebase-ios-sdk/issues/8544
[appCheck tokenForcingRefresh:forceRefresh
completion:^(FIRAppCheckToken *_Nullable token, NSError *_Nullable error) {
if (error != nil) {
// Handle any errors if the token was not retrieved.
Expand Down
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@
},
"sdkVersions": {
"ios": {
"firebase": "8.6.0"
"firebase": "8.7.0"
},
"android": {
"minSdk": 16,
"targetSdk": 30,
"compileSdk": 30,
"buildTools": "30.0.2",
"firebase": "28.3.1",
"firebase": "28.4.1",
"firebaseCrashlyticsGradle": "2.7.1",
"firebasePerfGradle": "1.4.0",
"gmsGoogleServicesGradle": "4.3.10",
Expand Down
3 changes: 2 additions & 1 deletion tests/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.firebase.appdistribution'

import com.android.build.OutputFile

Expand Down Expand Up @@ -39,7 +40,7 @@ def useIntlJsc = false
/**
* Architectures to build native code for in debug.
*/
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
def nativeArchitectures = project.getProperties().get('reactNativeDebugArchitectures')

android {
ndkVersion rootProject.ext.ndkVersion
Expand Down
1 change: 1 addition & 0 deletions tests/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.google.firebase:perf-plugin:1.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath 'com.google.firebase:firebase-appdistribution-gradle:2.2.0'
}
}

Expand Down

0 comments on commit ee79ab3

Please sign in to comment.