freerasp-react-native 1.0.0 → 2.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 (170) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +423 -413
  3. package/android/build.gradle +90 -87
  4. package/android/gradle.properties +4 -4
  5. package/android/src/main/AndroidManifest.xml +4 -4
  6. package/android/src/main/java/com/freeraspreactnative/FreeraspDeviceStateListener.kt +25 -0
  7. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +125 -108
  8. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativePackage.kt +17 -17
  9. package/example/Gemfile +6 -6
  10. package/example/android/app/_BUCK +55 -55
  11. package/example/android/app/build.gradle +313 -313
  12. package/example/android/app/build_defs.bzl +19 -19
  13. package/example/android/app/proguard-rules.pro +10 -10
  14. package/example/android/app/src/debug/AndroidManifest.xml +13 -13
  15. package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +73 -73
  16. package/example/android/app/src/main/AndroidManifest.xml +26 -26
  17. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +48 -48
  18. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +91 -91
  19. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +116 -116
  20. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +36 -36
  21. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
  22. package/example/android/app/src/main/jni/CMakeLists.txt +7 -7
  23. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -32
  24. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
  25. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
  26. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
  27. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -65
  28. package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
  29. package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
  30. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
  31. package/example/android/app/src/main/res/values/strings.xml +3 -3
  32. package/example/android/app/src/main/res/values/styles.xml +9 -9
  33. package/example/android/build.gradle +50 -53
  34. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  35. package/example/android/gradle.properties +40 -40
  36. package/example/android/gradlew +234 -234
  37. package/example/android/settings.gradle +11 -11
  38. package/example/app.json +3 -3
  39. package/example/assets/checkmark-circle-outline.png +0 -0
  40. package/example/assets/checkmark-circle-outline.svg +1 -0
  41. package/example/assets/close-circle-outline.png +0 -0
  42. package/example/assets/close-circle-outline.svg +1 -0
  43. package/example/assets/talsec-logo.png +0 -0
  44. package/example/babel.config.js +17 -17
  45. package/example/index.js +5 -5
  46. package/example/ios/File.swift +6 -6
  47. package/example/ios/FreeraspReactNativeExample/AppDelegate.h +8 -8
  48. package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +133 -133
  49. package/example/ios/FreeraspReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
  50. package/example/ios/FreeraspReactNativeExample/Images.xcassets/Contents.json +6 -6
  51. package/example/ios/FreeraspReactNativeExample/Info.plist +55 -55
  52. package/example/ios/FreeraspReactNativeExample/LaunchScreen.storyboard +47 -47
  53. package/example/ios/FreeraspReactNativeExample/main.m +10 -10
  54. package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +3 -3
  55. package/example/ios/FreeraspReactNativeExample.xcodeproj/project.pbxproj +4 -2
  56. package/example/ios/FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme +88 -106
  57. package/example/ios/FreeraspReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -10
  58. package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  59. package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +66 -66
  60. package/example/ios/FreeraspReactNativeExampleTests/Info.plist +24 -24
  61. package/example/ios/Podfile +43 -43
  62. package/example/ios/Podfile.lock +590 -584
  63. package/example/metro.config.js +40 -40
  64. package/example/package.json +24 -21
  65. package/example/react-native.config.js +10 -10
  66. package/example/src/App.tsx +136 -89
  67. package/example/src/DemoApp.tsx +89 -0
  68. package/example/src/checks.ts +16 -0
  69. package/example/src/styles.ts +7 -0
  70. package/example/yarn.lock +4644 -4154
  71. package/freerasp-react-native.podspec +36 -36
  72. package/ios/FreeraspReactNative-Bridging-Header.h +3 -3
  73. package/ios/FreeraspReactNative.m +14 -14
  74. package/ios/FreeraspReactNative.swift +62 -53
  75. package/ios/FreeraspReactNative.xcodeproj/xcshareddata/xcschemes/FreeraspReactNative.xcscheme +67 -67
  76. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/Info.plist +40 -40
  77. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
  78. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
  79. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -222
  80. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
  81. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -3029
  82. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -77
  83. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/easy.h +123 -123
  84. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/mprintf.h +50 -50
  85. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -456
  86. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -68
  87. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
  88. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -504
  89. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -125
  90. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  91. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +52 -51
  92. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -17
  93. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  94. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -3154
  95. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -12
  96. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
  97. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
  98. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -450
  99. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
  100. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/curl.h +3029 -3029
  101. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -77
  102. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/easy.h +123 -123
  103. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/mprintf.h +50 -50
  104. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/multi.h +456 -456
  105. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -68
  106. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
  107. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/system.h +504 -504
  108. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -125
  109. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  110. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +52 -51
  111. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +52 -51
  112. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -17
  113. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  114. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -344
  115. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/cacert.pem +3154 -3154
  116. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -12
  117. package/lib/commonjs/index.js.map +1 -1
  118. package/lib/module/index.js.map +1 -1
  119. package/lib/typescript/index.d.ts +36 -35
  120. package/lib/typescript/index.d.ts.map +1 -1
  121. package/package.json +161 -161
  122. package/src/index.tsx +91 -90
  123. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +0 -25
  124. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +0 -222
  125. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +0 -50
  126. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +0 -68
  127. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +0 -33
  128. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +0 -125
  129. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  130. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +0 -17
  131. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  132. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +0 -12
  133. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +0 -14
  134. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +0 -450
  135. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +0 -3029
  136. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +0 -456
  137. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +0 -504
  138. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  139. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -51
  140. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  141. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +0 -3154
  142. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +0 -12
  143. package/ios/Release/TalsecRuntime.xcframework/Info.plist +0 -40
  144. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +0 -23
  145. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +0 -77
  146. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +0 -123
  147. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  148. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +0 -51
  149. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +0 -14
  150. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +0 -25
  151. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +0 -23
  152. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +0 -3029
  153. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +0 -77
  154. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +0 -123
  155. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +0 -50
  156. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +0 -456
  157. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +0 -68
  158. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +0 -33
  159. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +0 -504
  160. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +0 -125
  161. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -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 +0 -51
  164. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +0 -17
  165. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +0 -344
  166. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +0 -3154
  167. package/ios/TalsecRuntime.xcframework +0 -1
  168. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  169. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  170. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
@@ -1,19 +1,19 @@
1
- """Helper definitions to glob .aar and .jar targets"""
2
-
3
- def create_aar_targets(aarfiles):
4
- for aarfile in aarfiles:
5
- name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
- lib_deps.append(":" + name)
7
- android_prebuilt_aar(
8
- name = name,
9
- aar = aarfile,
10
- )
11
-
12
- def create_jar_targets(jarfiles):
13
- for jarfile in jarfiles:
14
- name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
- lib_deps.append(":" + name)
16
- prebuilt_jar(
17
- name = name,
18
- binary_jar = jarfile,
19
- )
1
+ """Helper definitions to glob .aar and .jar targets"""
2
+
3
+ def create_aar_targets(aarfiles):
4
+ for aarfile in aarfiles:
5
+ name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
+ lib_deps.append(":" + name)
7
+ android_prebuilt_aar(
8
+ name = name,
9
+ aar = aarfile,
10
+ )
11
+
12
+ def create_jar_targets(jarfiles):
13
+ for jarfile in jarfiles:
14
+ name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
+ lib_deps.append(":" + name)
16
+ prebuilt_jar(
17
+ name = name,
18
+ binary_jar = jarfile,
19
+ )
@@ -1,10 +1,10 @@
1
- # Add project specific ProGuard rules here.
2
- # By default, the flags in this file are appended to flags specified
3
- # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
- # You can edit the include path and order by changing the proguardFiles
5
- # directive in build.gradle.
6
- #
7
- # For more details, see
8
- # http://developer.android.com/guide/developing/tools/proguard.html
9
-
10
- # Add any project specific keep options here:
1
+ # Add project specific ProGuard rules here.
2
+ # By default, the flags in this file are appended to flags specified
3
+ # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
+ # You can edit the include path and order by changing the proguardFiles
5
+ # directive in build.gradle.
6
+ #
7
+ # For more details, see
8
+ # http://developer.android.com/guide/developing/tools/proguard.html
9
+
10
+ # Add any project specific keep options here:
@@ -1,13 +1,13 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:tools="http://schemas.android.com/tools">
4
-
5
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
-
7
- <application
8
- android:usesCleartextTraffic="true"
9
- tools:targetApi="28"
10
- tools:ignore="GoogleAppIndexingWarning">
11
- <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12
- </application>
13
- </manifest>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:tools="http://schemas.android.com/tools">
4
+
5
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
+
7
+ <application
8
+ android:usesCleartextTraffic="true"
9
+ tools:targetApi="28"
10
+ tools:ignore="GoogleAppIndexingWarning">
11
+ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12
+ </application>
13
+ </manifest>
@@ -1,73 +1,73 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5
- * directory of this source tree.
6
- */
7
- package com.freeraspreactnativeexample;
8
-
9
- import android.content.Context;
10
- import com.facebook.flipper.android.AndroidFlipperClient;
11
- import com.facebook.flipper.android.utils.FlipperUtils;
12
- import com.facebook.flipper.core.FlipperClient;
13
- import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14
- import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15
- import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16
- import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17
- import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18
- import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19
- import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20
- import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21
- import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22
- import com.facebook.react.ReactInstanceEventListener;
23
- import com.facebook.react.ReactInstanceManager;
24
- import com.facebook.react.bridge.ReactContext;
25
- import com.facebook.react.modules.network.NetworkingModule;
26
- import okhttp3.OkHttpClient;
27
-
28
- public class ReactNativeFlipper {
29
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
30
- if (FlipperUtils.shouldEnableFlipper(context)) {
31
- final FlipperClient client = AndroidFlipperClient.getInstance(context);
32
-
33
- client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
34
- client.addPlugin(new ReactFlipperPlugin());
35
- client.addPlugin(new DatabasesFlipperPlugin(context));
36
- client.addPlugin(new SharedPreferencesFlipperPlugin(context));
37
- client.addPlugin(CrashReporterPlugin.getInstance());
38
-
39
- NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
40
- NetworkingModule.setCustomClientBuilder(
41
- new NetworkingModule.CustomClientBuilder() {
42
- @Override
43
- public void apply(OkHttpClient.Builder builder) {
44
- builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
45
- }
46
- });
47
- client.addPlugin(networkFlipperPlugin);
48
- client.start();
49
-
50
- // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
51
- // Hence we run if after all native modules have been initialized
52
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
53
- if (reactContext == null) {
54
- reactInstanceManager.addReactInstanceEventListener(
55
- new ReactInstanceEventListener() {
56
- @Override
57
- public void onReactContextInitialized(ReactContext reactContext) {
58
- reactInstanceManager.removeReactInstanceEventListener(this);
59
- reactContext.runOnNativeModulesQueueThread(
60
- new Runnable() {
61
- @Override
62
- public void run() {
63
- client.addPlugin(new FrescoFlipperPlugin());
64
- }
65
- });
66
- }
67
- });
68
- } else {
69
- client.addPlugin(new FrescoFlipperPlugin());
70
- }
71
- }
72
- }
73
- }
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5
+ * directory of this source tree.
6
+ */
7
+ package com.freeraspreactnativeexample;
8
+
9
+ import android.content.Context;
10
+ import com.facebook.flipper.android.AndroidFlipperClient;
11
+ import com.facebook.flipper.android.utils.FlipperUtils;
12
+ import com.facebook.flipper.core.FlipperClient;
13
+ import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14
+ import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15
+ import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16
+ import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17
+ import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18
+ import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19
+ import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20
+ import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21
+ import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22
+ import com.facebook.react.ReactInstanceEventListener;
23
+ import com.facebook.react.ReactInstanceManager;
24
+ import com.facebook.react.bridge.ReactContext;
25
+ import com.facebook.react.modules.network.NetworkingModule;
26
+ import okhttp3.OkHttpClient;
27
+
28
+ public class ReactNativeFlipper {
29
+ public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
30
+ if (FlipperUtils.shouldEnableFlipper(context)) {
31
+ final FlipperClient client = AndroidFlipperClient.getInstance(context);
32
+
33
+ client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
34
+ client.addPlugin(new ReactFlipperPlugin());
35
+ client.addPlugin(new DatabasesFlipperPlugin(context));
36
+ client.addPlugin(new SharedPreferencesFlipperPlugin(context));
37
+ client.addPlugin(CrashReporterPlugin.getInstance());
38
+
39
+ NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
40
+ NetworkingModule.setCustomClientBuilder(
41
+ new NetworkingModule.CustomClientBuilder() {
42
+ @Override
43
+ public void apply(OkHttpClient.Builder builder) {
44
+ builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
45
+ }
46
+ });
47
+ client.addPlugin(networkFlipperPlugin);
48
+ client.start();
49
+
50
+ // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
51
+ // Hence we run if after all native modules have been initialized
52
+ ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
53
+ if (reactContext == null) {
54
+ reactInstanceManager.addReactInstanceEventListener(
55
+ new ReactInstanceEventListener() {
56
+ @Override
57
+ public void onReactContextInitialized(ReactContext reactContext) {
58
+ reactInstanceManager.removeReactInstanceEventListener(this);
59
+ reactContext.runOnNativeModulesQueueThread(
60
+ new Runnable() {
61
+ @Override
62
+ public void run() {
63
+ client.addPlugin(new FrescoFlipperPlugin());
64
+ }
65
+ });
66
+ }
67
+ });
68
+ } else {
69
+ client.addPlugin(new FrescoFlipperPlugin());
70
+ }
71
+ }
72
+ }
73
+ }
@@ -1,26 +1,26 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.freeraspreactnativeexample">
3
-
4
- <uses-permission android:name="android.permission.INTERNET" />
5
-
6
- <application
7
- android:name=".MainApplication"
8
- android:label="@string/app_name"
9
- android:icon="@mipmap/ic_launcher"
10
- android:roundIcon="@mipmap/ic_launcher_round"
11
- android:allowBackup="false"
12
- android:theme="@style/AppTheme">
13
- <activity
14
- android:name=".MainActivity"
15
- android:label="@string/app_name"
16
- android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
17
- android:launchMode="singleTask"
18
- android:windowSoftInputMode="adjustResize"
19
- android:exported="true">
20
- <intent-filter>
21
- <action android:name="android.intent.action.MAIN" />
22
- <category android:name="android.intent.category.LAUNCHER" />
23
- </intent-filter>
24
- </activity>
25
- </application>
26
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.freeraspreactnativeexample">
3
+
4
+ <uses-permission android:name="android.permission.INTERNET" />
5
+
6
+ <application
7
+ android:name=".MainApplication"
8
+ android:label="@string/app_name"
9
+ android:icon="@mipmap/ic_launcher"
10
+ android:roundIcon="@mipmap/ic_launcher_round"
11
+ android:allowBackup="false"
12
+ android:theme="@style/AppTheme">
13
+ <activity
14
+ android:name=".MainActivity"
15
+ android:label="@string/app_name"
16
+ android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
17
+ android:launchMode="singleTask"
18
+ android:windowSoftInputMode="adjustResize"
19
+ android:exported="true">
20
+ <intent-filter>
21
+ <action android:name="android.intent.action.MAIN" />
22
+ <category android:name="android.intent.category.LAUNCHER" />
23
+ </intent-filter>
24
+ </activity>
25
+ </application>
26
+ </manifest>
@@ -1,48 +1,48 @@
1
- package com.freeraspreactnativeexample;
2
-
3
- import com.facebook.react.ReactActivity;
4
- import com.facebook.react.ReactActivityDelegate;
5
- import com.facebook.react.ReactRootView;
6
-
7
- public class MainActivity extends ReactActivity {
8
-
9
- /**
10
- * Returns the name of the main component registered from JavaScript. This is used to schedule
11
- * rendering of the component.
12
- */
13
- @Override
14
- protected String getMainComponentName() {
15
- return "FreeraspReactNativeExample";
16
- }
17
-
18
- /**
19
- * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
20
- * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
21
- * (Paper).
22
- */
23
- @Override
24
- protected ReactActivityDelegate createReactActivityDelegate() {
25
- return new MainActivityDelegate(this, getMainComponentName());
26
- }
27
-
28
- public static class MainActivityDelegate extends ReactActivityDelegate {
29
- public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
30
- super(activity, mainComponentName);
31
- }
32
-
33
- @Override
34
- protected ReactRootView createRootView() {
35
- ReactRootView reactRootView = new ReactRootView(getContext());
36
- // If you opted-in for the New Architecture, we enable the Fabric Renderer.
37
- reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
38
- return reactRootView;
39
- }
40
-
41
- @Override
42
- protected boolean isConcurrentRootEnabled() {
43
- // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
44
- // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
45
- return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
46
- }
47
- }
48
- }
1
+ package com.freeraspreactnativeexample;
2
+
3
+ import com.facebook.react.ReactActivity;
4
+ import com.facebook.react.ReactActivityDelegate;
5
+ import com.facebook.react.ReactRootView;
6
+
7
+ public class MainActivity extends ReactActivity {
8
+
9
+ /**
10
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
11
+ * rendering of the component.
12
+ */
13
+ @Override
14
+ protected String getMainComponentName() {
15
+ return "FreeraspReactNativeExample";
16
+ }
17
+
18
+ /**
19
+ * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
20
+ * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
21
+ * (Paper).
22
+ */
23
+ @Override
24
+ protected ReactActivityDelegate createReactActivityDelegate() {
25
+ return new MainActivityDelegate(this, getMainComponentName());
26
+ }
27
+
28
+ public static class MainActivityDelegate extends ReactActivityDelegate {
29
+ public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
30
+ super(activity, mainComponentName);
31
+ }
32
+
33
+ @Override
34
+ protected ReactRootView createRootView() {
35
+ ReactRootView reactRootView = new ReactRootView(getContext());
36
+ // If you opted-in for the New Architecture, we enable the Fabric Renderer.
37
+ reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
38
+ return reactRootView;
39
+ }
40
+
41
+ @Override
42
+ protected boolean isConcurrentRootEnabled() {
43
+ // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
44
+ // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
45
+ return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
46
+ }
47
+ }
48
+ }
@@ -1,91 +1,91 @@
1
- package com.freeraspreactnativeexample;
2
-
3
- import android.app.Application;
4
- import android.content.Context;
5
- import com.facebook.react.PackageList;
6
- import com.facebook.react.ReactApplication;
7
- import com.facebook.react.ReactInstanceManager;
8
- import com.facebook.react.ReactNativeHost;
9
- import com.facebook.react.ReactPackage;
10
- import com.facebook.react.config.ReactFeatureFlags;
11
- import com.facebook.soloader.SoLoader;
12
- import com.freeraspreactnativeexample.newarchitecture.MainApplicationReactNativeHost;
13
- import java.lang.reflect.InvocationTargetException;
14
- import java.util.List;
15
-
16
- public class MainApplication extends Application implements ReactApplication {
17
-
18
- private final ReactNativeHost mReactNativeHost =
19
- new ReactNativeHost(this) {
20
- @Override
21
- public boolean getUseDeveloperSupport() {
22
- return BuildConfig.DEBUG;
23
- }
24
-
25
- @Override
26
- protected List<ReactPackage> getPackages() {
27
- @SuppressWarnings("UnnecessaryLocalVariable")
28
- List<ReactPackage> packages = new PackageList(this).getPackages();
29
- // Packages that cannot be autolinked yet can be added manually here, for example:
30
- // packages.add(new FreeRaspNativePackage());
31
- return packages;
32
- }
33
-
34
- @Override
35
- protected String getJSMainModuleName() {
36
- return "index";
37
- }
38
- };
39
-
40
- private final ReactNativeHost mNewArchitectureNativeHost =
41
- new MainApplicationReactNativeHost(this);
42
-
43
- @Override
44
- public ReactNativeHost getReactNativeHost() {
45
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
46
- return mNewArchitectureNativeHost;
47
- } else {
48
- return mReactNativeHost;
49
- }
50
- }
51
-
52
- @Override
53
- public void onCreate() {
54
- super.onCreate();
55
- // If you opted-in for the New Architecture, we enable the TurboModule system
56
- ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
57
- SoLoader.init(this, /* native exopackage */ false);
58
- initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
59
- }
60
-
61
- /**
62
- * Loads Flipper in React Native templates. Call this in the onCreate method with something like
63
- * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
64
- *
65
- * @param context
66
- * @param reactInstanceManager
67
- */
68
- private static void initializeFlipper(
69
- Context context, ReactInstanceManager reactInstanceManager) {
70
- if (BuildConfig.DEBUG) {
71
- try {
72
- /*
73
- We use reflection here to pick up the class that initializes Flipper,
74
- since Flipper library is not available in release mode
75
- */
76
- Class<?> aClass = Class.forName("com.freeraspreactnativeexample.ReactNativeFlipper");
77
- aClass
78
- .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
79
- .invoke(null, context, reactInstanceManager);
80
- } catch (ClassNotFoundException e) {
81
- e.printStackTrace();
82
- } catch (NoSuchMethodException e) {
83
- e.printStackTrace();
84
- } catch (IllegalAccessException e) {
85
- e.printStackTrace();
86
- } catch (InvocationTargetException e) {
87
- e.printStackTrace();
88
- }
89
- }
90
- }
91
- }
1
+ package com.freeraspreactnativeexample;
2
+
3
+ import android.app.Application;
4
+ import android.content.Context;
5
+ import com.facebook.react.PackageList;
6
+ import com.facebook.react.ReactApplication;
7
+ import com.facebook.react.ReactInstanceManager;
8
+ import com.facebook.react.ReactNativeHost;
9
+ import com.facebook.react.ReactPackage;
10
+ import com.facebook.react.config.ReactFeatureFlags;
11
+ import com.facebook.soloader.SoLoader;
12
+ import com.freeraspreactnativeexample.newarchitecture.MainApplicationReactNativeHost;
13
+ import java.lang.reflect.InvocationTargetException;
14
+ import java.util.List;
15
+
16
+ public class MainApplication extends Application implements ReactApplication {
17
+
18
+ private final ReactNativeHost mReactNativeHost =
19
+ new ReactNativeHost(this) {
20
+ @Override
21
+ public boolean getUseDeveloperSupport() {
22
+ return BuildConfig.DEBUG;
23
+ }
24
+
25
+ @Override
26
+ protected List<ReactPackage> getPackages() {
27
+ @SuppressWarnings("UnnecessaryLocalVariable")
28
+ List<ReactPackage> packages = new PackageList(this).getPackages();
29
+ // Packages that cannot be autolinked yet can be added manually here, for example:
30
+ // packages.add(new FreeRaspNativePackage());
31
+ return packages;
32
+ }
33
+
34
+ @Override
35
+ protected String getJSMainModuleName() {
36
+ return "index";
37
+ }
38
+ };
39
+
40
+ private final ReactNativeHost mNewArchitectureNativeHost =
41
+ new MainApplicationReactNativeHost(this);
42
+
43
+ @Override
44
+ public ReactNativeHost getReactNativeHost() {
45
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
46
+ return mNewArchitectureNativeHost;
47
+ } else {
48
+ return mReactNativeHost;
49
+ }
50
+ }
51
+
52
+ @Override
53
+ public void onCreate() {
54
+ super.onCreate();
55
+ // If you opted-in for the New Architecture, we enable the TurboModule system
56
+ ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
57
+ SoLoader.init(this, /* native exopackage */ false);
58
+ initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
59
+ }
60
+
61
+ /**
62
+ * Loads Flipper in React Native templates. Call this in the onCreate method with something like
63
+ * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
64
+ *
65
+ * @param context
66
+ * @param reactInstanceManager
67
+ */
68
+ private static void initializeFlipper(
69
+ Context context, ReactInstanceManager reactInstanceManager) {
70
+ if (BuildConfig.DEBUG) {
71
+ try {
72
+ /*
73
+ We use reflection here to pick up the class that initializes Flipper,
74
+ since Flipper library is not available in release mode
75
+ */
76
+ Class<?> aClass = Class.forName("com.freeraspreactnativeexample.ReactNativeFlipper");
77
+ aClass
78
+ .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
79
+ .invoke(null, context, reactInstanceManager);
80
+ } catch (ClassNotFoundException e) {
81
+ e.printStackTrace();
82
+ } catch (NoSuchMethodException e) {
83
+ e.printStackTrace();
84
+ } catch (IllegalAccessException e) {
85
+ e.printStackTrace();
86
+ } catch (InvocationTargetException e) {
87
+ e.printStackTrace();
88
+ }
89
+ }
90
+ }
91
+ }