freerasp-react-native 1.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.
Files changed (177) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +413 -0
  3. package/android/build.gradle +87 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +4 -0
  6. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +108 -0
  7. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativePackage.kt +17 -0
  8. package/example/Gemfile +6 -0
  9. package/example/android/app/_BUCK +55 -0
  10. package/example/android/app/build.gradle +313 -0
  11. package/example/android/app/build_defs.bzl +19 -0
  12. package/example/android/app/debug.keystore +0 -0
  13. package/example/android/app/proguard-rules.pro +10 -0
  14. package/example/android/app/src/debug/AndroidManifest.xml +13 -0
  15. package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +73 -0
  16. package/example/android/app/src/main/AndroidManifest.xml +26 -0
  17. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +48 -0
  18. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +91 -0
  19. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +116 -0
  20. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +36 -0
  21. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
  22. package/example/android/app/src/main/jni/CMakeLists.txt +7 -0
  23. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
  24. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
  25. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
  26. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
  27. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
  28. package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
  29. package/example/android/app/src/main/jni/OnLoad.cpp +11 -0
  30. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  31. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  32. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  33. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  34. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  35. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  36. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  37. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  38. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  39. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  40. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  41. package/example/android/app/src/main/res/values/strings.xml +3 -0
  42. package/example/android/app/src/main/res/values/styles.xml +9 -0
  43. package/example/android/build.gradle +53 -0
  44. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  45. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  46. package/example/android/gradle.properties +40 -0
  47. package/example/android/gradlew +234 -0
  48. package/example/android/gradlew.bat +89 -0
  49. package/example/android/settings.gradle +11 -0
  50. package/example/app.json +4 -0
  51. package/example/babel.config.js +17 -0
  52. package/example/index.js +5 -0
  53. package/example/ios/File.swift +6 -0
  54. package/example/ios/FreeraspReactNativeExample/AppDelegate.h +8 -0
  55. package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +133 -0
  56. package/example/ios/FreeraspReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  57. package/example/ios/FreeraspReactNativeExample/Images.xcassets/Contents.json +6 -0
  58. package/example/ios/FreeraspReactNativeExample/Info.plist +55 -0
  59. package/example/ios/FreeraspReactNativeExample/LaunchScreen.storyboard +47 -0
  60. package/example/ios/FreeraspReactNativeExample/main.m +10 -0
  61. package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +3 -0
  62. package/example/ios/FreeraspReactNativeExample.xcodeproj/project.pbxproj +712 -0
  63. package/example/ios/FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme +106 -0
  64. package/example/ios/FreeraspReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -0
  65. package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  66. package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +66 -0
  67. package/example/ios/FreeraspReactNativeExampleTests/Info.plist +24 -0
  68. package/example/ios/Podfile +43 -0
  69. package/example/ios/Podfile.lock +584 -0
  70. package/example/metro.config.js +40 -0
  71. package/example/package.json +21 -0
  72. package/example/react-native.config.js +10 -0
  73. package/example/src/App.tsx +89 -0
  74. package/example/yarn.lock +4154 -0
  75. package/freerasp-react-native.podspec +36 -0
  76. package/ios/Debug/TalsecRuntime.xcframework/Info.plist +40 -0
  77. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  78. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  79. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -0
  80. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  81. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -0
  82. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -0
  83. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +123 -0
  84. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  85. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -0
  86. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -0
  87. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  88. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -0
  89. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  90. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  91. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  92. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +51 -0
  93. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  94. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  95. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -0
  96. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -0
  97. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  98. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  99. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -0
  100. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  101. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +3029 -0
  102. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -0
  103. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +123 -0
  104. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  105. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +456 -0
  106. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -0
  107. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  108. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +504 -0
  109. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  110. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  111. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  112. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -0
  113. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  114. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +51 -0
  115. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  116. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  117. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -0
  118. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +3154 -0
  119. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -0
  120. package/ios/FreeraspReactNative-Bridging-Header.h +3 -0
  121. package/ios/FreeraspReactNative.m +14 -0
  122. package/ios/FreeraspReactNative.swift +53 -0
  123. package/ios/FreeraspReactNative.xcodeproj/project.pbxproj +291 -0
  124. package/ios/FreeraspReactNative.xcodeproj/xcshareddata/xcschemes/FreeraspReactNative.xcscheme +67 -0
  125. package/ios/Release/TalsecRuntime.xcframework/Info.plist +40 -0
  126. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  127. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  128. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -0
  129. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  130. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -0
  131. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -0
  132. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +123 -0
  133. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  134. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -0
  135. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -0
  136. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  137. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -0
  138. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  139. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  140. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  141. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +51 -0
  142. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  143. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  144. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -0
  145. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -0
  146. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  147. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  148. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -0
  149. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  150. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +3029 -0
  151. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -0
  152. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +123 -0
  153. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  154. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +456 -0
  155. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -0
  156. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  157. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +504 -0
  158. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  159. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  160. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  161. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -0
  162. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  163. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +51 -0
  164. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  165. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  166. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -0
  167. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +3154 -0
  168. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -0
  169. package/ios/TalsecRuntime.xcframework +1 -0
  170. package/lib/commonjs/index.js +47 -0
  171. package/lib/commonjs/index.js.map +1 -0
  172. package/lib/module/index.js +36 -0
  173. package/lib/module/index.js.map +1 -0
  174. package/lib/typescript/index.d.ts +36 -0
  175. package/lib/typescript/index.d.ts.map +1 -0
  176. package/package.json +161 -0
  177. package/src/index.tsx +90 -0
@@ -0,0 +1,12 @@
1
+ framework module TalsecRuntime {
2
+ umbrella header "TalsecRuntime_iOS.h"
3
+
4
+ export *
5
+ module * { export * }
6
+
7
+ explicit module Private {
8
+ private header "CryptoBridgingHeader.h"
9
+ private header "CurlWrapper.h"
10
+ export *
11
+ }
12
+ }
@@ -0,0 +1,3 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTViewManager.h>
3
+ #import <React/RCTEventEmitter.h>
@@ -0,0 +1,14 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTViewManager.h>
3
+ #import <React/RCTEventEmitter.h>
4
+
5
+ @interface RCT_EXTERN_MODULE(FreeraspReactNative, RCTEventEmitter)
6
+
7
+ RCT_EXTERN_METHOD(talsecStart:(NSDictionary*)options)
8
+
9
+ + (BOOL)requiresMainQueueSetup
10
+ {
11
+ return NO;
12
+ }
13
+
14
+ @end
@@ -0,0 +1,53 @@
1
+ import Foundation
2
+ import TalsecRuntime
3
+
4
+ @objc(FreeraspReactNative)
5
+ class FreeraspReactNative: RCTEventEmitter {
6
+
7
+ public static var shared:FreeraspReactNative?
8
+
9
+ override init() {
10
+ super.init()
11
+ FreeraspReactNative.shared = self
12
+ }
13
+
14
+ @objc(talsecStart:)
15
+ func talsecStart(options: NSDictionary) -> Void {
16
+ do {
17
+ try initializeTalsec(talsecConfig: options)
18
+ }
19
+ catch let error as NSError {
20
+ self.sendEvent(withName: "initializationError", body: error.localizedDescription)
21
+ return
22
+ }
23
+ self.sendEvent(withName: "started", body: "started")
24
+ }
25
+
26
+ func initializeTalsec(talsecConfig: NSDictionary) throws {
27
+ guard let iosConfig = talsecConfig["iosConfig"] as? NSDictionary else {
28
+ throw NSError(domain: "Missing iosConfig parameter in Talsec Native Plugin", code: 1)
29
+ }
30
+ guard let appBundleIds = iosConfig["appBundleId"] as? String else {
31
+ throw NSError(domain: "Missing appBundleId parameter in Talsec Native Plugin", code: 2)
32
+ }
33
+ guard let appTeamId = iosConfig["appTeamId"] as? String else {
34
+ throw NSError(domain: "Missing appTeamId parameter in Talsec Native Plugin", code: 3)
35
+ }
36
+ guard let watcherMailAddress = talsecConfig["watcherMail"] as? String else {
37
+ throw NSError(domain: "Missing watcherMail parameter in Talsec Native Plugin", code: 4)
38
+ }
39
+ let config = TalsecConfig(appBundleIds: [appBundleIds], appTeamId: appTeamId, watcherMailAddress: watcherMailAddress)
40
+ Talsec.start(config: config)
41
+ }
42
+
43
+ override func supportedEvents() -> [String]! {
44
+ return ["initializationError", "started", "privilegedAccess", "debug", "simulator", "appIntegrity", "unofficialStore", "hooks", "device binding", "deviceID", "missingSecureEnclave", "passcodeChange", "passcode"]
45
+ }
46
+ }
47
+
48
+ extension SecurityThreatCenter: SecurityThreatHandler {
49
+ public func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat) {
50
+ // It is better to implement security reactions (e.g. killing the app) here.
51
+ FreeraspReactNative.shared!.sendEvent(withName: securityThreat.rawValue, body: securityThreat.rawValue)
52
+ }
53
+ }
@@ -0,0 +1,291 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ F4FF95D7245B92E800C19C63 /* FreeraspReactNative.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* FreeraspReactNative.swift */; };
11
+ /* End PBXBuildFile section */
12
+
13
+ /* Begin PBXCopyFilesBuildPhase section */
14
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
15
+ isa = PBXCopyFilesBuildPhase;
16
+ buildActionMask = 2147483647;
17
+ dstPath = "include/$(PRODUCT_NAME)";
18
+ dstSubfolderSpec = 16;
19
+ files = (
20
+ );
21
+ runOnlyForDeploymentPostprocessing = 0;
22
+ };
23
+ /* End PBXCopyFilesBuildPhase section */
24
+
25
+ /* Begin PBXFileReference section */
26
+ 134814201AA4EA6300B7C361 /* libFreeraspReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFreeraspReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
+ A44E6983295D7C45000A719C /* TalsecRuntime.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = TalsecRuntime.xcframework; sourceTree = "<group>"; };
28
+ B3E7B5891CC2AC0600A0062D /* FreeraspReactNative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FreeraspReactNative.m; sourceTree = "<group>"; };
29
+ F4FF95D5245B92E700C19C63 /* FreeraspReactNative-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FreeraspReactNative-Bridging-Header.h"; sourceTree = "<group>"; };
30
+ F4FF95D6245B92E800C19C63 /* FreeraspReactNative.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FreeraspReactNative.swift; sourceTree = "<group>"; };
31
+ /* End PBXFileReference section */
32
+
33
+ /* Begin PBXFrameworksBuildPhase section */
34
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
35
+ isa = PBXFrameworksBuildPhase;
36
+ buildActionMask = 2147483647;
37
+ files = (
38
+ );
39
+ runOnlyForDeploymentPostprocessing = 0;
40
+ };
41
+ /* End PBXFrameworksBuildPhase section */
42
+
43
+ /* Begin PBXGroup section */
44
+ 134814211AA4EA7D00B7C361 /* Products */ = {
45
+ isa = PBXGroup;
46
+ children = (
47
+ 134814201AA4EA6300B7C361 /* libFreeraspReactNative.a */,
48
+ );
49
+ name = Products;
50
+ sourceTree = "<group>";
51
+ };
52
+ 58B511D21A9E6C8500147676 = {
53
+ isa = PBXGroup;
54
+ children = (
55
+ F4FF95D6245B92E800C19C63 /* FreeraspReactNative.swift */,
56
+ B3E7B5891CC2AC0600A0062D /* FreeraspReactNative.m */,
57
+ F4FF95D5245B92E700C19C63 /* FreeraspReactNative-Bridging-Header.h */,
58
+ 134814211AA4EA7D00B7C361 /* Products */,
59
+ A44E6982295D7C44000A719C /* Frameworks */,
60
+ );
61
+ sourceTree = "<group>";
62
+ };
63
+ A44E6982295D7C44000A719C /* Frameworks */ = {
64
+ isa = PBXGroup;
65
+ children = (
66
+ A44E6983295D7C45000A719C /* TalsecRuntime.xcframework */,
67
+ );
68
+ name = Frameworks;
69
+ sourceTree = "<group>";
70
+ };
71
+ /* End PBXGroup section */
72
+
73
+ /* Begin PBXNativeTarget section */
74
+ 58B511DA1A9E6C8500147676 /* FreeraspReactNative */ = {
75
+ isa = PBXNativeTarget;
76
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "FreeraspReactNative" */;
77
+ buildPhases = (
78
+ 58B511D71A9E6C8500147676 /* Sources */,
79
+ 58B511D81A9E6C8500147676 /* Frameworks */,
80
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
81
+ );
82
+ buildRules = (
83
+ );
84
+ dependencies = (
85
+ );
86
+ name = FreeraspReactNative;
87
+ productName = RCTDataManager;
88
+ productReference = 134814201AA4EA6300B7C361 /* libFreeraspReactNative.a */;
89
+ productType = "com.apple.product-type.library.static";
90
+ };
91
+ /* End PBXNativeTarget section */
92
+
93
+ /* Begin PBXProject section */
94
+ 58B511D31A9E6C8500147676 /* Project object */ = {
95
+ isa = PBXProject;
96
+ attributes = {
97
+ LastUpgradeCheck = 0920;
98
+ ORGANIZATIONNAME = Facebook;
99
+ TargetAttributes = {
100
+ 58B511DA1A9E6C8500147676 = {
101
+ CreatedOnToolsVersion = 6.1.1;
102
+ };
103
+ };
104
+ };
105
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "FreeraspReactNative" */;
106
+ compatibilityVersion = "Xcode 3.2";
107
+ developmentRegion = English;
108
+ hasScannedForEncodings = 0;
109
+ knownRegions = (
110
+ English,
111
+ en,
112
+ );
113
+ mainGroup = 58B511D21A9E6C8500147676;
114
+ productRefGroup = 58B511D21A9E6C8500147676;
115
+ projectDirPath = "";
116
+ projectRoot = "";
117
+ targets = (
118
+ 58B511DA1A9E6C8500147676 /* FreeraspReactNative */,
119
+ );
120
+ };
121
+ /* End PBXProject section */
122
+
123
+ /* Begin PBXSourcesBuildPhase section */
124
+ 58B511D71A9E6C8500147676 /* Sources */ = {
125
+ isa = PBXSourcesBuildPhase;
126
+ buildActionMask = 2147483647;
127
+ files = (
128
+ F4FF95D7245B92E800C19C63 /* FreeraspReactNative.swift in Sources */,
129
+ );
130
+ runOnlyForDeploymentPostprocessing = 0;
131
+ };
132
+ /* End PBXSourcesBuildPhase section */
133
+
134
+ /* Begin XCBuildConfiguration section */
135
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
136
+ isa = XCBuildConfiguration;
137
+ buildSettings = {
138
+ ALWAYS_SEARCH_USER_PATHS = NO;
139
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
140
+ CLANG_CXX_LIBRARY = "libc++";
141
+ CLANG_ENABLE_MODULES = YES;
142
+ CLANG_ENABLE_OBJC_ARC = YES;
143
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
144
+ CLANG_WARN_BOOL_CONVERSION = YES;
145
+ CLANG_WARN_COMMA = YES;
146
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
147
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
148
+ CLANG_WARN_EMPTY_BODY = YES;
149
+ CLANG_WARN_ENUM_CONVERSION = YES;
150
+ CLANG_WARN_INFINITE_RECURSION = YES;
151
+ CLANG_WARN_INT_CONVERSION = YES;
152
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
153
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
154
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
155
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
156
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
157
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
158
+ CLANG_WARN_UNREACHABLE_CODE = YES;
159
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
160
+ COPY_PHASE_STRIP = NO;
161
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
162
+ ENABLE_TESTABILITY = YES;
163
+ "EXCLUDED_ARCHS[sdk=*]" = arm64;
164
+ GCC_C_LANGUAGE_STANDARD = gnu99;
165
+ GCC_DYNAMIC_NO_PIC = NO;
166
+ GCC_NO_COMMON_BLOCKS = YES;
167
+ GCC_OPTIMIZATION_LEVEL = 0;
168
+ GCC_PREPROCESSOR_DEFINITIONS = (
169
+ "DEBUG=1",
170
+ "$(inherited)",
171
+ );
172
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
173
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
174
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
175
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
176
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
177
+ GCC_WARN_UNUSED_FUNCTION = YES;
178
+ GCC_WARN_UNUSED_VARIABLE = YES;
179
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
180
+ MTL_ENABLE_DEBUG_INFO = YES;
181
+ ONLY_ACTIVE_ARCH = YES;
182
+ SDKROOT = iphoneos;
183
+ };
184
+ name = Debug;
185
+ };
186
+ 58B511EE1A9E6C8500147676 /* Release */ = {
187
+ isa = XCBuildConfiguration;
188
+ buildSettings = {
189
+ ALWAYS_SEARCH_USER_PATHS = NO;
190
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
191
+ CLANG_CXX_LIBRARY = "libc++";
192
+ CLANG_ENABLE_MODULES = YES;
193
+ CLANG_ENABLE_OBJC_ARC = YES;
194
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
195
+ CLANG_WARN_BOOL_CONVERSION = YES;
196
+ CLANG_WARN_COMMA = YES;
197
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
198
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
199
+ CLANG_WARN_EMPTY_BODY = YES;
200
+ CLANG_WARN_ENUM_CONVERSION = YES;
201
+ CLANG_WARN_INFINITE_RECURSION = YES;
202
+ CLANG_WARN_INT_CONVERSION = YES;
203
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
204
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
205
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
206
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
207
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
208
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
209
+ CLANG_WARN_UNREACHABLE_CODE = YES;
210
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
211
+ COPY_PHASE_STRIP = YES;
212
+ ENABLE_NS_ASSERTIONS = NO;
213
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
214
+ "EXCLUDED_ARCHS[sdk=*]" = arm64;
215
+ GCC_C_LANGUAGE_STANDARD = gnu99;
216
+ GCC_NO_COMMON_BLOCKS = YES;
217
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
218
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
219
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
220
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
221
+ GCC_WARN_UNUSED_FUNCTION = YES;
222
+ GCC_WARN_UNUSED_VARIABLE = YES;
223
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
224
+ MTL_ENABLE_DEBUG_INFO = NO;
225
+ SDKROOT = iphoneos;
226
+ VALIDATE_PRODUCT = YES;
227
+ };
228
+ name = Release;
229
+ };
230
+ 58B511F01A9E6C8500147676 /* Debug */ = {
231
+ isa = XCBuildConfiguration;
232
+ buildSettings = {
233
+ HEADER_SEARCH_PATHS = (
234
+ "$(inherited)",
235
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
236
+ "$(SRCROOT)/../../../React/**",
237
+ "$(SRCROOT)/../../react-native/React/**",
238
+ );
239
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
240
+ OTHER_LDFLAGS = "-ObjC";
241
+ PRODUCT_NAME = FreeraspReactNative;
242
+ SKIP_INSTALL = YES;
243
+ SWIFT_OBJC_BRIDGING_HEADER = "FreeraspReactNative-Bridging-Header.h";
244
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
245
+ SWIFT_VERSION = 5.0;
246
+ };
247
+ name = Debug;
248
+ };
249
+ 58B511F11A9E6C8500147676 /* Release */ = {
250
+ isa = XCBuildConfiguration;
251
+ buildSettings = {
252
+ HEADER_SEARCH_PATHS = (
253
+ "$(inherited)",
254
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
255
+ "$(SRCROOT)/../../../React/**",
256
+ "$(SRCROOT)/../../react-native/React/**",
257
+ );
258
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
259
+ OTHER_LDFLAGS = "-ObjC";
260
+ PRODUCT_NAME = FreeraspReactNative;
261
+ SKIP_INSTALL = YES;
262
+ SWIFT_OBJC_BRIDGING_HEADER = "FreeraspReactNative-Bridging-Header.h";
263
+ SWIFT_VERSION = 5.0;
264
+ };
265
+ name = Release;
266
+ };
267
+ /* End XCBuildConfiguration section */
268
+
269
+ /* Begin XCConfigurationList section */
270
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "FreeraspReactNative" */ = {
271
+ isa = XCConfigurationList;
272
+ buildConfigurations = (
273
+ 58B511ED1A9E6C8500147676 /* Debug */,
274
+ 58B511EE1A9E6C8500147676 /* Release */,
275
+ );
276
+ defaultConfigurationIsVisible = 0;
277
+ defaultConfigurationName = Release;
278
+ };
279
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "FreeraspReactNative" */ = {
280
+ isa = XCConfigurationList;
281
+ buildConfigurations = (
282
+ 58B511F01A9E6C8500147676 /* Debug */,
283
+ 58B511F11A9E6C8500147676 /* Release */,
284
+ );
285
+ defaultConfigurationIsVisible = 0;
286
+ defaultConfigurationName = Release;
287
+ };
288
+ /* End XCConfigurationList section */
289
+ };
290
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
291
+ }
@@ -0,0 +1,67 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "1340"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "58B511DA1A9E6C8500147676"
18
+ BuildableName = "libFreeraspReactNative.a"
19
+ BlueprintName = "FreeraspReactNative"
20
+ ReferencedContainer = "container:FreeraspReactNative.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ </Testables>
32
+ </TestAction>
33
+ <LaunchAction
34
+ buildConfiguration = "Debug"
35
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
+ launchStyle = "0"
38
+ useCustomWorkingDirectory = "NO"
39
+ ignoresPersistentStateOnLaunch = "NO"
40
+ debugDocumentVersioning = "YES"
41
+ debugServiceExtension = "internal"
42
+ allowLocationSimulation = "YES">
43
+ </LaunchAction>
44
+ <ProfileAction
45
+ buildConfiguration = "Release"
46
+ shouldUseLaunchSchemeArgsEnv = "YES"
47
+ savedToolIdentifier = ""
48
+ useCustomWorkingDirectory = "NO"
49
+ debugDocumentVersioning = "YES">
50
+ <MacroExpansion>
51
+ <BuildableReference
52
+ BuildableIdentifier = "primary"
53
+ BlueprintIdentifier = "58B511DA1A9E6C8500147676"
54
+ BuildableName = "libFreeraspReactNative.a"
55
+ BlueprintName = "FreeraspReactNative"
56
+ ReferencedContainer = "container:FreeraspReactNative.xcodeproj">
57
+ </BuildableReference>
58
+ </MacroExpansion>
59
+ </ProfileAction>
60
+ <AnalyzeAction
61
+ buildConfiguration = "Debug">
62
+ </AnalyzeAction>
63
+ <ArchiveAction
64
+ buildConfiguration = "Release"
65
+ revealArchiveInOrganizer = "YES">
66
+ </ArchiveAction>
67
+ </Scheme>
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>LibraryIdentifier</key>
9
+ <string>ios-arm64_x86_64-simulator</string>
10
+ <key>LibraryPath</key>
11
+ <string>TalsecRuntime.framework</string>
12
+ <key>SupportedArchitectures</key>
13
+ <array>
14
+ <string>arm64</string>
15
+ <string>x86_64</string>
16
+ </array>
17
+ <key>SupportedPlatform</key>
18
+ <string>ios</string>
19
+ <key>SupportedPlatformVariant</key>
20
+ <string>simulator</string>
21
+ </dict>
22
+ <dict>
23
+ <key>LibraryIdentifier</key>
24
+ <string>ios-arm64</string>
25
+ <key>LibraryPath</key>
26
+ <string>TalsecRuntime.framework</string>
27
+ <key>SupportedArchitectures</key>
28
+ <array>
29
+ <string>arm64</string>
30
+ </array>
31
+ <key>SupportedPlatform</key>
32
+ <string>ios</string>
33
+ </dict>
34
+ </array>
35
+ <key>CFBundlePackageType</key>
36
+ <string>XFWK</string>
37
+ <key>XCFrameworkFormatVersion</key>
38
+ <string>1.0</string>
39
+ </dict>
40
+ </plist>
@@ -0,0 +1,14 @@
1
+ //
2
+ // CryptoBridgingHeader.h
3
+ // Talsec
4
+ //
5
+ // Created by Jakub Mejtský on 05/08/2019.
6
+ // Copyright © 2019 AHEAD iTec, s.r.o. All rights reserved.
7
+ //
8
+
9
+ #ifndef Crypto_h
10
+ #define Crypto_h
11
+
12
+ #import <CommonCrypto/CommonCrypto.h>
13
+
14
+ #endif /* Crypto_h */
@@ -0,0 +1,25 @@
1
+ //
2
+ // CurlWrapper.h
3
+ // Talsec
4
+ //
5
+ // Created by Jakub Mejtský on 23/07/2019.
6
+ // Copyright © 2019 AHEAD iTec, s.r.o. All rights reserved.
7
+ //
8
+
9
+ #ifndef CurlWrapper_h
10
+ #define CurlWrapper_h
11
+
12
+ #include "curl.h"
13
+ #include <stdio.h>
14
+ #include <stdlib.h>
15
+ #include <sys/sysctl.h>
16
+ #include <unistd.h>
17
+ #include <string.h>
18
+
19
+ struct DSWgsmUJiZMF {
20
+ char *memory;
21
+ size_t size;
22
+ CURLcode ret;
23
+ };
24
+
25
+ #endif /* CurlWrapper_h */