@react-native-firebase/installations 25.0.1 → 26.0.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 +19 -0
- package/README.md +5 -6
- package/RNFBInstallations.podspec +7 -6
- package/android/build.gradle +19 -0
- package/android/src/main/java/io/invertase/firebase/installations/{ReactNativeFirebaseInstallationsModule.java → NativeRNFBTurboInstallations.java} +34 -28
- package/android/src/main/java/io/invertase/firebase/installations/ReactNativeFirebaseInstallationsPackage.java +1 -1
- package/android/src/main/java/io/invertase/firebase/installations/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboInstallationsSpec.java +46 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/CMakeLists.txt +36 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/RNFBInstallationsTurboModules-generated.cpp +44 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/RNFBInstallationsTurboModules.h +31 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/react/renderer/components/RNFBInstallationsTurboModules/RNFBInstallationsTurboModulesJSI-generated.cpp +42 -0
- package/android/src/main/java/io/invertase/firebase/installations/generated/jni/react/renderer/components/RNFBInstallationsTurboModules/RNFBInstallationsTurboModulesJSI.h +89 -0
- package/dist/module/index.js +81 -6
- package/dist/module/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/index.d.ts +35 -5
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +8 -9
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/ios/RNFBInstallations/RNFBInstallationsModule.h +3 -3
- package/ios/RNFBInstallations/{RNFBInstallationsModule.m → RNFBInstallationsModule.mm} +24 -23
- package/ios/RNFBInstallations.xcodeproj/project.pbxproj +8 -8
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules-generated.mm +53 -0
- package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules.h +71 -0
- package/ios/generated/RNFBInstallationsTurboModulesJSI-generated.cpp +42 -0
- package/ios/generated/RNFBInstallationsTurboModulesJSI.h +89 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/index.ts +111 -8
- package/lib/types/internal.ts +10 -15
- package/lib/version.ts +1 -1
- package/package.json +22 -4
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboInstallations.ts +10 -0
- package/typedoc.json +1 -1
- package/dist/module/modular.js +0 -68
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -72
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -33
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -25
- package/dist/typescript/lib/modular.d.ts.map +0 -1
- package/dist/typescript/lib/namespaced.d.ts +0 -12
- package/dist/typescript/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/lib/types/namespaced.d.ts +0 -77
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/lib/modular.ts +0 -80
- package/lib/namespaced.ts +0 -100
- package/lib/types/namespaced.ts +0 -112
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import './types/internal';
|
|
2
|
+
import type { FirebaseApp } from '@react-native-firebase/app';
|
|
3
|
+
import type { IdChangeCallbackFn, IdChangeUnsubscribeFn, Installations } from './types/installations';
|
|
4
|
+
/**
|
|
5
|
+
* RN Firebase package version string exported from the modular entry point.
|
|
6
|
+
*
|
|
7
|
+
* The firebase-js-sdk does not export `SDK_VERSION` from `@firebase/installations`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SDK_VERSION = "26.0.0";
|
|
10
|
+
/**
|
|
11
|
+
* Returns the {@link Installations} instance for the default or given {@link FirebaseApp}.
|
|
12
|
+
*
|
|
13
|
+
* @param app - The Firebase `FirebaseApp` to use. When omitted, the default app is used.
|
|
14
|
+
* @returns The Installations service instance for that app.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getInstallations(app?: FirebaseApp): Installations;
|
|
17
|
+
/**
|
|
18
|
+
* Deletes the Firebase Installation and all associated data.
|
|
19
|
+
*/
|
|
20
|
+
export declare function deleteInstallations(installations: Installations): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getId(installations: Installations): Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Returns a Firebase Installations auth token, identifying the current Firebase Installation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Throw an error since react-native-firebase does not support this method.
|
|
31
|
+
*
|
|
32
|
+
* Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.
|
|
33
|
+
*/
|
|
34
|
+
export declare function onIdChange(_installations: Installations, _callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
|
|
35
|
+
export type { IdChangeCallbackFn, IdChangeUnsubscribeFn, Installations, } from './types/installations';
|
|
6
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAuBA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACd,MAAM,uBAAuB,CAAC;AA0C/B;;;;GAIG;AACH,eAAO,MAAM,WAAW,WAAU,CAAC;AAEnC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,aAAa,CAMjE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/E;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,cAAc,EAAE,aAAa,EAC7B,SAAS,EAAE,kBAAkB,GAC5B,qBAAqB,CAEvB;AAED,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,GACd,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import type { Installations } from './installations';
|
|
2
|
-
/** Optional final argument passed by modular API wrappers (MODULAR_DEPRECATION_ARG). */
|
|
3
|
-
export type InstallationsModularDeprecationArg = string;
|
|
4
|
-
export interface InstallationsInternal extends Installations {
|
|
5
|
-
delete(deprecationArg?: InstallationsModularDeprecationArg): Promise<void>;
|
|
6
|
-
getId(deprecationArg?: InstallationsModularDeprecationArg): Promise<string>;
|
|
7
|
-
getToken(forceRefresh?: boolean, deprecationArg?: InstallationsModularDeprecationArg): Promise<string>;
|
|
8
|
-
}
|
|
9
2
|
export interface RNFBInstallationsModule {
|
|
10
3
|
getId(): Promise<string>;
|
|
11
4
|
getToken(forceRefresh: boolean): Promise<string>;
|
|
12
|
-
|
|
5
|
+
deleteInstallations(): Promise<void>;
|
|
13
6
|
}
|
|
14
7
|
declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
|
|
15
8
|
interface ReactNativeFirebaseNativeModules {
|
|
16
|
-
|
|
9
|
+
NativeRNFBTurboInstallations: RNFBInstallationsModule;
|
|
17
10
|
}
|
|
18
11
|
}
|
|
12
|
+
export interface InstallationsInternal extends Installations {
|
|
13
|
+
getId(): Promise<string>;
|
|
14
|
+
getToken(forceRefresh?: boolean): Promise<string>;
|
|
15
|
+
delete(): Promise<void>;
|
|
16
|
+
readonly native: RNFBInstallationsModule;
|
|
17
|
+
}
|
|
19
18
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../lib/types/internal.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../lib/types/internal.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED,OAAO,QAAQ,+DAA+D,CAAC;IAC7E,UAAU,gCAAgC;QACxC,4BAA4B,EAAE,uBAAuB,CAAC;KACvD;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;CAC1C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "26.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
#import <Foundation/Foundation.h>
|
|
19
|
+
#import <React/RCTInvalidating.h>
|
|
20
|
+
#import "RNFBInstallationsTurboModules.h"
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@interface RNFBInstallationsModule : NSObject <RCTBridgeModule>
|
|
22
|
+
@interface RNFBInstallationsModule : NSObject <NativeRNFBTurboInstallationsSpec, RCTInvalidating>
|
|
23
23
|
|
|
24
24
|
@end
|
|
@@ -18,32 +18,35 @@
|
|
|
18
18
|
#import <Firebase/Firebase.h>
|
|
19
19
|
#import <React/RCTUtils.h>
|
|
20
20
|
|
|
21
|
+
#import "RNFBApp/RCTConvert+FIRApp.h"
|
|
21
22
|
#import "RNFBApp/RNFBSharedUtils.h"
|
|
22
23
|
#import "RNFBInstallationsModule.h"
|
|
23
24
|
|
|
24
25
|
#import "FirebaseInstallations/FIRInstallations.h"
|
|
25
26
|
|
|
26
27
|
@implementation RNFBInstallationsModule
|
|
27
|
-
#pragma mark -
|
|
28
|
-
#pragma mark Module Setup
|
|
29
28
|
|
|
30
|
-
RCT_EXPORT_MODULE()
|
|
29
|
+
RCT_EXPORT_MODULE(NativeRNFBTurboInstallations)
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
return
|
|
31
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
32
|
+
return NO;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
36
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
37
|
+
return std::make_shared<facebook::react::NativeRNFBTurboInstallationsSpecJSI>(params);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
- (void)invalidate {
|
|
41
|
+
}
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
- (void)deleteInstallations:(NSString *)appName
|
|
44
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
45
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
46
|
+
FIRApp *firebaseApp = [RCTConvert firAppFromString:appName];
|
|
43
47
|
FIRInstallations *installations = [FIRInstallations installationsWithApp:firebaseApp];
|
|
44
48
|
[installations deleteWithCompletion:^(NSError *_Nullable error) {
|
|
45
49
|
if (error != nil) {
|
|
46
|
-
// Handle any errors if the delete failed
|
|
47
50
|
DLog(@"Unable to delete Installations ID: %@", error);
|
|
48
51
|
[RNFBSharedUtils rejectPromiseWithUserInfo:reject
|
|
49
52
|
userInfo:(NSMutableDictionary *)@{
|
|
@@ -57,14 +60,13 @@ RCT_EXPORT_METHOD(delete
|
|
|
57
60
|
}];
|
|
58
61
|
}
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
- (void)getId:(NSString *)appName
|
|
64
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
65
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
66
|
+
FIRApp *firebaseApp = [RCTConvert firAppFromString:appName];
|
|
64
67
|
FIRInstallations *installations = [FIRInstallations installationsWithApp:firebaseApp];
|
|
65
68
|
[installations installationIDWithCompletion:^(NSString *_Nullable id, NSError *_Nullable error) {
|
|
66
69
|
if (error != nil) {
|
|
67
|
-
// Handle any errors if the id was not retrieved.
|
|
68
70
|
DLog(@"Unable to retrieve Installations ID: %@", error);
|
|
69
71
|
[RNFBSharedUtils rejectPromiseWithUserInfo:reject
|
|
70
72
|
userInfo:(NSMutableDictionary *)@{
|
|
@@ -87,17 +89,16 @@ RCT_EXPORT_METHOD(getId
|
|
|
87
89
|
}];
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
- (void)getToken:(NSString *)appName
|
|
93
|
+
forceRefresh:(BOOL)forceRefresh
|
|
94
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
95
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
96
|
+
FIRApp *firebaseApp = [RCTConvert firAppFromString:appName];
|
|
95
97
|
FIRInstallations *installations = [FIRInstallations installationsWithApp:firebaseApp];
|
|
96
98
|
[installations authTokenForcingRefresh:forceRefresh
|
|
97
99
|
completion:^(FIRInstallationsAuthTokenResult *_Nullable token,
|
|
98
100
|
NSError *_Nullable error) {
|
|
99
101
|
if (error != nil) {
|
|
100
|
-
// Handle any errors if the token was not retrieved.
|
|
101
102
|
DLog(@"Unable to retrieve Installations auth token: %@", error);
|
|
102
103
|
[RNFBSharedUtils
|
|
103
104
|
rejectPromiseWithUserInfo:reject
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
2744B98621F45429004F8E3F /* RNFBInstallationsModule.
|
|
10
|
+
2744B98621F45429004F8E3F /* RNFBInstallationsModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBInstallationsModule.mm */; };
|
|
11
11
|
/* End PBXBuildFile section */
|
|
12
12
|
|
|
13
13
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
/* Begin PBXFileReference section */
|
|
26
26
|
2744B98221F45429004F8E3F /* libRNFBInstallations.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBInstallations.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
27
27
|
2744B98421F45429004F8E3F /* RNFBInstallationsModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBInstallationsModule.h; path = RNFBInstallations/RNFBInstallationsModule.h; sourceTree = SOURCE_ROOT; };
|
|
28
|
-
2744B98521F45429004F8E3F /* RNFBInstallationsModule.
|
|
28
|
+
2744B98521F45429004F8E3F /* RNFBInstallationsModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBInstallationsModule.mm; path = RNFBInstallations/RNFBInstallationsModule.mm; sourceTree = SOURCE_ROOT; };
|
|
29
29
|
/* End PBXFileReference section */
|
|
30
30
|
|
|
31
31
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
2744B9A121F48736004F8E3F /* converters */,
|
|
54
54
|
2744B98C21F45C64004F8E3F /* common */,
|
|
55
55
|
2744B98421F45429004F8E3F /* RNFBInstallationsModule.h */,
|
|
56
|
-
2744B98521F45429004F8E3F /* RNFBInstallationsModule.
|
|
56
|
+
2744B98521F45429004F8E3F /* RNFBInstallationsModule.mm */,
|
|
57
57
|
);
|
|
58
58
|
path = RNFBInstallations;
|
|
59
59
|
sourceTree = "<group>";
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
isa = PBXSourcesBuildPhase;
|
|
125
125
|
buildActionMask = 2147483647;
|
|
126
126
|
files = (
|
|
127
|
-
2744B98621F45429004F8E3F /* RNFBInstallationsModule.
|
|
127
|
+
2744B98621F45429004F8E3F /* RNFBInstallationsModule.mm in Sources */,
|
|
128
128
|
);
|
|
129
129
|
runOnlyForDeploymentPostprocessing = 0;
|
|
130
130
|
};
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
);
|
|
160
160
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
161
161
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
162
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
162
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
163
163
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
|
164
164
|
MTL_FAST_MATH = YES;
|
|
165
165
|
OTHER_LDFLAGS = "-ObjC";
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
194
194
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
195
195
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
196
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
196
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
197
197
|
MTL_ENABLE_DEBUG_INFO = NO;
|
|
198
198
|
MTL_FAST_MATH = YES;
|
|
199
199
|
OTHER_LDFLAGS = "-ObjC";
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
|
|
255
255
|
"$(SRCROOT)/../../../packages/app/ios/**",
|
|
256
256
|
);
|
|
257
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
257
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
258
258
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
259
259
|
MACH_O_TYPE = staticlib;
|
|
260
260
|
OTHER_LDFLAGS = "$(inherited)";
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
"$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
|
|
313
313
|
"$(SRCROOT)/../../../packages/app/ios/**",
|
|
314
314
|
);
|
|
315
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
315
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
316
316
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
317
317
|
MACH_O_TYPE = staticlib;
|
|
318
318
|
ONLY_ACTIVE_ARCH = YES;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
|
|
12
|
+
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
|
|
13
|
+
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
14
|
+
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
|
|
15
|
+
#else
|
|
16
|
+
#import "RCTDependencyProvider.h"
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,55 @@
|
|
|
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 "RCTAppDependencyProvider.h"
|
|
9
|
+
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
|
|
10
|
+
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
|
|
11
|
+
|
|
12
|
+
@implementation RCTAppDependencyProvider {
|
|
13
|
+
NSArray<NSString *> * _URLRequestHandlerClassNames;
|
|
14
|
+
NSArray<NSString *> * _imageDataDecoderClassNames;
|
|
15
|
+
NSArray<NSString *> * _imageURLLoaderClassNames;
|
|
16
|
+
NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
|
|
20
|
+
static dispatch_once_t requestUrlToken;
|
|
21
|
+
dispatch_once(&requestUrlToken, ^{
|
|
22
|
+
self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return _URLRequestHandlerClassNames;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
|
|
29
|
+
static dispatch_once_t dataDecoderToken;
|
|
30
|
+
dispatch_once(&dataDecoderToken, ^{
|
|
31
|
+
_imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return _imageDataDecoderClassNames;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
|
|
38
|
+
static dispatch_once_t urlLoaderToken;
|
|
39
|
+
dispatch_once(&urlLoaderToken, ^{
|
|
40
|
+
_imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return _imageURLLoaderClassNames;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
|
|
47
|
+
static dispatch_once_t nativeComponentsToken;
|
|
48
|
+
dispatch_once(&nativeComponentsToken, ^{
|
|
49
|
+
_thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return _thirdPartyFabricComponents;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
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 RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
+
|
|
14
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
+
|
|
16
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
+
|
|
18
|
+
@end
|
|
@@ -0,0 +1,33 @@
|
|
|
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 "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
+
|
|
10
|
+
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
+
{
|
|
14
|
+
return @[
|
|
15
|
+
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
20
|
+
{
|
|
21
|
+
return @[
|
|
22
|
+
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
27
|
+
{
|
|
28
|
+
return @[
|
|
29
|
+
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,16 @@
|
|
|
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 RCTComponentViewProtocol;
|
|
11
|
+
|
|
12
|
+
@interface RCTThirdPartyComponentsProvider: NSObject
|
|
13
|
+
|
|
14
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
|
|
15
|
+
|
|
16
|
+
@end
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import "RCTThirdPartyComponentsProvider.h"
|
|
12
|
+
#import <React/RCTComponentViewProtocol.h>
|
|
13
|
+
|
|
14
|
+
@implementation RCTThirdPartyComponentsProvider
|
|
15
|
+
|
|
16
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
17
|
+
{
|
|
18
|
+
return @{
|
|
19
|
+
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@end
|
package/ios/generated/RNFBInstallationsTurboModules/RNFBInstallationsTurboModules-generated.mm
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
+
*
|
|
9
|
+
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
+
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#import "RNFBInstallationsTurboModules.h"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@implementation NativeRNFBTurboInstallationsSpecBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
+
{
|
|
22
|
+
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
+
}
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
namespace facebook::react {
|
|
28
|
+
|
|
29
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboInstallationsSpecJSI_deleteInstallations(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
30
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "deleteInstallations", @selector(deleteInstallations:resolve:reject:), args, count);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboInstallationsSpecJSI_getId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
34
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getId", @selector(getId:resolve:reject:), args, count);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboInstallationsSpecJSI_getToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
38
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getToken", @selector(getToken:forceRefresh:resolve:reject:), args, count);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
NativeRNFBTurboInstallationsSpecJSI::NativeRNFBTurboInstallationsSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
42
|
+
: ObjCTurboModule(params) {
|
|
43
|
+
|
|
44
|
+
methodMap_["deleteInstallations"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboInstallationsSpecJSI_deleteInstallations};
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
methodMap_["getId"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboInstallationsSpecJSI_getId};
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
methodMap_["getToken"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboInstallationsSpecJSI_getToken};
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
+
*
|
|
9
|
+
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
+
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#ifndef __cplusplus
|
|
15
|
+
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
// Avoid multiple includes of RNFBInstallationsTurboModules symbols
|
|
19
|
+
#ifndef RNFBInstallationsTurboModules_H
|
|
20
|
+
#define RNFBInstallationsTurboModules_H
|
|
21
|
+
|
|
22
|
+
#import <Foundation/Foundation.h>
|
|
23
|
+
#import <RCTRequired/RCTRequired.h>
|
|
24
|
+
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
|
25
|
+
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
|
26
|
+
#import <React/RCTBridgeModule.h>
|
|
27
|
+
#import <React/RCTCxxConvert.h>
|
|
28
|
+
#import <React/RCTManagedPointer.h>
|
|
29
|
+
#import <ReactCommon/RCTTurboModule.h>
|
|
30
|
+
#import <optional>
|
|
31
|
+
#import <vector>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
35
|
+
|
|
36
|
+
@protocol NativeRNFBTurboInstallationsSpec <RCTBridgeModule, RCTTurboModule>
|
|
37
|
+
|
|
38
|
+
- (void)deleteInstallations:(NSString *)appName
|
|
39
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
40
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
41
|
+
- (void)getId:(NSString *)appName
|
|
42
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
43
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
44
|
+
- (void)getToken:(NSString *)appName
|
|
45
|
+
forceRefresh:(BOOL)forceRefresh
|
|
46
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
47
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
48
|
+
|
|
49
|
+
@end
|
|
50
|
+
|
|
51
|
+
@interface NativeRNFBTurboInstallationsSpecBase : NSObject {
|
|
52
|
+
@protected
|
|
53
|
+
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
54
|
+
}
|
|
55
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@end
|
|
59
|
+
|
|
60
|
+
namespace facebook::react {
|
|
61
|
+
/**
|
|
62
|
+
* ObjC++ class for module 'NativeRNFBTurboInstallations'
|
|
63
|
+
*/
|
|
64
|
+
class JSI_EXPORT NativeRNFBTurboInstallationsSpecJSI : public ObjCTurboModule {
|
|
65
|
+
public:
|
|
66
|
+
NativeRNFBTurboInstallationsSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
67
|
+
};
|
|
68
|
+
} // namespace facebook::react
|
|
69
|
+
|
|
70
|
+
NS_ASSUME_NONNULL_END
|
|
71
|
+
#endif // RNFBInstallationsTurboModules_H
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "RNFBInstallationsTurboModulesJSI.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
static jsi::Value __hostFunction_NativeRNFBTurboInstallationsCxxSpecJSI_deleteInstallations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
+
return static_cast<NativeRNFBTurboInstallationsCxxSpecJSI *>(&turboModule)->deleteInstallations(
|
|
16
|
+
rt,
|
|
17
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
static jsi::Value __hostFunction_NativeRNFBTurboInstallationsCxxSpecJSI_getId(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
21
|
+
return static_cast<NativeRNFBTurboInstallationsCxxSpecJSI *>(&turboModule)->getId(
|
|
22
|
+
rt,
|
|
23
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
static jsi::Value __hostFunction_NativeRNFBTurboInstallationsCxxSpecJSI_getToken(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
27
|
+
return static_cast<NativeRNFBTurboInstallationsCxxSpecJSI *>(&turboModule)->getToken(
|
|
28
|
+
rt,
|
|
29
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
30
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool()
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
NativeRNFBTurboInstallationsCxxSpecJSI::NativeRNFBTurboInstallationsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
35
|
+
: TurboModule("NativeRNFBTurboInstallations", jsInvoker) {
|
|
36
|
+
methodMap_["deleteInstallations"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboInstallationsCxxSpecJSI_deleteInstallations};
|
|
37
|
+
methodMap_["getId"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboInstallationsCxxSpecJSI_getId};
|
|
38
|
+
methodMap_["getToken"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboInstallationsCxxSpecJSI_getToken};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
} // namespace facebook::react
|