@react-native-firebase/app 26.0.0 → 26.2.0
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 +25 -0
- package/README.md +35 -0
- package/RNFBApp.podspec +13 -2
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java +1 -1
- package/dist/module/internal/web/RNFBAppModule.js +16 -3
- package/dist/module/internal/web/RNFBAppModule.js.map +1 -1
- package/dist/module/internal/web/utils.js +6 -1
- package/dist/module/internal/web/utils.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/internal/web/RNFBAppModule.d.ts.map +1 -1
- package/dist/typescript/lib/internal/web/utils.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/firebase_json.rb +11 -10
- package/firebase_spm.rb +1092 -0
- package/ios/RNFBApp/RCTConvert+FIRApp.h +4 -0
- package/ios/RNFBApp/RCTConvert+FIROptions.h +4 -0
- package/ios/RNFBApp/RNFBAppModule.mm +6 -0
- package/ios/RNFBApp/RNFBSharedUtils.h +4 -0
- package/ios/RNFBApp/RNFBVersion.m +1 -1
- package/lib/internal/web/RNFBAppModule.ts +16 -3
- package/lib/internal/web/utils.ts +6 -1
- package/lib/version.ts +1 -1
- package/package.json +9 -8
- package/plugin/build/index.d.ts +2 -1
- package/plugin/build/index.js +2 -1
- package/plugin/build/ios/index.d.ts +2 -1
- package/plugin/build/ios/index.js +3 -1
- package/plugin/build/ios/podfile.d.ts +4 -0
- package/plugin/build/ios/podfile.js +32 -0
- package/plugin/build/pluginConfig.d.ts +12 -0
- package/plugin/build/pluginConfig.js +2 -0
- package/plugin/src/index.ts +4 -2
- package/plugin/src/ios/index.ts +2 -1
- package/plugin/src/ios/podfile.ts +40 -0
- package/plugin/src/pluginConfig.ts +13 -0
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/ios/generated/RCTModuleProviders.h +0 -16
- package/ios/generated/RCTModuleProviders.mm +0 -52
- package/ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.h +0 -14
- package/ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.mm +0 -19
- package/ios/generated/ReactCodegen.podspec +0 -111
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
#if __has_include(<Firebase/Firebase.h>)
|
|
18
19
|
#import <Firebase/Firebase.h>
|
|
20
|
+
#elif __has_include(<FirebaseCore/FirebaseCore.h>)
|
|
21
|
+
#import <FirebaseCore/FirebaseCore.h>
|
|
22
|
+
#else
|
|
23
|
+
@import FirebaseCore;
|
|
24
|
+
#endif
|
|
19
25
|
#import <React/RCTInvalidating.h>
|
|
20
26
|
#import <React/RCTUtils.h>
|
|
21
27
|
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
#ifndef RNFBSharedUtils_h
|
|
19
19
|
#define RNFBSharedUtils_h
|
|
20
20
|
|
|
21
|
+
#if __has_include(<FirebaseCore/FirebaseCore.h>)
|
|
21
22
|
#import <FirebaseCore/FirebaseCore.h>
|
|
23
|
+
#else
|
|
24
|
+
@import FirebaseCore;
|
|
25
|
+
#endif
|
|
22
26
|
#import <React/RCTBridgeModule.h>
|
|
23
27
|
|
|
24
28
|
#ifdef DEBUG
|
|
@@ -71,7 +71,12 @@ function eventsSendEvent(eventName: string, eventBody: any): void {
|
|
|
71
71
|
queuedEvents.push(event);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
const emit = () => DeviceEventEmitter.emit('rnfb_' + eventName, eventBody);
|
|
75
|
+
if (typeof setImmediate === 'function') {
|
|
76
|
+
setImmediate(emit);
|
|
77
|
+
} else {
|
|
78
|
+
setTimeout(emit, 0);
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
function eventsSendQueuedEvents(): void {
|
|
@@ -251,7 +256,11 @@ export default {
|
|
|
251
256
|
eventsNotifyReady(ready: boolean): void {
|
|
252
257
|
jsReady = ready;
|
|
253
258
|
if (jsReady) {
|
|
254
|
-
|
|
259
|
+
if (typeof setImmediate === 'function') {
|
|
260
|
+
setImmediate(() => eventsSendQueuedEvents());
|
|
261
|
+
} else {
|
|
262
|
+
setTimeout(() => eventsSendQueuedEvents(), 0);
|
|
263
|
+
}
|
|
255
264
|
}
|
|
256
265
|
},
|
|
257
266
|
|
|
@@ -289,7 +298,11 @@ export default {
|
|
|
289
298
|
jsListeners[eventName]++;
|
|
290
299
|
}
|
|
291
300
|
}
|
|
292
|
-
|
|
301
|
+
if (typeof setImmediate === 'function') {
|
|
302
|
+
setImmediate(() => eventsSendQueuedEvents());
|
|
303
|
+
} else {
|
|
304
|
+
setTimeout(() => eventsSendQueuedEvents(), 0);
|
|
305
|
+
}
|
|
293
306
|
},
|
|
294
307
|
|
|
295
308
|
/**
|
|
@@ -53,5 +53,10 @@ export function getWebError(error: Error & { code?: string }): {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export function emitEvent(eventName: string, event: unknown): void {
|
|
56
|
-
|
|
56
|
+
const emit = () => DeviceEventEmitter.emit('rnfb_' + eventName, event);
|
|
57
|
+
if (typeof setImmediate === 'function') {
|
|
58
|
+
setImmediate(emit);
|
|
59
|
+
} else {
|
|
60
|
+
setTimeout(emit, 0);
|
|
61
|
+
}
|
|
57
62
|
}
|
package/lib/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '26.
|
|
2
|
+
export const version = '26.2.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/app",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
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": "./dist/module/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"codegen": "yarn android:codegen && yarn ios:codegen",
|
|
25
|
-
"android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/reactnative/java/io/invertase/firebase/app/generated",
|
|
26
|
-
"ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated",
|
|
25
|
+
"android:codegen": "rimraf android/src/reactnative/java/io/invertase/firebase/app/generated && npx @react-native-community/cli codegen --platform android --outputPath=./android/src/reactnative/java/io/invertase/firebase/app/generated",
|
|
26
|
+
"ios:codegen": "rimraf ios/generated && npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated",
|
|
27
27
|
"build": "genversion --esm --semi lib/version.ts && npm run build:version",
|
|
28
28
|
"build:version": "node ./scripts/genversion-ios && node ./scripts/genversion-android",
|
|
29
29
|
"build:clean": "rimraf android/build && rimraf ios/build",
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
"react-native": "*"
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"firebase": "12.
|
|
115
|
+
"firebase": "12.17.0"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@react-native-async-storage/async-storage": "^
|
|
118
|
+
"@react-native-async-storage/async-storage": "^3.1.1",
|
|
119
119
|
"expo": "^55.0.18",
|
|
120
120
|
"react-native-builder-bob": "^0.41.0"
|
|
121
121
|
},
|
|
@@ -130,7 +130,8 @@
|
|
|
130
130
|
},
|
|
131
131
|
"sdkVersions": {
|
|
132
132
|
"ios": {
|
|
133
|
-
"firebase": "12.
|
|
133
|
+
"firebase": "12.17.0",
|
|
134
|
+
"firebaseSpmUrl": "https://github.com/firebase/firebase-ios-sdk.git",
|
|
134
135
|
"iosTarget": "15.0",
|
|
135
136
|
"macosTarget": "10.15",
|
|
136
137
|
"tvosTarget": "15.0"
|
|
@@ -139,7 +140,7 @@
|
|
|
139
140
|
"minSdk": 23,
|
|
140
141
|
"targetSdk": 34,
|
|
141
142
|
"compileSdk": 34,
|
|
142
|
-
"firebase": "34.
|
|
143
|
+
"firebase": "34.16.0",
|
|
143
144
|
"firebaseCrashlyticsGradle": "3.0.7",
|
|
144
145
|
"firebasePerfGradle": "2.0.2",
|
|
145
146
|
"gmsGoogleServicesGradle": "4.5.0",
|
|
@@ -183,5 +184,5 @@
|
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
186
|
},
|
|
186
|
-
"gitHead": "
|
|
187
|
+
"gitHead": "b7efa8ca2781b5102975ee5169ee6fc52e9c1588"
|
|
187
188
|
}
|
package/plugin/build/index.d.ts
CHANGED
package/plugin/build/index.js
CHANGED
|
@@ -6,11 +6,12 @@ const ios_1 = require("./ios");
|
|
|
6
6
|
/**
|
|
7
7
|
* A config plugin for configuring `@react-native-firebase/app`
|
|
8
8
|
*/
|
|
9
|
-
const withRnFirebaseApp = config => {
|
|
9
|
+
const withRnFirebaseApp = (config, props) => {
|
|
10
10
|
return (0, config_plugins_1.withPlugins)(config, [
|
|
11
11
|
// iOS
|
|
12
12
|
ios_1.withFirebaseAppDelegate,
|
|
13
13
|
ios_1.withIosGoogleServicesFile,
|
|
14
|
+
[ios_1.withIosDisableSPM, props],
|
|
14
15
|
// Android
|
|
15
16
|
android_1.withBuildscriptDependency,
|
|
16
17
|
android_1.withApplyGoogleServicesPlugin,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { withFirebaseAppDelegate } from './appDelegate';
|
|
2
2
|
import { withIosGoogleServicesFile } from './googleServicesPlist';
|
|
3
|
-
|
|
3
|
+
import { withIosDisableSPM } from './podfile';
|
|
4
|
+
export { withIosGoogleServicesFile, withFirebaseAppDelegate, withIosDisableSPM };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withFirebaseAppDelegate = exports.withIosGoogleServicesFile = void 0;
|
|
3
|
+
exports.withIosDisableSPM = exports.withFirebaseAppDelegate = exports.withIosGoogleServicesFile = void 0;
|
|
4
4
|
const appDelegate_1 = require("./appDelegate");
|
|
5
5
|
Object.defineProperty(exports, "withFirebaseAppDelegate", { enumerable: true, get: function () { return appDelegate_1.withFirebaseAppDelegate; } });
|
|
6
6
|
const googleServicesPlist_1 = require("./googleServicesPlist");
|
|
7
7
|
Object.defineProperty(exports, "withIosGoogleServicesFile", { enumerable: true, get: function () { return googleServicesPlist_1.withIosGoogleServicesFile; } });
|
|
8
|
+
const podfile_1 = require("./podfile");
|
|
9
|
+
Object.defineProperty(exports, "withIosDisableSPM", { enumerable: true, get: function () { return podfile_1.withIosDisableSPM; } });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withIosDisableSPM = void 0;
|
|
4
|
+
exports.setAppPodfileDisableSPM = setAppPodfileDisableSPM;
|
|
5
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
|
+
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
7
|
+
const TAG = '@react-native-firebase/app-disableSPM';
|
|
8
|
+
const ANCHOR = /prepare_react_native_project!/;
|
|
9
|
+
const FLAG = '$RNFirebaseDisableSPM = true';
|
|
10
|
+
// The flag must be defined before any target block so firebase_spm.rb sees it
|
|
11
|
+
// when pods are declared - anchoring just after `prepare_react_native_project!`
|
|
12
|
+
// guarantees that in the Podfile Expo generates.
|
|
13
|
+
function setAppPodfileDisableSPM(src, enabled = false) {
|
|
14
|
+
if (!enabled) {
|
|
15
|
+
return (0, generateCode_1.removeGeneratedContents)(src, TAG) ?? src;
|
|
16
|
+
}
|
|
17
|
+
return (0, generateCode_1.mergeContents)({
|
|
18
|
+
src,
|
|
19
|
+
newSrc: FLAG,
|
|
20
|
+
tag: TAG,
|
|
21
|
+
anchor: ANCHOR,
|
|
22
|
+
offset: 1,
|
|
23
|
+
comment: '#',
|
|
24
|
+
}).contents;
|
|
25
|
+
}
|
|
26
|
+
const withIosDisableSPM = (config, props) => {
|
|
27
|
+
return (0, config_plugins_1.withPodfile)(config, config => {
|
|
28
|
+
config.modResults.contents = setAppPodfileDisableSPM(config.modResults.contents, props?.ios?.disableSPM === true);
|
|
29
|
+
return config;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
exports.withIosDisableSPM = withIosDisableSPM;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PluginConfigType {
|
|
2
|
+
ios?: PluginConfigTypeIos;
|
|
3
|
+
}
|
|
4
|
+
export interface PluginConfigTypeIos {
|
|
5
|
+
/**
|
|
6
|
+
* Sets `$RNFirebaseDisableSPM = true` in the Podfile, forcing Firebase
|
|
7
|
+
* dependencies to be installed with CocoaPods instead of Swift Package Manager.
|
|
8
|
+
*
|
|
9
|
+
* @platform ios iOS
|
|
10
|
+
*/
|
|
11
|
+
disableSPM?: boolean;
|
|
12
|
+
}
|
package/plugin/src/index.ts
CHANGED
|
@@ -5,16 +5,18 @@ import {
|
|
|
5
5
|
withBuildscriptDependency,
|
|
6
6
|
withCopyAndroidGoogleServices,
|
|
7
7
|
} from './android';
|
|
8
|
-
import { withFirebaseAppDelegate, withIosGoogleServicesFile } from './ios';
|
|
8
|
+
import { withFirebaseAppDelegate, withIosGoogleServicesFile, withIosDisableSPM } from './ios';
|
|
9
|
+
import { PluginConfigType } from './pluginConfig';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* A config plugin for configuring `@react-native-firebase/app`
|
|
12
13
|
*/
|
|
13
|
-
const withRnFirebaseApp: ConfigPlugin = config => {
|
|
14
|
+
const withRnFirebaseApp: ConfigPlugin<PluginConfigType> = (config, props) => {
|
|
14
15
|
return withPlugins(config, [
|
|
15
16
|
// iOS
|
|
16
17
|
withFirebaseAppDelegate,
|
|
17
18
|
withIosGoogleServicesFile,
|
|
19
|
+
[withIosDisableSPM, props],
|
|
18
20
|
|
|
19
21
|
// Android
|
|
20
22
|
withBuildscriptDependency,
|
package/plugin/src/ios/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { withFirebaseAppDelegate } from './appDelegate';
|
|
2
2
|
import { withIosGoogleServicesFile } from './googleServicesPlist';
|
|
3
|
+
import { withIosDisableSPM } from './podfile';
|
|
3
4
|
|
|
4
|
-
export { withIosGoogleServicesFile, withFirebaseAppDelegate };
|
|
5
|
+
export { withIosGoogleServicesFile, withFirebaseAppDelegate, withIosDisableSPM };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ConfigPlugin, withPodfile } from '@expo/config-plugins';
|
|
2
|
+
import {
|
|
3
|
+
mergeContents,
|
|
4
|
+
removeGeneratedContents,
|
|
5
|
+
} from '@expo/config-plugins/build/utils/generateCode';
|
|
6
|
+
|
|
7
|
+
import { PluginConfigType } from '../pluginConfig';
|
|
8
|
+
|
|
9
|
+
const TAG = '@react-native-firebase/app-disableSPM';
|
|
10
|
+
const ANCHOR = /prepare_react_native_project!/;
|
|
11
|
+
const FLAG = '$RNFirebaseDisableSPM = true';
|
|
12
|
+
|
|
13
|
+
// The flag must be defined before any target block so firebase_spm.rb sees it
|
|
14
|
+
// when pods are declared - anchoring just after `prepare_react_native_project!`
|
|
15
|
+
// guarantees that in the Podfile Expo generates.
|
|
16
|
+
export function setAppPodfileDisableSPM(src: string, enabled: boolean = false): string {
|
|
17
|
+
if (!enabled) {
|
|
18
|
+
return removeGeneratedContents(src, TAG) ?? src;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return mergeContents({
|
|
22
|
+
src,
|
|
23
|
+
newSrc: FLAG,
|
|
24
|
+
tag: TAG,
|
|
25
|
+
anchor: ANCHOR,
|
|
26
|
+
offset: 1,
|
|
27
|
+
comment: '#',
|
|
28
|
+
}).contents;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const withIosDisableSPM: ConfigPlugin<PluginConfigType> = (config, props) => {
|
|
32
|
+
return withPodfile(config, config => {
|
|
33
|
+
config.modResults.contents = setAppPodfileDisableSPM(
|
|
34
|
+
config.modResults.contents,
|
|
35
|
+
props?.ios?.disableSPM === true,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
return config;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PluginConfigType {
|
|
2
|
+
ios?: PluginConfigTypeIos;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface PluginConfigTypeIos {
|
|
6
|
+
/**
|
|
7
|
+
* Sets `$RNFirebaseDisableSPM = true` in the Podfile, forcing Firebase
|
|
8
|
+
* dependencies to be installed with CocoaPods instead of Swift Package Manager.
|
|
9
|
+
*
|
|
10
|
+
* @platform ios iOS
|
|
11
|
+
*/
|
|
12
|
+
disableSPM?: boolean;
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/app.plugin.ts","./src/index.ts","./src/android/applyPlugin.ts","./src/android/buildscriptDependency.ts","./src/android/constants.ts","./src/android/copyGoogleServices.ts","./src/android/index.ts","./src/ios/appDelegate.ts","./src/ios/googleServicesPlist.ts","./src/ios/index.ts"],"version":"6.0.3"}
|
|
1
|
+
{"root":["./src/app.plugin.ts","./src/index.ts","./src/pluginConfig.ts","./src/android/applyPlugin.ts","./src/android/buildscriptDependency.ts","./src/android/constants.ts","./src/android/copyGoogleServices.ts","./src/android/index.ts","./src/ios/appDelegate.ts","./src/ios/googleServicesPlist.ts","./src/ios/index.ts","./src/ios/podfile.ts"],"version":"6.0.3"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@protocol RCTModuleProvider;
|
|
11
|
-
|
|
12
|
-
@interface RCTModuleProviders: NSObject
|
|
13
|
-
|
|
14
|
-
+ (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
|
|
15
|
-
|
|
16
|
-
@end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
#import "RCTModuleProviders.h"
|
|
11
|
-
#import <ReactCommon/RCTTurboModule.h>
|
|
12
|
-
#import <React/RCTLog.h>
|
|
13
|
-
|
|
14
|
-
@implementation RCTModuleProviders
|
|
15
|
-
|
|
16
|
-
+ (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
|
|
17
|
-
{
|
|
18
|
-
static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
|
|
19
|
-
static dispatch_once_t onceToken;
|
|
20
|
-
|
|
21
|
-
dispatch_once(&onceToken, ^{
|
|
22
|
-
NSDictionary<NSString *, NSString *> * moduleMapping = @{
|
|
23
|
-
@"NativeRNFBTurboApp": @"RNFBAppModule", // @react-native-firebase/app
|
|
24
|
-
@"NativeRNFBTurboUtils": @"RNFBUtilsModule", // @react-native-firebase/app
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
|
|
28
|
-
|
|
29
|
-
for (NSString *key in moduleMapping) {
|
|
30
|
-
NSString * moduleProviderName = moduleMapping[key];
|
|
31
|
-
Class klass = NSClassFromString(moduleProviderName);
|
|
32
|
-
if (!klass) {
|
|
33
|
-
RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
id instance = [klass new];
|
|
38
|
-
if (![instance respondsToSelector:@selector(getTurboModule:)]) {
|
|
39
|
-
RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[dict setObject:instance forKey:key];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
providers = dict;
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
return providers;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@end
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@interface RCTUnstableModulesRequiringMainQueueSetupProvider: NSObject
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)modules;
|
|
13
|
-
|
|
14
|
-
@end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTUnstableModulesRequiringMainQueueSetupProvider.h"
|
|
9
|
-
|
|
10
|
-
@implementation RCTUnstableModulesRequiringMainQueueSetupProvider
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)modules
|
|
13
|
-
{
|
|
14
|
-
return @[
|
|
15
|
-
|
|
16
|
-
];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@end
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
version = "0.82.1"
|
|
7
|
-
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
8
|
-
if version == '1000.0.0'
|
|
9
|
-
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
10
|
-
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
11
|
-
else
|
|
12
|
-
source[:tag] = "v#{version}"
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
use_frameworks = ENV['USE_FRAMEWORKS'] != nil
|
|
16
|
-
folly_compiler_flags = Helpers::Constants.folly_config[:compiler_flags]
|
|
17
|
-
boost_compiler_flags = Helpers::Constants.boost_config[:compiler_flags]
|
|
18
|
-
|
|
19
|
-
header_search_paths = []
|
|
20
|
-
framework_search_paths = []
|
|
21
|
-
|
|
22
|
-
header_search_paths = [
|
|
23
|
-
"\"$(PODS_ROOT)/ReactNativeDependencies\"",
|
|
24
|
-
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
|
|
25
|
-
"\"$(PODS_ROOT)/Headers/Private/React-Fabric\"",
|
|
26
|
-
"\"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"",
|
|
27
|
-
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
|
28
|
-
"\"$(PODS_TARGET_SRCROOT)\"",
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
if use_frameworks
|
|
32
|
-
ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"])
|
|
33
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-FabricImage", "React_FabricImage", []))
|
|
34
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-graphics", "React_graphics", ["react/renderer/graphics/platform/ios"]))
|
|
35
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"]))
|
|
36
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-runtimeexecutor", "React_runtimeexecutor", ["platform/ios"]))
|
|
37
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-NativeModulesApple", "React_NativeModulesApple", []))
|
|
38
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", []))
|
|
39
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-debug", "React_debug", []))
|
|
40
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-rendererdebug", "React_rendererdebug", []))
|
|
41
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-utils", "React_utils", []))
|
|
42
|
-
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-featureflags", "React_featureflags", []))
|
|
43
|
-
.each { |search_path|
|
|
44
|
-
header_search_paths << "\"#{search_path}\""
|
|
45
|
-
}
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
Pod::Spec.new do |s|
|
|
49
|
-
s.name = "ReactCodegen"
|
|
50
|
-
s.version = version
|
|
51
|
-
s.summary = 'Temp pod for generated files for React Native'
|
|
52
|
-
s.homepage = 'https://facebook.com/'
|
|
53
|
-
s.license = 'Unlicense'
|
|
54
|
-
s.authors = 'Facebook'
|
|
55
|
-
s.compiler_flags = "#{folly_compiler_flags} #{boost_compiler_flags} -Wno-nullability-completeness -std=c++20"
|
|
56
|
-
s.source = { :git => '' }
|
|
57
|
-
s.header_mappings_dir = './'
|
|
58
|
-
s.platforms = min_supported_versions
|
|
59
|
-
s.source_files = "**/*.{h,mm,cpp}"
|
|
60
|
-
s.exclude_files = "RCTAppDependencyProvider.{h,mm}" # these files are generated in the same codegen path but needs to belong to a different pod
|
|
61
|
-
s.pod_target_xcconfig = {
|
|
62
|
-
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
|
63
|
-
"FRAMEWORK_SEARCH_PATHS" => framework_search_paths,
|
|
64
|
-
"OTHER_CPLUSPLUSFLAGS" => "$(inherited) #{folly_compiler_flags} #{boost_compiler_flags}"
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
s.dependency "React-jsiexecutor"
|
|
68
|
-
s.dependency "RCTRequired"
|
|
69
|
-
s.dependency "RCTTypeSafety"
|
|
70
|
-
s.dependency "React-Core"
|
|
71
|
-
s.dependency "React-jsi"
|
|
72
|
-
s.dependency "ReactCommon/turbomodule/bridging"
|
|
73
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
74
|
-
s.dependency "React-NativeModulesApple"
|
|
75
|
-
s.dependency 'React-graphics'
|
|
76
|
-
s.dependency 'React-rendererdebug'
|
|
77
|
-
s.dependency 'React-Fabric'
|
|
78
|
-
s.dependency 'React-FabricImage'
|
|
79
|
-
s.dependency 'React-debug'
|
|
80
|
-
s.dependency 'React-utils'
|
|
81
|
-
s.dependency 'React-featureflags'
|
|
82
|
-
s.dependency 'React-RCTAppDelegate'
|
|
83
|
-
|
|
84
|
-
depend_on_js_engine(s)
|
|
85
|
-
add_rn_third_party_dependencies(s)
|
|
86
|
-
add_rncore_dependency(s)
|
|
87
|
-
|
|
88
|
-
s.script_phases = {
|
|
89
|
-
'name' => 'Generate Specs',
|
|
90
|
-
'execution_position' => :before_compile,
|
|
91
|
-
'input_files' => ["${PODS_ROOT}/../../specs/NativeRNFBTurboApp.ts",
|
|
92
|
-
"${PODS_ROOT}/../../specs/NativeRNFBTurboUtils.ts"],
|
|
93
|
-
'show_env_vars_in_log' => true,
|
|
94
|
-
'output_files' => ["${DERIVED_FILE_DIR}/react-codegen.log"],
|
|
95
|
-
'script': <<-SCRIPT
|
|
96
|
-
pushd "$PODS_ROOT/../" > /dev/null
|
|
97
|
-
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
|
|
98
|
-
popd >/dev/null
|
|
99
|
-
|
|
100
|
-
export RCT_SCRIPT_RN_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT/../../../../node_modules/react-native"
|
|
101
|
-
export RCT_SCRIPT_APP_PATH="$RCT_SCRIPT_POD_INSTALLATION_ROOT/../.."
|
|
102
|
-
export RCT_SCRIPT_OUTPUT_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT"
|
|
103
|
-
export RCT_SCRIPT_TYPE="withCodegenDiscovery"
|
|
104
|
-
|
|
105
|
-
export SCRIPT_PHASES_SCRIPT="$RCT_SCRIPT_RN_DIR/scripts/react_native_pods_utils/script_phases.sh"
|
|
106
|
-
export WITH_ENVIRONMENT="$RCT_SCRIPT_RN_DIR/scripts/xcode/with-environment.sh"
|
|
107
|
-
/bin/sh -c '"$WITH_ENVIRONMENT" "$SCRIPT_PHASES_SCRIPT"'
|
|
108
|
-
SCRIPT
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
end
|