react-native-shield-fraud-plugin 2.4.1 → 2.6.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/android/build.gradle
CHANGED
|
@@ -14,12 +14,18 @@ def isNewArchitectureEnabled() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// Detect which npm package is installed by reading its own package.json.
|
|
17
|
-
// When published as react-native-shield-full-plugin the name field differs.
|
|
17
|
+
// When published as react-native-shield-full-plugin / react-native-shield-alpha-plugin the name field differs.
|
|
18
18
|
def packageJson = new groovy.json.JsonSlurper().parseText(
|
|
19
19
|
new File("${project.projectDir}/../package.json").text
|
|
20
20
|
)
|
|
21
|
-
def
|
|
22
|
-
|
|
21
|
+
def shieldSdkArtifact
|
|
22
|
+
if (packageJson.name == "react-native-shield-full-plugin") {
|
|
23
|
+
shieldSdkArtifact = "com.shield.android:shield:2.9.1"
|
|
24
|
+
} else if (packageJson.name == "react-native-shield-alpha-plugin") {
|
|
25
|
+
shieldSdkArtifact = "com.shield.android:shield-alpha:2.9.0"
|
|
26
|
+
} else {
|
|
27
|
+
shieldSdkArtifact = "com.shield.android:shield-fraud:2.9.1"
|
|
28
|
+
}
|
|
23
29
|
|
|
24
30
|
apply plugin: "com.android.library"
|
|
25
31
|
|
package/ios/ShieldFraudPlugin.mm
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
// ShieldFraud is Swift-based, but this source must remain Objective-C++ for
|
|
4
4
|
// React Native's New Architecture. Importing the generated Objective-C header
|
|
5
5
|
// avoids forcing -fcxx-modules on consumers that link the plugin statically.
|
|
6
|
+
// The alpha variant depends on the ShieldAlpha pod instead of ShieldFraud.
|
|
7
|
+
#if __has_include(<ShieldAlpha/ShieldAlpha-Swift.h>)
|
|
8
|
+
#import <ShieldAlpha/ShieldAlpha-Swift.h>
|
|
9
|
+
#else
|
|
6
10
|
#import <ShieldFraud/ShieldFraud-Swift.h>
|
|
11
|
+
#endif
|
|
7
12
|
|
|
8
13
|
@interface ShieldFraudPlugin ()
|
|
9
14
|
@property (nonatomic, strong) id<Shield> shield;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-shield-fraud-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "React Native Shield Fraud Plugin helps developers to assess malicious activities performed on mobile devices and return risk intelligence based on user's behaviour. It collects device's fingerprint, social metrics and network information.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -36,9 +36,10 @@
|
|
|
36
36
|
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
37
37
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
|
|
38
38
|
"bump": "bash scripts/bump-version.sh",
|
|
39
|
-
"publish-
|
|
39
|
+
"publish-all": "node scripts/publish.js",
|
|
40
40
|
"use-fraud": "node scripts/use-plugin.js fraud",
|
|
41
|
-
"use-full": "node scripts/use-plugin.js full"
|
|
41
|
+
"use-full": "node scripts/use-plugin.js full",
|
|
42
|
+
"use-alpha": "node scripts/use-plugin.js alpha"
|
|
42
43
|
},
|
|
43
44
|
"keywords": [
|
|
44
45
|
"react-native",
|
|
@@ -0,0 +1,23 @@
|
|
|
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 = package["name"]
|
|
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 => "12.0" }
|
|
14
|
+
s.source = { :git => "https://github.com/shield-ai-technology/react-native-shield-fraud-plugin.git", :tag => "#{s.version}" }
|
|
15
|
+
|
|
16
|
+
s.source_files = "ios/**/*.{h,m,mm}"
|
|
17
|
+
|
|
18
|
+
# install_modules_dependencies handles New Architecture (Turbo Modules / Fabric)
|
|
19
|
+
# and replaces the legacy `s.dependency "React"` call.
|
|
20
|
+
install_modules_dependencies(s)
|
|
21
|
+
|
|
22
|
+
s.dependency "ShieldAlpha", "2.1.0"
|
|
23
|
+
end
|