@react-native-firebase/messaging 25.1.0 → 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 +29 -0
- package/RNFBMessaging.podspec +20 -6
- package/android/build.gradle +24 -0
- package/android/src/main/java/io/invertase/firebase/messaging/{ReactNativeFirebaseMessagingModule.java → NativeRNFBTurboMessaging.java} +143 -81
- package/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingPackage.java +1 -1
- package/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingReceiver.java +16 -0
- package/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingStoreImpl.java +50 -11
- package/android/src/main/java/io/invertase/firebase/messaging/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboMessagingSpec.java +151 -0
- package/android/src/main/java/io/invertase/firebase/messaging/generated/jni/CMakeLists.txt +36 -0
- package/android/src/main/java/io/invertase/firebase/messaging/generated/jni/RNFBMessagingTurboModules-generated.cpp +152 -0
- package/android/src/main/java/io/invertase/firebase/messaging/generated/jni/RNFBMessagingTurboModules.h +31 -0
- package/android/src/main/java/io/invertase/firebase/messaging/generated/jni/react/renderer/components/RNFBMessagingTurboModules/RNFBMessagingTurboModulesJSI-generated.cpp +161 -0
- package/android/src/main/java/io/invertase/firebase/messaging/generated/jni/react/renderer/components/RNFBMessagingTurboModules/RNFBMessagingTurboModulesJSI.h +356 -0
- package/app.plugin.js +1 -1
- package/dist/module/index.js +622 -7
- package/dist/module/index.js.map +1 -1
- package/dist/module/statics.js +1 -1
- package/dist/module/types/internal.js +4 -0
- package/dist/module/types/internal.js.map +1 -0
- package/dist/module/types/messaging.js +0 -15
- package/dist/module/types/messaging.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/index.d.ts +182 -5
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +41 -0
- package/dist/typescript/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/lib/types/messaging.d.ts +7 -55
- package/dist/typescript/lib/types/messaging.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/ios/RNFBMessaging/RNFBMessaging+AppDelegate.h +24 -2
- package/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m +82 -12
- package/ios/RNFBMessaging/RNFBMessaging+NSNotificationCenter.m +14 -4
- package/ios/RNFBMessaging/RNFBMessaging+UNUserNotificationCenter.m +31 -28
- package/ios/RNFBMessaging/RNFBMessagingModule.h +3 -2
- package/ios/RNFBMessaging/RNFBMessagingModule.mm +500 -0
- package/ios/RNFBMessaging.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/RNFBMessagingTurboModules/RNFBMessagingTurboModules-generated.mm +184 -0
- package/ios/generated/RNFBMessagingTurboModules/RNFBMessagingTurboModules.h +222 -0
- package/ios/generated/RNFBMessagingTurboModulesJSI-generated.cpp +161 -0
- package/ios/generated/RNFBMessagingTurboModulesJSI.h +356 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/index.ts +821 -15
- package/lib/statics.ts +1 -1
- package/lib/types/internal.ts +59 -0
- package/lib/types/messaging.ts +7 -72
- package/lib/version.ts +1 -1
- package/package.json +30 -5
- package/plugin/build/app.plugin.d.ts +2 -0
- package/plugin/build/app.plugin.js +6 -0
- package/plugin/src/app.plugin.ts +3 -0
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboMessaging.ts +46 -0
- package/typedoc.json +2 -19
- package/dist/module/modular.js +0 -396
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -415
- package/dist/module/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -255
- 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/ios/RNFBMessaging/RNFBMessagingModule.m +0 -439
- package/lib/modular.ts +0 -455
- package/lib/namespaced.ts +0 -593
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
2744B98621F45429004F8E3F /* RNFBMessagingModule.
|
|
10
|
+
2744B98621F45429004F8E3F /* RNFBMessagingModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBMessagingModule.mm */; };
|
|
11
11
|
27F24640242AA29F0098906C /* RNFBMessaging+UNUserNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F2463F242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.m */; };
|
|
12
12
|
27F24643242AA2EE0098906C /* RNFBMessaging+AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F24642242AA2EE0098906C /* RNFBMessaging+AppDelegate.m */; };
|
|
13
13
|
27F24646242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F24645242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m */; };
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
/* Begin PBXFileReference section */
|
|
32
32
|
2744B98221F45429004F8E3F /* libRNFBMessaging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBMessaging.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
33
33
|
2744B98421F45429004F8E3F /* RNFBMessagingModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBMessagingModule.h; path = RNFBMessaging/RNFBMessagingModule.h; sourceTree = SOURCE_ROOT; };
|
|
34
|
-
2744B98521F45429004F8E3F /* RNFBMessagingModule.
|
|
34
|
+
2744B98521F45429004F8E3F /* RNFBMessagingModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = RNFBMessagingModule.mm; path = RNFBMessaging/RNFBMessagingModule.mm; sourceTree = SOURCE_ROOT; };
|
|
35
35
|
27F2463E242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNFBMessaging+UNUserNotificationCenter.h"; sourceTree = "<group>"; };
|
|
36
36
|
27F2463F242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBMessaging+UNUserNotificationCenter.m"; sourceTree = "<group>"; };
|
|
37
37
|
27F24641242AA2EE0098906C /* RNFBMessaging+AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNFBMessaging+AppDelegate.h"; sourceTree = "<group>"; };
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
37D60F7324E647BF00E44930 /* RNFBMessaging+UNNotificationServiceExtension.m */,
|
|
72
72
|
37D60F7124E6465300E44930 /* RNFBMessaging+UNNotificationServiceExtension.h */,
|
|
73
73
|
2744B98421F45429004F8E3F /* RNFBMessagingModule.h */,
|
|
74
|
-
2744B98521F45429004F8E3F /* RNFBMessagingModule.
|
|
74
|
+
2744B98521F45429004F8E3F /* RNFBMessagingModule.mm */,
|
|
75
75
|
DA446E5022CA485C0066A0A3 /* RNFBMessagingSerializer.h */,
|
|
76
76
|
DA446E5122CA48690066A0A3 /* RNFBMessagingSerializer.m */,
|
|
77
77
|
27F2463E242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.h */,
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
isa = PBXSourcesBuildPhase;
|
|
154
154
|
buildActionMask = 2147483647;
|
|
155
155
|
files = (
|
|
156
|
-
2744B98621F45429004F8E3F /* RNFBMessagingModule.
|
|
156
|
+
2744B98621F45429004F8E3F /* RNFBMessagingModule.mm in Sources */,
|
|
157
157
|
27F24643242AA2EE0098906C /* RNFBMessaging+AppDelegate.m in Sources */,
|
|
158
158
|
37D60F7424E647BF00E44930 /* RNFBMessaging+UNNotificationServiceExtension.m in Sources */,
|
|
159
159
|
27F24640242AA29F0098906C /* RNFBMessaging+UNUserNotificationCenter.m in Sources */,
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
);
|
|
195
195
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
196
196
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
197
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
197
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
198
198
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
|
199
199
|
MTL_FAST_MATH = YES;
|
|
200
200
|
OTHER_LDFLAGS = "-ObjC";
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
229
229
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
230
230
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
231
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
231
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
232
232
|
MTL_ENABLE_DEBUG_INFO = NO;
|
|
233
233
|
MTL_FAST_MATH = YES;
|
|
234
234
|
OTHER_LDFLAGS = "-ObjC";
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
"$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
|
|
290
290
|
"$(SRCROOT)/../../../packages/app/ios/**",
|
|
291
291
|
);
|
|
292
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
292
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
293
293
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
294
294
|
MACH_O_TYPE = staticlib;
|
|
295
295
|
OTHER_LDFLAGS = "$(inherited)";
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
"$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
|
|
348
348
|
"$(SRCROOT)/../../../packages/app/ios/**",
|
|
349
349
|
);
|
|
350
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
350
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
|
351
351
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
352
352
|
MACH_O_TYPE = staticlib;
|
|
353
353
|
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
|
|
@@ -0,0 +1,184 @@
|
|
|
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 "RNFBMessagingTurboModules.h"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@implementation NativeRNFBTurboMessagingSpecBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
+
{
|
|
22
|
+
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
+
}
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@implementation RCTCxxConvert (NativeRNFBTurboMessaging_IOSPermissions)
|
|
27
|
+
+ (RCTManagedPointer *)JS_NativeRNFBTurboMessaging_IOSPermissions:(id)json
|
|
28
|
+
{
|
|
29
|
+
return facebook::react::managedPointer<JS::NativeRNFBTurboMessaging::IOSPermissions>(json);
|
|
30
|
+
}
|
|
31
|
+
@end
|
|
32
|
+
namespace facebook::react {
|
|
33
|
+
|
|
34
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_getInitialNotification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
35
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getInitialNotification", @selector(getInitialNotification:reject:), args, count);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_getDidOpenSettingsForNotification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
39
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getDidOpenSettingsForNotification", @selector(getDidOpenSettingsForNotification:reject:), args, count);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_setAutoInitEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
43
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setAutoInitEnabled", @selector(setAutoInitEnabled:resolve:reject:), args, count);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_signalBackgroundMessageHandlerSet(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
47
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "signalBackgroundMessageHandlerSet", @selector(signalBackgroundMessageHandlerSet), args, count);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_completeNotificationProcessing(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
51
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "completeNotificationProcessing", @selector(completeNotificationProcessing), args, count);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_getToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
55
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getToken", @selector(getToken:senderId:resolve:reject:), args, count);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_deleteToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
59
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "deleteToken", @selector(deleteToken:senderId:resolve:reject:), args, count);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_getAPNSToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
63
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getAPNSToken", @selector(getAPNSToken:reject:), args, count);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_setAPNSToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
67
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setAPNSToken", @selector(setAPNSToken:type:resolve:reject:), args, count);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_getIsHeadless(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
71
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getIsHeadless", @selector(getIsHeadless:reject:), args, count);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_requestPermission(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
75
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "requestPermission", @selector(requestPermission:resolve:reject:), args, count);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_registerForRemoteNotifications(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
79
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "registerForRemoteNotifications", @selector(registerForRemoteNotifications:reject:), args, count);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_unregisterForRemoteNotifications(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
83
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "unregisterForRemoteNotifications", @selector(unregisterForRemoteNotifications:reject:), args, count);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_hasPermission(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
87
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "hasPermission", @selector(hasPermission:reject:), args, count);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_sendMessage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
91
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "sendMessage", @selector(sendMessage:resolve:reject:), args, count);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_subscribeToTopic(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
95
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "subscribeToTopic", @selector(subscribeToTopic:resolve:reject:), args, count);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_unsubscribeFromTopic(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
99
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "unsubscribeFromTopic", @selector(unsubscribeFromTopic:resolve:reject:), args, count);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_setDeliveryMetricsExportToBigQuery(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
103
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setDeliveryMetricsExportToBigQuery", @selector(setDeliveryMetricsExportToBigQuery:resolve:reject:), args, count);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_setNotificationDelegationEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
107
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setNotificationDelegationEnabled", @selector(setNotificationDelegationEnabled:resolve:reject:), args, count);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_isNotificationDelegationEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
111
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "isNotificationDelegationEnabled", @selector(isNotificationDelegationEnabled:reject:), args, count);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboMessagingSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
115
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "getConstants", @selector(getConstants), args, count);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
NativeRNFBTurboMessagingSpecJSI::NativeRNFBTurboMessagingSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
119
|
+
: ObjCTurboModule(params) {
|
|
120
|
+
|
|
121
|
+
methodMap_["getInitialNotification"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_getInitialNotification};
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
methodMap_["getDidOpenSettingsForNotification"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_getDidOpenSettingsForNotification};
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
methodMap_["setAutoInitEnabled"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_setAutoInitEnabled};
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
methodMap_["signalBackgroundMessageHandlerSet"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_signalBackgroundMessageHandlerSet};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
methodMap_["completeNotificationProcessing"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_completeNotificationProcessing};
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
methodMap_["getToken"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboMessagingSpecJSI_getToken};
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
methodMap_["deleteToken"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboMessagingSpecJSI_deleteToken};
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
methodMap_["getAPNSToken"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_getAPNSToken};
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
methodMap_["setAPNSToken"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboMessagingSpecJSI_setAPNSToken};
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
methodMap_["getIsHeadless"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_getIsHeadless};
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
methodMap_["requestPermission"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_requestPermission};
|
|
152
|
+
setMethodArgConversionSelector(@"requestPermission", 0, @"JS_NativeRNFBTurboMessaging_IOSPermissions:");
|
|
153
|
+
|
|
154
|
+
methodMap_["registerForRemoteNotifications"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_registerForRemoteNotifications};
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
methodMap_["unregisterForRemoteNotifications"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_unregisterForRemoteNotifications};
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
methodMap_["hasPermission"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_hasPermission};
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
methodMap_["sendMessage"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_sendMessage};
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
methodMap_["subscribeToTopic"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_subscribeToTopic};
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
methodMap_["unsubscribeFromTopic"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_unsubscribeFromTopic};
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
methodMap_["setDeliveryMetricsExportToBigQuery"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_setDeliveryMetricsExportToBigQuery};
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
methodMap_["setNotificationDelegationEnabled"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboMessagingSpecJSI_setNotificationDelegationEnabled};
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
methodMap_["isNotificationDelegationEnabled"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_isNotificationDelegationEnabled};
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboMessagingSpecJSI_getConstants};
|
|
182
|
+
|
|
183
|
+
}
|
|
184
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,222 @@
|
|
|
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 RNFBMessagingTurboModules symbols
|
|
19
|
+
#ifndef RNFBMessagingTurboModules_H
|
|
20
|
+
#define RNFBMessagingTurboModules_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
|
+
namespace JS {
|
|
36
|
+
namespace NativeRNFBTurboMessaging {
|
|
37
|
+
struct IOSPermissions {
|
|
38
|
+
std::optional<bool> alert() const;
|
|
39
|
+
std::optional<bool> announcement() const;
|
|
40
|
+
std::optional<bool> badge() const;
|
|
41
|
+
std::optional<bool> carPlay() const;
|
|
42
|
+
std::optional<bool> criticalAlert() const;
|
|
43
|
+
std::optional<bool> provisional() const;
|
|
44
|
+
std::optional<bool> sound() const;
|
|
45
|
+
std::optional<bool> providesAppNotificationSettings() const;
|
|
46
|
+
|
|
47
|
+
IOSPermissions(NSDictionary *const v) : _v(v) {}
|
|
48
|
+
private:
|
|
49
|
+
NSDictionary *_v;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@interface RCTCxxConvert (NativeRNFBTurboMessaging_IOSPermissions)
|
|
55
|
+
+ (RCTManagedPointer *)JS_NativeRNFBTurboMessaging_IOSPermissions:(id)json;
|
|
56
|
+
@end
|
|
57
|
+
namespace JS {
|
|
58
|
+
namespace NativeRNFBTurboMessaging {
|
|
59
|
+
struct Constants {
|
|
60
|
+
|
|
61
|
+
struct Builder {
|
|
62
|
+
// Backwards compat for RCTTypedModuleConstants
|
|
63
|
+
using ResultT = Constants;
|
|
64
|
+
|
|
65
|
+
struct Input {
|
|
66
|
+
RCTRequired<bool> isAutoInitEnabled;
|
|
67
|
+
RCTRequired<bool> isDeliveryMetricsExportToBigQueryEnabled;
|
|
68
|
+
std::optional<bool> isRegisteredForRemoteNotifications;
|
|
69
|
+
std::optional<bool> isNotificationDelegationEnabled;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** Initialize with a set of values */
|
|
73
|
+
Builder(const Input i);
|
|
74
|
+
/** Initialize with an existing Constants */
|
|
75
|
+
Builder(Constants i);
|
|
76
|
+
/** Builds the object. Generally used only by the infrastructure. */
|
|
77
|
+
NSDictionary *buildUnsafeRawValue() const { return _factory(); };
|
|
78
|
+
private:
|
|
79
|
+
NSDictionary *(^_factory)(void);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
static Constants fromUnsafeRawValue(NSDictionary *const v) { return {v}; }
|
|
83
|
+
NSDictionary *unsafeRawValue() const { return _v; }
|
|
84
|
+
private:
|
|
85
|
+
Constants(NSDictionary *const v) : _v(v) {}
|
|
86
|
+
NSDictionary *_v;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
@protocol NativeRNFBTurboMessagingSpec <RCTBridgeModule, RCTTurboModule>
|
|
91
|
+
|
|
92
|
+
- (void)getInitialNotification:(RCTPromiseResolveBlock)resolve
|
|
93
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
94
|
+
- (void)getDidOpenSettingsForNotification:(RCTPromiseResolveBlock)resolve
|
|
95
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
96
|
+
- (void)setAutoInitEnabled:(BOOL)enabled
|
|
97
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
98
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
99
|
+
- (void)signalBackgroundMessageHandlerSet;
|
|
100
|
+
- (void)completeNotificationProcessing;
|
|
101
|
+
- (void)getToken:(NSString *)appName
|
|
102
|
+
senderId:(NSString *)senderId
|
|
103
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
104
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
105
|
+
- (void)deleteToken:(NSString *)appName
|
|
106
|
+
senderId:(NSString *)senderId
|
|
107
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
108
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
109
|
+
- (void)getAPNSToken:(RCTPromiseResolveBlock)resolve
|
|
110
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
111
|
+
- (void)setAPNSToken:(NSString *)token
|
|
112
|
+
type:(NSString *)type
|
|
113
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
114
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
115
|
+
- (void)getIsHeadless:(RCTPromiseResolveBlock)resolve
|
|
116
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
117
|
+
- (void)requestPermission:(JS::NativeRNFBTurboMessaging::IOSPermissions &)permissions
|
|
118
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
119
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
120
|
+
- (void)registerForRemoteNotifications:(RCTPromiseResolveBlock)resolve
|
|
121
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
122
|
+
- (void)unregisterForRemoteNotifications:(RCTPromiseResolveBlock)resolve
|
|
123
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
124
|
+
- (void)hasPermission:(RCTPromiseResolveBlock)resolve
|
|
125
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
126
|
+
- (void)sendMessage:(NSDictionary *)remoteMessageMap
|
|
127
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
128
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
129
|
+
- (void)subscribeToTopic:(NSString *)topic
|
|
130
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
131
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
132
|
+
- (void)unsubscribeFromTopic:(NSString *)topic
|
|
133
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
134
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
135
|
+
- (void)setDeliveryMetricsExportToBigQuery:(BOOL)enabled
|
|
136
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
137
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
138
|
+
- (void)setNotificationDelegationEnabled:(BOOL)enabled
|
|
139
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
140
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
141
|
+
- (void)isNotificationDelegationEnabled:(RCTPromiseResolveBlock)resolve
|
|
142
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
143
|
+
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboMessaging::Constants::Builder>)constantsToExport;
|
|
144
|
+
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboMessaging::Constants::Builder>)getConstants;
|
|
145
|
+
|
|
146
|
+
@end
|
|
147
|
+
|
|
148
|
+
@interface NativeRNFBTurboMessagingSpecBase : NSObject {
|
|
149
|
+
@protected
|
|
150
|
+
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
151
|
+
}
|
|
152
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
@end
|
|
156
|
+
|
|
157
|
+
namespace facebook::react {
|
|
158
|
+
/**
|
|
159
|
+
* ObjC++ class for module 'NativeRNFBTurboMessaging'
|
|
160
|
+
*/
|
|
161
|
+
class JSI_EXPORT NativeRNFBTurboMessagingSpecJSI : public ObjCTurboModule {
|
|
162
|
+
public:
|
|
163
|
+
NativeRNFBTurboMessagingSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
164
|
+
};
|
|
165
|
+
} // namespace facebook::react
|
|
166
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::alert() const
|
|
167
|
+
{
|
|
168
|
+
id const p = _v[@"alert"];
|
|
169
|
+
return RCTBridgingToOptionalBool(p);
|
|
170
|
+
}
|
|
171
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::announcement() const
|
|
172
|
+
{
|
|
173
|
+
id const p = _v[@"announcement"];
|
|
174
|
+
return RCTBridgingToOptionalBool(p);
|
|
175
|
+
}
|
|
176
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::badge() const
|
|
177
|
+
{
|
|
178
|
+
id const p = _v[@"badge"];
|
|
179
|
+
return RCTBridgingToOptionalBool(p);
|
|
180
|
+
}
|
|
181
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::carPlay() const
|
|
182
|
+
{
|
|
183
|
+
id const p = _v[@"carPlay"];
|
|
184
|
+
return RCTBridgingToOptionalBool(p);
|
|
185
|
+
}
|
|
186
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::criticalAlert() const
|
|
187
|
+
{
|
|
188
|
+
id const p = _v[@"criticalAlert"];
|
|
189
|
+
return RCTBridgingToOptionalBool(p);
|
|
190
|
+
}
|
|
191
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::provisional() const
|
|
192
|
+
{
|
|
193
|
+
id const p = _v[@"provisional"];
|
|
194
|
+
return RCTBridgingToOptionalBool(p);
|
|
195
|
+
}
|
|
196
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::sound() const
|
|
197
|
+
{
|
|
198
|
+
id const p = _v[@"sound"];
|
|
199
|
+
return RCTBridgingToOptionalBool(p);
|
|
200
|
+
}
|
|
201
|
+
inline std::optional<bool> JS::NativeRNFBTurboMessaging::IOSPermissions::providesAppNotificationSettings() const
|
|
202
|
+
{
|
|
203
|
+
id const p = _v[@"providesAppNotificationSettings"];
|
|
204
|
+
return RCTBridgingToOptionalBool(p);
|
|
205
|
+
}
|
|
206
|
+
inline JS::NativeRNFBTurboMessaging::Constants::Builder::Builder(const Input i) : _factory(^{
|
|
207
|
+
NSMutableDictionary *d = [NSMutableDictionary new];
|
|
208
|
+
auto isAutoInitEnabled = i.isAutoInitEnabled.get();
|
|
209
|
+
d[@"isAutoInitEnabled"] = @(isAutoInitEnabled);
|
|
210
|
+
auto isDeliveryMetricsExportToBigQueryEnabled = i.isDeliveryMetricsExportToBigQueryEnabled.get();
|
|
211
|
+
d[@"isDeliveryMetricsExportToBigQueryEnabled"] = @(isDeliveryMetricsExportToBigQueryEnabled);
|
|
212
|
+
auto isRegisteredForRemoteNotifications = i.isRegisteredForRemoteNotifications;
|
|
213
|
+
d[@"isRegisteredForRemoteNotifications"] = isRegisteredForRemoteNotifications.has_value() ? @((BOOL)isRegisteredForRemoteNotifications.value()) : nil;
|
|
214
|
+
auto isNotificationDelegationEnabled = i.isNotificationDelegationEnabled;
|
|
215
|
+
d[@"isNotificationDelegationEnabled"] = isNotificationDelegationEnabled.has_value() ? @((BOOL)isNotificationDelegationEnabled.value()) : nil;
|
|
216
|
+
return d;
|
|
217
|
+
}) {}
|
|
218
|
+
inline JS::NativeRNFBTurboMessaging::Constants::Builder::Builder(Constants i) : _factory(^{
|
|
219
|
+
return i.unsafeRawValue();
|
|
220
|
+
}) {}
|
|
221
|
+
NS_ASSUME_NONNULL_END
|
|
222
|
+
#endif // RNFBMessagingTurboModules_H
|