@react-native-firebase/app 14.8.0 → 14.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java +1 -1
- package/ios/RNFBApp/RNFBVersion.m +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/plugin/build/ios/appDelegate.d.ts +2 -0
- package/plugin/build/ios/appDelegate.js +14 -10
- package/plugin/src/ios/appDelegate.ts +14 -11
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [14.8.1](https://github.com/invertase/react-native-firebase/compare/v14.8.0...v14.8.1) (2022-04-25)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **app, expo:** Support RN 0.68 Obj-C++ AppDelegate ([#6213](https://github.com/invertase/react-native-firebase/issues/6213)) ([6f2d7e1](https://github.com/invertase/react-native-firebase/commit/6f2d7e1608d04613b77461f9647802aa1058e6cc))
|
11
|
+
|
6
12
|
# [14.8.0](https://github.com/invertase/react-native-firebase/compare/v14.7.0...v14.8.0) (2022-04-19)
|
7
13
|
|
8
14
|
### Features
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// generated by genversion
|
2
|
-
module.exports = '14.8.
|
2
|
+
module.exports = '14.8.1';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/app",
|
3
|
-
"version": "14.8.
|
3
|
+
"version": "14.8.1",
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
5
5
|
"description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Storage and more.",
|
6
6
|
"main": "lib/index.js",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"react-native": "*"
|
57
57
|
},
|
58
58
|
"dependencies": {
|
59
|
-
"@expo/config-plugins": "^4.
|
59
|
+
"@expo/config-plugins": "^4.1.1",
|
60
60
|
"opencollective-postinstall": "^2.0.1",
|
61
61
|
"superstruct": "^0.6.2"
|
62
62
|
},
|
@@ -79,5 +79,5 @@
|
|
79
79
|
"playServicesAuth": "20.1.0"
|
80
80
|
}
|
81
81
|
},
|
82
|
-
"gitHead": "
|
82
|
+
"gitHead": "c5975dfc18806965f0f603f20ed8fd5f037c4dbe"
|
83
83
|
}
|
@@ -1,3 +1,5 @@
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
2
|
+
import { AppDelegateProjectFile } from '@expo/config-plugins/build/ios/Paths';
|
2
3
|
export declare function modifyObjcAppDelegate(contents: string): string;
|
4
|
+
export declare function modifyAppDelegateAsync(appDelegateFileInfo: AppDelegateProjectFile): Promise<void>;
|
3
5
|
export declare const withFirebaseAppDelegate: ConfigPlugin;
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.withFirebaseAppDelegate = exports.modifyObjcAppDelegate = void 0;
|
6
|
+
exports.withFirebaseAppDelegate = exports.modifyAppDelegateAsync = exports.modifyObjcAppDelegate = void 0;
|
7
7
|
const config_plugins_1 = require("@expo/config-plugins");
|
8
8
|
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
@@ -57,20 +57,24 @@ function modifyObjcAppDelegate(contents) {
|
|
57
57
|
}
|
58
58
|
}
|
59
59
|
exports.modifyObjcAppDelegate = modifyObjcAppDelegate;
|
60
|
+
async function modifyAppDelegateAsync(appDelegateFileInfo) {
|
61
|
+
const { language, path, contents } = appDelegateFileInfo;
|
62
|
+
if (['objc', 'objcpp'].includes(language)) {
|
63
|
+
const newContents = modifyObjcAppDelegate(contents);
|
64
|
+
await fs_1.default.promises.writeFile(path, newContents);
|
65
|
+
}
|
66
|
+
else {
|
67
|
+
// TODO: Support Swift
|
68
|
+
throw new Error(`Cannot add Firebase code to AppDelegate of language "${language}"`);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
exports.modifyAppDelegateAsync = modifyAppDelegateAsync;
|
60
72
|
const withFirebaseAppDelegate = config => {
|
61
73
|
return (0, config_plugins_1.withDangerousMod)(config, [
|
62
74
|
'ios',
|
63
75
|
async (config) => {
|
64
76
|
const fileInfo = config_plugins_1.IOSConfig.Paths.getAppDelegate(config.modRequest.projectRoot);
|
65
|
-
|
66
|
-
if (fileInfo.language === 'objc') {
|
67
|
-
contents = modifyObjcAppDelegate(contents);
|
68
|
-
}
|
69
|
-
else {
|
70
|
-
// TODO: Support Swift
|
71
|
-
throw new Error(`Cannot add Firebase code to AppDelegate of language "${fileInfo.language}"`);
|
72
|
-
}
|
73
|
-
await fs_1.default.promises.writeFile(fileInfo.path, contents);
|
77
|
+
await modifyAppDelegateAsync(fileInfo);
|
74
78
|
return config;
|
75
79
|
},
|
76
80
|
]);
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ConfigPlugin, IOSConfig, WarningAggregator, withDangerousMod } from '@expo/config-plugins';
|
2
|
+
import { AppDelegateProjectFile } from '@expo/config-plugins/build/ios/Paths';
|
2
3
|
import { mergeContents } from '@expo/config-plugins/build/utils/generateCode';
|
3
4
|
import fs from 'fs';
|
4
5
|
|
@@ -67,22 +68,24 @@ export function modifyObjcAppDelegate(contents: string): string {
|
|
67
68
|
}
|
68
69
|
}
|
69
70
|
|
71
|
+
export async function modifyAppDelegateAsync(appDelegateFileInfo: AppDelegateProjectFile) {
|
72
|
+
const { language, path, contents } = appDelegateFileInfo;
|
73
|
+
|
74
|
+
if (['objc', 'objcpp'].includes(language)) {
|
75
|
+
const newContents = modifyObjcAppDelegate(contents);
|
76
|
+
await fs.promises.writeFile(path, newContents);
|
77
|
+
} else {
|
78
|
+
// TODO: Support Swift
|
79
|
+
throw new Error(`Cannot add Firebase code to AppDelegate of language "${language}"`);
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
70
83
|
export const withFirebaseAppDelegate: ConfigPlugin = config => {
|
71
84
|
return withDangerousMod(config, [
|
72
85
|
'ios',
|
73
86
|
async config => {
|
74
87
|
const fileInfo = IOSConfig.Paths.getAppDelegate(config.modRequest.projectRoot);
|
75
|
-
|
76
|
-
if (fileInfo.language === 'objc') {
|
77
|
-
contents = modifyObjcAppDelegate(contents);
|
78
|
-
} else {
|
79
|
-
// TODO: Support Swift
|
80
|
-
throw new Error(
|
81
|
-
`Cannot add Firebase code to AppDelegate of language "${fileInfo.language}"`,
|
82
|
-
);
|
83
|
-
}
|
84
|
-
await fs.promises.writeFile(fileInfo.path, contents);
|
85
|
-
|
88
|
+
await modifyAppDelegateAsync(fileInfo);
|
86
89
|
return config;
|
87
90
|
},
|
88
91
|
]);
|