securiti-consent-sdk 1.132.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/NitroSecuritiConsentSdk.podspec +37 -0
- package/README.md +45 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +146 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/HybridConsentSDK.kt +669 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkPackage.java +33 -0
- package/ios/Bridge.h +10 -0
- package/ios/HybridConsentSDK.swift +640 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.cmake +78 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +48 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAppPermission.hpp +86 -0
- package/nitrogen/generated/android/c++/JBannerConfig.hpp +194 -0
- package/nitrogen/generated/android/c++/JCmpSDKOptions.hpp +94 -0
- package/nitrogen/generated/android/c++/JCustomColors.hpp +82 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +277 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +78 -0
- package/nitrogen/generated/android/c++/JPermissionConsent.hpp +61 -0
- package/nitrogen/generated/android/c++/JPostConsentsRequest.hpp +137 -0
- package/nitrogen/generated/android/c++/JPurpose.hpp +118 -0
- package/nitrogen/generated/android/c++/JPurposeConsent.hpp +65 -0
- package/nitrogen/generated/android/c++/JSDK.hpp +104 -0
- package/nitrogen/generated/android/c++/JSettingsPrompt.hpp +88 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +33 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/HybridConsentSDKSpec.kt +121 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +30 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +96 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +604 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp +78 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +223 -0
- package/nitrogen/generated/ios/swift/AppPermission.swift +267 -0
- package/nitrogen/generated/ios/swift/BannerConfig.swift +918 -0
- package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +217 -0
- package/nitrogen/generated/ios/swift/CustomColors.swift +256 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +64 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +398 -0
- package/nitrogen/generated/ios/swift/PermissionConsent.swift +57 -0
- package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +216 -0
- package/nitrogen/generated/ios/swift/Purpose.swift +354 -0
- package/nitrogen/generated/ios/swift/PurposeConsent.swift +68 -0
- package/nitrogen/generated/ios/swift/SDK.swift +285 -0
- package/nitrogen/generated/ios/swift/SettingsPrompt.swift +181 -0
- package/nitrogen/generated/shared/c++/AppPermission.hpp +102 -0
- package/nitrogen/generated/shared/c++/BannerConfig.hpp +197 -0
- package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +110 -0
- package/nitrogen/generated/shared/c++/CustomColors.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/PermissionConsent.hpp +77 -0
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +120 -0
- package/nitrogen/generated/shared/c++/Purpose.hpp +117 -0
- package/nitrogen/generated/shared/c++/PurposeConsent.hpp +81 -0
- package/nitrogen/generated/shared/c++/SDK.hpp +103 -0
- package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +87 -0
- package/package.json +107 -0
- package/react-native.config.js +16 -0
- package/src/ConsentSDK.nitro.ts +232 -0
- package/src/index.ts +133 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "NitroSecuritiConsentSdk"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = package["description"]
|
|
9
|
+
s.homepage = package["homepage"]
|
|
10
|
+
s.license = package["license"]
|
|
11
|
+
s.authors = package["author"]
|
|
12
|
+
|
|
13
|
+
s.platforms = { :ios => "15.0", :visionos => 1.0 }
|
|
14
|
+
s.source = { :git => "https://github.com/mrousavy/nitro.git", :tag => "#{s.version}" }
|
|
15
|
+
|
|
16
|
+
s.source_files = [
|
|
17
|
+
# Implementation (Swift)
|
|
18
|
+
"ios/**/*.{swift}",
|
|
19
|
+
# Autolinking/Registration (Objective-C++)
|
|
20
|
+
"ios/**/*.{m,mm}",
|
|
21
|
+
# Implementation (C++ objects)
|
|
22
|
+
"cpp/**/*.{hpp,cpp}",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
s.pod_target_xcconfig = {
|
|
26
|
+
# C++ compiler flags, mainly for folly.
|
|
27
|
+
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
load 'nitrogen/generated/ios/NitroSecuritiConsentSdk+autolinking.rb'
|
|
31
|
+
add_nitrogen_files(s)
|
|
32
|
+
|
|
33
|
+
s.dependency 'React-jsi'
|
|
34
|
+
s.dependency 'React-callinvoker'
|
|
35
|
+
s.dependency 'ConsentUI', "1.132.0"
|
|
36
|
+
install_modules_dependencies(s)
|
|
37
|
+
end
|
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# react-native-nitro-template
|
|
2
|
+
|
|
3
|
+
A React Native Library for managing user consent preferences and compliance with privacy regulations. Integrates with Securiti's Consent Management Platform.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
- iOS 15.0+
|
|
7
|
+
- Android API 24+
|
|
8
|
+
- React Native 0.73.0+
|
|
9
|
+
|
|
10
|
+
## Structure
|
|
11
|
+
- [`android/`](android): All your `android`-specific implementations.
|
|
12
|
+
- [`build.gradle`](android/build.gradle): The gradle build file. This contains four important pieces:
|
|
13
|
+
1. Standard react-native library boilerplate code
|
|
14
|
+
2. Configures Kotlin (`apply plugin: 'org.jetbrains.kotlin.android'`)
|
|
15
|
+
3. Adds all Nitrogen files (`apply from: '.../NitroSecuritiConsentSdk+autolinking.gradle'`)
|
|
16
|
+
4. Triggers the native C++ build (via CMake/`externalNativeBuild`)
|
|
17
|
+
5. Make sure you add this repositories block above the 'dependencies' block in your application's [`build.gradle`](android/build.gradle) file:
|
|
18
|
+
```gradle
|
|
19
|
+
repositories {
|
|
20
|
+
mavenCentral()
|
|
21
|
+
google()
|
|
22
|
+
maven {
|
|
23
|
+
url = uri("https://cdn-qa.securiti.xyz/consent/maven")
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- [`CMakeLists.txt`](android/CMakeLists.txt): The CMake build file to build C++ code. This contains four important pieces:
|
|
29
|
+
1. Creates a library called `NitroSecuritiConsentSdk` (same as in `nitro.json`)
|
|
30
|
+
2. Adds all Nitrogen files (`include(.../NitroSecuritiConsentSdk+autolinking.cmake)`)
|
|
31
|
+
3. Adds all custom C++ files (only `HybridTestObjectCpp.cpp`)
|
|
32
|
+
4. Adds a `cpp-adapter.cpp` file, which autolinks all C++ HybridObjects (only `HybridTestObjectCpp`)
|
|
33
|
+
- [`src/main/java/com/margelo/nitro/securiticonsentsdk/`](android/src/main/java/com/margelo/nitro/securiticonsentsdk/): All Kotlin implementations.
|
|
34
|
+
- [`NitroSecuritiConsentSdkPackage.java`](android/src/main/java/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkPackage.java): The react-native package. You need this because the react-native CLI only adds libraries if they have a `*Package.java` file. In here, you can autolink all Kotlin HybridObjects.
|
|
35
|
+
- [`cpp/`](cpp): All your cross-platform implementations. (only `HybridTestObjectCpp.cpp`)
|
|
36
|
+
- [`ios/`](ios): All your iOS-specific implementations.
|
|
37
|
+
- [`nitrogen/`](nitrogen): All files generated by nitrogen. You should commit this folder to git.
|
|
38
|
+
- [`src/`](src): The TypeScript codebase. This defines all HybridObjects and loads them at runtime.
|
|
39
|
+
- [`specs/`](src/specs): All HybridObject types. Nitrogen will run on all `*.nitro.ts` files.
|
|
40
|
+
- [`nitro.json`](nitro.json): The configuration file for nitrogen. This will define all native namespaces, as well as the library name.
|
|
41
|
+
- [`NitroSecuritiConsentSdk.podspec`](NitroSecuritiConsentSdk.podspec): The iOS podspec build file to build the iOS code. This contains three important pieces:
|
|
42
|
+
1. Specifies the Pod's name. This must be identical to the name specified in `nitro.json`.
|
|
43
|
+
2. Adds all of your `.swift` or `.cpp` files (implementations).
|
|
44
|
+
3. Adds all Nitrogen files (`add_nitrogen_files(s)`)
|
|
45
|
+
- [`package.json`](package.json): The npm package.json file. `react-native-nitro-modules` should be a `peerDependency`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
project(NitroSecuritiConsentSdk)
|
|
2
|
+
cmake_minimum_required(VERSION 3.9.0)
|
|
3
|
+
|
|
4
|
+
set (PACKAGE_NAME NitroSecuritiConsentSdk)
|
|
5
|
+
set (CMAKE_VERBOSE_MAKEFILE ON)
|
|
6
|
+
set (CMAKE_CXX_STANDARD 20)
|
|
7
|
+
|
|
8
|
+
# Define C++ library and add all sources
|
|
9
|
+
add_library(${PACKAGE_NAME} SHARED
|
|
10
|
+
src/main/cpp/cpp-adapter.cpp
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
# Add Nitrogen specs :)
|
|
14
|
+
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.cmake)
|
|
15
|
+
|
|
16
|
+
# Set up local includes
|
|
17
|
+
include_directories(
|
|
18
|
+
"src/main/cpp"
|
|
19
|
+
"../cpp"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
find_library(LOG_LIB log)
|
|
23
|
+
|
|
24
|
+
# Link all libraries together
|
|
25
|
+
target_link_libraries(
|
|
26
|
+
${PACKAGE_NAME}
|
|
27
|
+
${LOG_LIB}
|
|
28
|
+
android # <-- Android core
|
|
29
|
+
)
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
dependencies {
|
|
8
|
+
classpath "com.android.tools.build:gradle:8.9.2"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
def reactNativeArchitectures() {
|
|
13
|
+
def value = rootProject.getProperties().get("reactNativeArchitectures")
|
|
14
|
+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def isNewArchitectureEnabled() {
|
|
18
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
apply plugin: "com.android.library"
|
|
22
|
+
apply plugin: 'org.jetbrains.kotlin.android'
|
|
23
|
+
apply from: '../nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.gradle'
|
|
24
|
+
|
|
25
|
+
if (isNewArchitectureEnabled()) {
|
|
26
|
+
apply plugin: "com.facebook.react"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def getExtOrDefault(name) {
|
|
30
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["NitroSecuritiConsentSdk_" + name]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
def getExtOrIntegerDefault(name) {
|
|
34
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["NitroSecuritiConsentSdk_" + name]).toInteger()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
android {
|
|
38
|
+
namespace "com.margelo.nitro.securiticonsentsdk"
|
|
39
|
+
|
|
40
|
+
ndkVersion getExtOrDefault("ndkVersion")
|
|
41
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
42
|
+
|
|
43
|
+
defaultConfig {
|
|
44
|
+
minSdkVersion 24 // Force minimum SDK version to 24
|
|
45
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
46
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
47
|
+
|
|
48
|
+
externalNativeBuild {
|
|
49
|
+
cmake {
|
|
50
|
+
cppFlags "-frtti -fexceptions -Wall -Wextra -fstack-protector-all"
|
|
51
|
+
arguments "-DANDROID_STL=c++_shared"
|
|
52
|
+
abiFilters (*reactNativeArchitectures())
|
|
53
|
+
|
|
54
|
+
buildTypes {
|
|
55
|
+
debug {
|
|
56
|
+
cppFlags "-O1 -g"
|
|
57
|
+
}
|
|
58
|
+
release {
|
|
59
|
+
cppFlags "-O2"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
externalNativeBuild {
|
|
67
|
+
cmake {
|
|
68
|
+
path "CMakeLists.txt"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
packagingOptions {
|
|
73
|
+
excludes = [
|
|
74
|
+
"META-INF",
|
|
75
|
+
"META-INF/**",
|
|
76
|
+
"**/libc++_shared.so",
|
|
77
|
+
"**/libfbjni.so",
|
|
78
|
+
"**/libjsi.so",
|
|
79
|
+
"**/libfolly_json.so",
|
|
80
|
+
"**/libfolly_runtime.so",
|
|
81
|
+
"**/libglog.so",
|
|
82
|
+
"**/libhermes.so",
|
|
83
|
+
"**/libhermes-executor-debug.so",
|
|
84
|
+
"**/libhermes_executor.so",
|
|
85
|
+
"**/libreactnative.so",
|
|
86
|
+
"**/libreactnativejni.so",
|
|
87
|
+
"**/libturbomodulejsijni.so",
|
|
88
|
+
"**/libreact_nativemodule_core.so",
|
|
89
|
+
"**/libjscexecutor.so"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
buildFeatures {
|
|
94
|
+
buildConfig true
|
|
95
|
+
prefab true
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
buildTypes {
|
|
99
|
+
release {
|
|
100
|
+
minifyEnabled false
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
lintOptions {
|
|
105
|
+
disable "GradleCompatible"
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
compileOptions {
|
|
109
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
110
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
sourceSets {
|
|
114
|
+
main {
|
|
115
|
+
if (isNewArchitectureEnabled()) {
|
|
116
|
+
java.srcDirs += [
|
|
117
|
+
// React Codegen files
|
|
118
|
+
"${project.buildDir}/generated/source/codegen/java"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
repositories {
|
|
126
|
+
mavenCentral()
|
|
127
|
+
google()
|
|
128
|
+
maven {
|
|
129
|
+
url = uri("https://cdn-qa.securiti.xyz/consent/maven")
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
dependencies {
|
|
135
|
+
// For < 0.71, this will be from the local maven repo
|
|
136
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
137
|
+
//noinspection GradleDynamicVersion
|
|
138
|
+
implementation "com.facebook.react:react-native:+"
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
implementation 'ai.securiti.cmpsdkcore:consent-sdk:1.132.0'
|
|
142
|
+
|
|
143
|
+
// Add a dependency on NitroModules
|
|
144
|
+
implementation project(":react-native-nitro-modules")
|
|
145
|
+
}
|
|
146
|
+
|