Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.1.cjs

This file was deleted.

942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.10.3.cjs

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
nodeLinker: node-modules
compressionLevel: mixed

enableGlobalCache: false

nmHoistingLimits: workspaces

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.1.cjs
yarnPath: .yarn/releases/yarn-4.10.3.cjs
2 changes: 1 addition & 1 deletion ReactNativeCmp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/SourcePointUSA/react-native-sourcepoint-cmp.git", :tag => "#{s.version}" }

s.dependency "ConsentViewController", "7.12.4"
s.dependency "ConsentViewController", "7.12.7"
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
s.private_header_files = "ios/**/*.h"

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.6.1"

implementation "com.sourcepoint.cmplibrary:cmplibrary:7.15.8"
implementation "com.sourcepoint.cmplibrary:cmplibrary:7.15.10"
}

react {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ class ReactNativeCmpModule(reactContext: ReactApplicationContext) : NativeReactN
}.build()

reactApplicationContext.currentActivity?.let {
spConsentLib = makeConsentLib(config, it, this, parsedOptions.androidDismissMessageOnBackPress)
spConsentLib = makeConsentLib(
spConfig = config,
activity = it,
spClient = this,
dismissMessageOnBackPress = parsedOptions.dismissMessageOnBackPress,
hideAppsViewsFromAccessibilityWhileMessageIsDisplayed = parsedOptions.hideAppsViewsFromAccessibilityWhileMessageIsDisplayed
)
} ?: run {
onError(Error("No activity found when building the SDK"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ import com.sourcepoint.cmplibrary.model.MessageLanguage.ENGLISH
data class BuildOptions(
val language: MessageLanguage,
val messageTimeoutInSeconds: Long,
val androidDismissMessageOnBackPress: Boolean
val dismissMessageOnBackPress: Boolean,
val hideAppsViewsFromAccessibilityWhileMessageIsDisplayed: Boolean,
) {
val messageTimeoutInMilliseconds = messageTimeoutInSeconds * 1000L

constructor(options: ReadableMap?) : this(
language = MessageLanguage.entries.find { it.value == options?.getString("language") } ?: ENGLISH,
messageTimeoutInSeconds = options?.getDoubleOrNull("messageTimeoutInSeconds")?.toLong() ?: 30L,
androidDismissMessageOnBackPress = options?.getBooleanOrNull("androidDismissMessageOnBackPress") ?: true
dismissMessageOnBackPress = options?.getBooleanOrNull("androidDismissMessageOnBackPress") ?: true,
hideAppsViewsFromAccessibilityWhileMessageIsDisplayed = options
?.getBooleanOrNull("androidHideAppsViewsFromAccessibilityWhileMessageIsDisplayed") ?: true
)
}
17 changes: 8 additions & 9 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
PODS:
- boost (1.84.0)
- ConsentViewController (7.12.4):
- Down (~> 0.11.0)
- SPMobileCore (= 0.1.11)
- ConsentViewController (7.12.7):
- SPMobileCore (= 0.1.13)
- DoubleConversion (1.1.6)
- fast_float (6.1.4)
- FBLazyVector (0.79.2)
Expand Down Expand Up @@ -1659,8 +1658,8 @@ PODS:
- React-logger (= 0.79.2)
- React-perflogger (= 0.79.2)
- React-utils (= 0.79.2)
- ReactNativeCmp (1.0.12):
- ConsentViewController (= 7.12.4)
- ReactNativeCmp (1.0.13-beta.1):
- ConsentViewController (= 7.12.7)
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1685,7 +1684,7 @@ PODS:
- ReactCommon/turbomodule/core
- Yoga
- SocketRocket (0.7.1)
- SPMobileCore (0.1.11)
- SPMobileCore (0.1.13)
- Yoga (0.0.0)

DEPENDENCIES:
Expand Down Expand Up @@ -1919,7 +1918,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
ConsentViewController: 44b853fa9157e70a790f34d59e20a9d8433ca852
ConsentViewController: ed1ede8987f1fc017354ded94f17082173195b0a
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
FBLazyVector: 84b955f7b4da8b895faf5946f73748267347c975
Expand Down Expand Up @@ -1989,9 +1988,9 @@ SPEC CHECKSUMS:
ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584
ReactCodegen: 041559ba76d00f6680dfa0916b3c791f4babe5ea
ReactCommon: 1511ef100f1afa4c199fe52fe7a8d2529a41429a
ReactNativeCmp: 5afdc6e723de60caa326cdf7b37f9ea1826b8d86
ReactNativeCmp: d743091062af597bdff58cdc9a0acfc48a9e571c
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
SPMobileCore: 220d109e404cb17169f7e26f2a34c6022b80079a
SPMobileCore: 2a77dd31b40f1457ef9df14a0e72163fa00d87c0
Yoga: 50518ade05048235d91a78b803336dbb5b159d5d

PODFILE CHECKSUM: fc7ed175dfbaaefde7501a413b61d7f865d8a005
Expand Down
5 changes: 2 additions & 3 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ const config = {
// is disabled in the Sourcepoint dashboard
language: SPMessageLanguage.ENGLISH,
messageTimeoutInSeconds: 20,
// Allows Android users to dismiss the consent message on back press.
// True by default.
// Set it to false if you wish to prevent this users from dismissing the message on back press.
// Allows Android users to dismiss the consent message on back press. True by default.
// Set it to false if you wish to prevent users from dismissing the message on back press.
androidDismissMessageOnBackPress: false,
},
gdprPMId: '488393',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sourcepoint/react-native-cmp",
"version": "1.0.12",
"version": "1.0.13-beta.1",
"description": "The official react native bridge to the native Sourcepoint SDKs",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down Expand Up @@ -103,7 +103,7 @@
"workspaces": [
"example"
],
"packageManager": "yarn@3.6.1",
"packageManager": "yarn@4.10.3",
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions src/NativeReactNativeCmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export type SPBuildOptions = {
language?: SPMessageLanguage;
messageTimeoutInSeconds?: number;
androidDismissMessageOnBackPress?: boolean;
androidHideAppsViewsFromAccessibilityWhileMessageIsDisplayed?: boolean;
}

export type SPErrorName =
Expand Down
Loading
Loading