@react-native-firebase/in-app-messaging 25.1.0 → 26.1.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 +22 -0
- package/RNFBInAppMessaging.podspec +10 -7
- package/android/build.gradle +19 -0
- package/android/src/reactnative/java/io/invertase/firebase/fiam/{ReactNativeFirebaseFiamModule.java → NativeRNFBTurboFiam.java} +17 -18
- package/android/src/reactnative/java/io/invertase/firebase/fiam/ReactNativeFirebaseFiamPackage.java +1 -1
- package/android/src/reactnative/java/io/invertase/firebase/fiam/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboFiamSpec.java +79 -0
- package/android/src/reactnative/java/io/invertase/firebase/fiam/generated/jni/CMakeLists.txt +36 -0
- package/android/src/reactnative/java/io/invertase/firebase/fiam/generated/jni/RNFBInAppMessagingTurboModules-generated.cpp +50 -0
- package/android/src/reactnative/java/io/invertase/firebase/fiam/generated/jni/RNFBInAppMessagingTurboModules.h +31 -0
- package/android/src/reactnative/java/io/invertase/firebase/fiam/generated/jni/react/renderer/components/RNFBInAppMessagingTurboModules/RNFBInAppMessagingTurboModulesJSI-generated.cpp +47 -0
- package/android/src/reactnative/java/io/invertase/firebase/fiam/generated/jni/react/renderer/components/RNFBInAppMessagingTurboModules/RNFBInAppMessagingTurboModulesJSI.h +98 -0
- package/dist/module/index.js +113 -3
- package/dist/module/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/web/RNFBFiamModule.js +34 -0
- package/dist/module/web/RNFBFiamModule.js.map +1 -0
- package/dist/typescript/lib/index.d.ts +46 -4
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +1 -8
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/dist/typescript/lib/web/RNFBFiamModule.d.ts +4 -0
- package/dist/typescript/lib/web/RNFBFiamModule.d.ts.map +1 -0
- package/ios/RNFBFiam/RNFBFiamHelper.h +47 -0
- package/ios/RNFBFiam/RNFBFiamHelper.m +82 -0
- package/ios/RNFBFiam/RNFBFiamModule.h +2 -3
- package/ios/RNFBFiam/RNFBFiamModule.mm +75 -0
- package/ios/RNFBFiam.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/RNFBInAppMessagingTurboModules/RNFBInAppMessagingTurboModules-generated.mm +60 -0
- package/ios/generated/RNFBInAppMessagingTurboModules/RNFBInAppMessagingTurboModules.h +112 -0
- package/ios/generated/RNFBInAppMessagingTurboModulesJSI-generated.cpp +47 -0
- package/ios/generated/RNFBInAppMessagingTurboModulesJSI.h +98 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/index.ts +141 -5
- package/lib/types/internal.ts +1 -16
- package/lib/version.ts +1 -1
- package/lib/web/RNFBFiamModule.ts +34 -0
- package/package.json +23 -5
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboFiam.ts +15 -0
- package/tsconfig.json +4 -0
- package/typedoc.json +1 -1
- package/dist/module/modular.js +0 -80
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -78
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -62
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -36
- 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 -107
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/ios/RNFBFiam/RNFBFiamModule.m +0 -71
- package/lib/modular.ts +0 -103
- package/lib/namespaced.ts +0 -117
- package/lib/types/namespaced.ts +0 -137
package/dist/module/version.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const RNFBFiamModuleWeb = {
|
|
21
|
+
isMessagesDisplaySuppressed: false,
|
|
22
|
+
isAutomaticDataCollectionEnabled: false,
|
|
23
|
+
setMessagesDisplaySuppressed() {
|
|
24
|
+
return Promise.resolve(null);
|
|
25
|
+
},
|
|
26
|
+
setAutomaticDataCollectionEnabled() {
|
|
27
|
+
return Promise.resolve(null);
|
|
28
|
+
},
|
|
29
|
+
triggerEvent() {
|
|
30
|
+
return Promise.resolve(null);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export default RNFBFiamModuleWeb;
|
|
34
|
+
//# sourceMappingURL=RNFBFiamModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RNFBFiamModuleWeb","isMessagesDisplaySuppressed","isAutomaticDataCollectionEnabled","setMessagesDisplaySuppressed","Promise","resolve","setAutomaticDataCollectionEnabled","triggerEvent"],"sourceRoot":"../../../lib","sources":["web/RNFBFiamModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,iBAAiC,GAAG;EACxCC,2BAA2B,EAAE,KAAK;EAClCC,gCAAgC,EAAE,KAAK;EACvCC,4BAA4BA,CAAA,EAAG;IAC7B,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B,CAAC;EACDC,iCAAiCA,CAAA,EAAG;IAClC,OAAOF,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B,CAAC;EACDE,YAAYA,CAAA,EAAG;IACb,OAAOH,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B;AACF,CAAC;AAED,eAAeL,iBAAiB","ignoreList":[]}
|
|
@@ -1,6 +1,48 @@
|
|
|
1
|
+
import './types/internal';
|
|
2
|
+
import type { FirebaseApp } from '@react-native-firebase/app';
|
|
3
|
+
import type { InAppMessaging } from './types/in-app-messaging';
|
|
4
|
+
/**
|
|
5
|
+
* RN Firebase package version string exported from the modular entry point.
|
|
6
|
+
*
|
|
7
|
+
* The firebase-js-sdk does not ship a modular In-App Messaging entry point or `SDK_VERSION` export.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SDK_VERSION = "26.1.0";
|
|
10
|
+
/**
|
|
11
|
+
* Returns the {@link InAppMessaging} 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 In-App Messaging service instance for that app.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getInAppMessaging(app?: FirebaseApp): InAppMessaging;
|
|
17
|
+
/**
|
|
18
|
+
* Determines whether messages are suppressed or not.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isMessagesDisplaySuppressed(inAppMessaging: InAppMessaging): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Enable or disable suppression of Firebase In App Messaging messages.
|
|
23
|
+
*
|
|
24
|
+
* When enabled, no in app messages will be rendered until either you disable suppression, or the app
|
|
25
|
+
* restarts. This state is not persisted between app restarts.
|
|
26
|
+
*/
|
|
27
|
+
export declare function setMessagesDisplaySuppressed(inAppMessaging: InAppMessaging, enabled: boolean): Promise<null>;
|
|
28
|
+
/**
|
|
29
|
+
* Determines whether automatic data collection is enabled or not.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isAutomaticDataCollectionEnabled(inAppMessaging: InAppMessaging): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Enable or disable automatic data collection for Firebase In-App Messaging.
|
|
34
|
+
*
|
|
35
|
+
* When enabled, generates a registration token on app startup if there is no valid one and
|
|
36
|
+
* generates a new token when it is deleted (which prevents `deleteInstanceId()` from stopping the
|
|
37
|
+
* periodic sending of data).
|
|
38
|
+
*
|
|
39
|
+
* This setting is persisted across app restarts and overrides the setting specified in your
|
|
40
|
+
* manifest/plist file.
|
|
41
|
+
*/
|
|
42
|
+
export declare function setAutomaticDataCollectionEnabled(inAppMessaging: InAppMessaging, enabled: boolean): Promise<null>;
|
|
43
|
+
/**
|
|
44
|
+
* Trigger in-app messages programmatically.
|
|
45
|
+
*/
|
|
46
|
+
export declare function triggerEvent(inAppMessaging: InAppMessaging, eventId: string): Promise<null>;
|
|
1
47
|
export type { InAppMessaging } from './types/in-app-messaging';
|
|
2
|
-
export type { FirebaseInAppMessagingTypes } from './types/namespaced';
|
|
3
|
-
export * from './modular';
|
|
4
|
-
export * from './namespaced';
|
|
5
|
-
export { default } from './namespaced';
|
|
6
48
|
//# 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":"AAwBA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA+D/D;;;;GAIG;AACH,eAAO,MAAM,WAAW,WAAU,CAAC;AAEnC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,cAAc,CAEnE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAEnF;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAExF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAC/C,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3F;AAKD,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { InAppMessaging } from './in-app-messaging';
|
|
2
|
-
/** Optional final argument passed by modular API wrappers (MODULAR_DEPRECATION_ARG). */
|
|
3
|
-
export type InAppMessagingModularDeprecationArg = string;
|
|
4
2
|
/**
|
|
5
3
|
* Wrapped native module contract for `RNFBFiamModule`.
|
|
6
4
|
*/
|
|
@@ -13,15 +11,10 @@ export interface RNFBFiamModule {
|
|
|
13
11
|
}
|
|
14
12
|
declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
|
|
15
13
|
interface ReactNativeFirebaseNativeModules {
|
|
16
|
-
|
|
14
|
+
NativeRNFBTurboFiam: RNFBFiamModule;
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
export interface InAppMessagingInternal extends InAppMessaging {
|
|
20
18
|
readonly native: RNFBFiamModule;
|
|
21
19
|
}
|
|
22
|
-
export type InAppMessagingWithDeprecationArg = InAppMessagingInternal & {
|
|
23
|
-
setMessagesDisplaySuppressed(enabled: boolean, _depArg: InAppMessagingModularDeprecationArg): Promise<null>;
|
|
24
|
-
setAutomaticDataCollectionEnabled(enabled: boolean, _depArg: InAppMessagingModularDeprecationArg): Promise<null>;
|
|
25
|
-
triggerEvent(eventId: string, _depArg: InAppMessagingModularDeprecationArg): Promise<null>;
|
|
26
|
-
};
|
|
27
20
|
//# 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,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../lib/types/internal.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B,EAAE,OAAO,CAAC;IACrC,gCAAgC,EAAE,OAAO,CAAC;IAC1C,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,iCAAiC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;AAED,OAAO,QAAQ,+DAA+D,CAAC;IAC7E,UAAU,gCAAgC;QACxC,mBAAmB,EAAE,cAAc,CAAC;KACrC;CACF;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "26.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNFBFiamModule.d.ts","sourceRoot":"","sources":["../../../../lib/web/RNFBFiamModule.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,QAAA,MAAM,iBAAiB,EAAE,cAYxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#import <Foundation/Foundation.h>
|
|
19
|
+
|
|
20
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
/// Thin Objective-C wrapper around FirebaseInAppMessaging.
|
|
23
|
+
///
|
|
24
|
+
/// FirebaseInAppMessaging is a pure-Swift SPM module: its generated ObjC
|
|
25
|
+
/// interface header (FirebaseInAppMessaging-Swift.h) is not reliably
|
|
26
|
+
/// importable from a cross-project CocoaPods target, and `@import
|
|
27
|
+
/// FirebaseInAppMessaging;` (the pattern the Firebase SDK itself documents
|
|
28
|
+
/// for ObjC clients, see SPMSwiftHeaderWorkaround.swift) requires C++
|
|
29
|
+
/// modules to be enabled when used from an Objective-C++ (.mm) file, which
|
|
30
|
+
/// breaks React Native's own jsi/React modules. Isolating all
|
|
31
|
+
/// FirebaseInAppMessaging usage in this plain Objective-C (.m) file avoids
|
|
32
|
+
/// that requirement entirely, since `@import` only needs `-fmodules`
|
|
33
|
+
/// (already enabled) for plain ObjC. On Mac Catalyst + SPM the upstream
|
|
34
|
+
/// wrap target omits the real module — see RNFBFiamHelper.m stubs and
|
|
35
|
+
/// https://github.com/firebase/firebase-ios-sdk/pull/16468. See
|
|
36
|
+
/// okf-bundle/ios-spm-native-imports.md.
|
|
37
|
+
@interface RNFBFiamHelper : NSObject
|
|
38
|
+
|
|
39
|
+
+ (BOOL)isMessageDisplaySuppressed;
|
|
40
|
+
+ (BOOL)isAutomaticDataCollectionEnabled;
|
|
41
|
+
+ (void)setAutomaticDataCollectionEnabled:(BOOL)enabled;
|
|
42
|
+
+ (void)setMessageDisplaySuppressed:(BOOL)enabled;
|
|
43
|
+
+ (void)triggerEvent:(NSString *)eventId;
|
|
44
|
+
|
|
45
|
+
@end
|
|
46
|
+
|
|
47
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#if __has_include(<Firebase/Firebase.h>)
|
|
19
|
+
#import <Firebase/Firebase.h>
|
|
20
|
+
#define RNFB_FIAM_SDK_AVAILABLE 1
|
|
21
|
+
#elif !TARGET_OS_MACCATALYST
|
|
22
|
+
// SPM on iOS/tvOS: FirebaseInAppMessaging is a Swift product — use @import in
|
|
23
|
+
// this plain .m (needs -fmodules only). Do not move @import into the .mm
|
|
24
|
+
// TurboModule (that would require -fcxx-modules).
|
|
25
|
+
@import FirebaseCore;
|
|
26
|
+
@import FirebaseInAppMessaging;
|
|
27
|
+
#define RNFB_FIAM_SDK_AVAILABLE 1
|
|
28
|
+
#else
|
|
29
|
+
// Product module absent under Mac Catalyst + SPM. Upstream Package.swift omits
|
|
30
|
+
// .macCatalyst from FirebaseInAppMessagingTarget; CocoaPods historically
|
|
31
|
+
// masked this via the Firebase umbrella. Temporary stubs pending
|
|
32
|
+
// https://github.com/firebase/firebase-ios-sdk/pull/16468 (or permanent if
|
|
33
|
+
// upstream declines). When that PR lands, drop the TARGET_OS_MACCATALYST
|
|
34
|
+
// gate and use the @import path on Catalyst too.
|
|
35
|
+
#define RNFB_FIAM_SDK_AVAILABLE 0
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
#import "RNFBFiamHelper.h"
|
|
39
|
+
|
|
40
|
+
@implementation RNFBFiamHelper
|
|
41
|
+
|
|
42
|
+
+ (BOOL)isMessageDisplaySuppressed {
|
|
43
|
+
#if RNFB_FIAM_SDK_AVAILABLE
|
|
44
|
+
return [FIRInAppMessaging inAppMessaging].messageDisplaySuppressed;
|
|
45
|
+
#else
|
|
46
|
+
return NO;
|
|
47
|
+
#endif
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
+ (BOOL)isAutomaticDataCollectionEnabled {
|
|
51
|
+
#if RNFB_FIAM_SDK_AVAILABLE
|
|
52
|
+
return [FIRInAppMessaging inAppMessaging].automaticDataCollectionEnabled;
|
|
53
|
+
#else
|
|
54
|
+
return NO;
|
|
55
|
+
#endif
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
+ (void)setAutomaticDataCollectionEnabled:(BOOL)enabled {
|
|
59
|
+
#if RNFB_FIAM_SDK_AVAILABLE
|
|
60
|
+
[FIRInAppMessaging inAppMessaging].automaticDataCollectionEnabled = enabled;
|
|
61
|
+
#else
|
|
62
|
+
(void)enabled;
|
|
63
|
+
#endif
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
+ (void)setMessageDisplaySuppressed:(BOOL)enabled {
|
|
67
|
+
#if RNFB_FIAM_SDK_AVAILABLE
|
|
68
|
+
[FIRInAppMessaging inAppMessaging].messageDisplaySuppressed = enabled;
|
|
69
|
+
#else
|
|
70
|
+
(void)enabled;
|
|
71
|
+
#endif
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
+ (void)triggerEvent:(NSString *)eventId {
|
|
75
|
+
#if RNFB_FIAM_SDK_AVAILABLE
|
|
76
|
+
[[FIRInAppMessaging inAppMessaging] triggerEvent:eventId];
|
|
77
|
+
#else
|
|
78
|
+
(void)eventId;
|
|
79
|
+
#endif
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@end
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
#import <Foundation/Foundation.h>
|
|
19
|
+
#import "RNFBInAppMessagingTurboModules.h"
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@interface RNFBFiamModule : NSObject <RCTBridgeModule>
|
|
21
|
+
@interface RNFBFiamModule : NSObject <NativeRNFBTurboFiamSpec>
|
|
23
22
|
|
|
24
23
|
@end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#import <React/RCTConvert.h>
|
|
19
|
+
#import <React/RCTUtils.h>
|
|
20
|
+
|
|
21
|
+
#import "RNFBFiamHelper.h"
|
|
22
|
+
#import "RNFBFiamModule.h"
|
|
23
|
+
|
|
24
|
+
@implementation RNFBFiamModule
|
|
25
|
+
|
|
26
|
+
RCT_EXPORT_MODULE(NativeRNFBTurboFiam)
|
|
27
|
+
|
|
28
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
29
|
+
return NO;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
- (NSDictionary *)fiamConstantsDictionary {
|
|
33
|
+
NSMutableDictionary *constants = [NSMutableDictionary new];
|
|
34
|
+
constants[@"isMessagesDisplaySuppressed"] =
|
|
35
|
+
@([RCTConvert BOOL:@([RNFBFiamHelper isMessageDisplaySuppressed])]);
|
|
36
|
+
constants[@"isAutomaticDataCollectionEnabled"] =
|
|
37
|
+
@([RCTConvert BOOL:@([RNFBFiamHelper isAutomaticDataCollectionEnabled])]);
|
|
38
|
+
return constants;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboFiam::Constants::Builder>)constantsToExport {
|
|
42
|
+
return [_RCTTypedModuleConstants newWithUnsafeDictionary:[self fiamConstantsDictionary]];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboFiam::Constants::Builder>)getConstants {
|
|
46
|
+
return [self constantsToExport];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
50
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
51
|
+
return std::make_shared<facebook::react::NativeRNFBTurboFiamSpecJSI>(params);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
- (void)setAutomaticDataCollectionEnabled:(BOOL)enabled
|
|
55
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
56
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
57
|
+
[RNFBFiamHelper setAutomaticDataCollectionEnabled:(BOOL)enabled];
|
|
58
|
+
resolve([NSNull null]);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
- (void)setMessagesDisplaySuppressed:(BOOL)enabled
|
|
62
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
63
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
64
|
+
[RNFBFiamHelper setMessageDisplaySuppressed:(BOOL)enabled];
|
|
65
|
+
resolve([NSNull null]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
- (void)triggerEvent:(NSString *)eventId
|
|
69
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
70
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
71
|
+
[RNFBFiamHelper triggerEvent:eventId];
|
|
72
|
+
resolve([NSNull null]);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@end
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
2744B98621F45429004F8E3F /* RNFBFiamModule.
|
|
10
|
+
2744B98621F45429004F8E3F /* RNFBFiamModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBFiamModule.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 /* libRNFBFiam.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBFiam.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
27
27
|
2744B98421F45429004F8E3F /* RNFBFiamModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBFiamModule.h; path = RNFBFiam/RNFBFiamModule.h; sourceTree = SOURCE_ROOT; };
|
|
28
|
-
2744B98521F45429004F8E3F /* RNFBFiamModule.
|
|
28
|
+
2744B98521F45429004F8E3F /* RNFBFiamModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBFiamModule.mm; path = RNFBFiam/RNFBFiamModule.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 /* RNFBFiamModule.h */,
|
|
56
|
-
2744B98521F45429004F8E3F /* RNFBFiamModule.
|
|
56
|
+
2744B98521F45429004F8E3F /* RNFBFiamModule.mm */,
|
|
57
57
|
);
|
|
58
58
|
path = RNFBFiam;
|
|
59
59
|
sourceTree = "<group>";
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
isa = PBXSourcesBuildPhase;
|
|
125
125
|
buildActionMask = 2147483647;
|
|
126
126
|
files = (
|
|
127
|
-
2744B98621F45429004F8E3F /* RNFBFiamModule.
|
|
127
|
+
2744B98621F45429004F8E3F /* RNFBFiamModule.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
|