iamport-react-native 2.0.15 → 3.0.1-alpha.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 (430) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +12 -2
  3. package/lib/module/components/Certification/index.js +75 -72
  4. package/lib/module/components/Certification/index.js.map +1 -1
  5. package/lib/module/components/ErrorOnParams/index.js +13 -9
  6. package/lib/module/components/ErrorOnParams/index.js.map +1 -1
  7. package/lib/module/components/Loading/index.js +13 -9
  8. package/lib/module/components/Loading/index.js.map +1 -1
  9. package/lib/module/components/Payment/index.js +111 -93
  10. package/lib/module/components/Payment/index.js.map +1 -1
  11. package/lib/module/constants/index.js +2 -0
  12. package/lib/module/constants/index.js.map +1 -1
  13. package/lib/module/index.js +6 -4
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/module/package.json +1 -0
  16. package/lib/module/styles.js +2 -0
  17. package/lib/module/styles.js.map +1 -1
  18. package/lib/module/utils/IamportUrl.js +51 -29
  19. package/lib/module/utils/IamportUrl.js.map +1 -1
  20. package/lib/module/utils/Validation.js +3 -2
  21. package/lib/module/utils/Validation.js.map +1 -1
  22. package/lib/module/utils/ValidationForPayment.js +4 -2
  23. package/lib/module/utils/ValidationForPayment.js.map +1 -1
  24. package/lib/typescript/package.json +1 -0
  25. package/lib/typescript/{components → src/components}/Certification/index.d.ts +1 -2
  26. package/lib/typescript/src/components/Certification/index.d.ts.map +1 -0
  27. package/lib/typescript/src/components/ErrorOnParams/index.d.ts +6 -0
  28. package/lib/typescript/src/components/ErrorOnParams/index.d.ts.map +1 -0
  29. package/lib/typescript/src/components/Loading/index.d.ts +3 -0
  30. package/lib/typescript/src/components/Loading/index.d.ts.map +1 -0
  31. package/lib/typescript/{components → src/components}/Payment/index.d.ts +1 -2
  32. package/lib/typescript/src/components/Payment/index.d.ts.map +1 -0
  33. package/lib/typescript/src/constants/index.d.ts.map +1 -0
  34. package/lib/typescript/src/index.d.ts.map +1 -0
  35. package/lib/typescript/{styles.d.ts → src/styles.d.ts} +2 -2
  36. package/lib/typescript/src/styles.d.ts.map +1 -0
  37. package/lib/typescript/{utils → src/utils}/IamportUrl.d.ts +8 -7
  38. package/lib/typescript/src/utils/IamportUrl.d.ts.map +1 -0
  39. package/lib/typescript/src/utils/Validation.d.ts.map +1 -0
  40. package/lib/typescript/src/utils/ValidationForPayment.d.ts.map +1 -0
  41. package/package.json +81 -74
  42. package/src/components/Certification/index.tsx +7 -7
  43. package/src/components/ErrorOnParams/index.tsx +1 -2
  44. package/src/components/Loading/index.tsx +1 -2
  45. package/src/components/Payment/index.tsx +31 -7
  46. package/src/utils/IamportUrl.ts +54 -26
  47. package/.circleci/config.yml +0 -98
  48. package/.editorconfig +0 -15
  49. package/.gitattributes +0 -3
  50. package/.gitignore +0 -69
  51. package/.yarnrc +0 -3
  52. package/.yarnrc.yml +0 -1
  53. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  54. package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
  55. package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
  56. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  57. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  58. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  59. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  60. package/android/.gradle/8.9/gc.properties +0 -0
  61. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  62. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  63. package/android/.gradle/vcs-1/gc.properties +0 -0
  64. package/android/build.gradle +0 -128
  65. package/android/gradle.properties +0 -4
  66. package/android/src/main/AndroidManifest.xml +0 -4
  67. package/android/src/main/java/com/iamportreactnative/IamportReactNativePackage.kt +0 -17
  68. package/android/src/main/java/com/iamportreactnative/IamportReactNativeViewManager.kt +0 -20
  69. package/babel.config.js +0 -3
  70. package/example/.gitignore +0 -69
  71. package/example/README.md +0 -44
  72. package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  73. package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  74. package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  75. package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  76. package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  77. package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  78. package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  79. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  80. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  81. package/example/android/.gradle/7.5.1/gc.properties +0 -0
  82. package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  83. package/example/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  84. package/example/android/.gradle/vcs-1/gc.properties +0 -0
  85. package/example/android/app/build.gradle +0 -183
  86. package/example/android/app/debug.keystore +0 -0
  87. package/example/android/app/proguard-rules.pro +0 -10
  88. package/example/android/app/src/debug/AndroidManifest.xml +0 -8
  89. package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +0 -69
  90. package/example/android/app/src/main/AndroidManifest.xml +0 -34
  91. package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +0 -15
  92. package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +0 -80
  93. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  94. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  95. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  96. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  97. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  98. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  99. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  100. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  101. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  102. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  103. package/example/android/app/src/main/res/values/strings.xml +0 -3
  104. package/example/android/app/src/main/res/values/styles.xml +0 -9
  105. package/example/android/build.gradle +0 -21
  106. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  107. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  108. package/example/android/gradle.properties +0 -44
  109. package/example/android/gradlew +0 -183
  110. package/example/android/gradlew.bat +0 -103
  111. package/example/android/settings.gradle +0 -9
  112. package/example/app.json +0 -4
  113. package/example/babel.config.js +0 -11
  114. package/example/index.js +0 -5
  115. package/example/ios/File.swift +0 -8
  116. package/example/ios/Gemfile +0 -7
  117. package/example/ios/Gemfile.lock +0 -99
  118. package/example/ios/IamportReactNativeExample/AppDelegate.h +0 -15
  119. package/example/ios/IamportReactNativeExample/AppDelegate.mm +0 -138
  120. package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  121. package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +0 -6
  122. package/example/ios/IamportReactNativeExample/Info.plist +0 -121
  123. package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +0 -58
  124. package/example/ios/IamportReactNativeExample/main.m +0 -16
  125. package/example/ios/IamportReactNativeExample-Bridging-Header.h +0 -3
  126. package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +0 -969
  127. package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +0 -99
  128. package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +0 -10
  129. package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  130. package/example/ios/Podfile +0 -57
  131. package/example/ios/Podfile.lock +0 -756
  132. package/example/metro.config.js +0 -66
  133. package/example/package.json +0 -40
  134. package/example/src/App.tsx +0 -17
  135. package/example/src/Certification/index.tsx +0 -30
  136. package/example/src/CertificationResult/index.tsx +0 -79
  137. package/example/src/CertificationTest/index.tsx +0 -214
  138. package/example/src/Home/index.tsx +0 -87
  139. package/example/src/Loading/index.tsx +0 -12
  140. package/example/src/NavigationService.tsx +0 -127
  141. package/example/src/Payment/index.tsx +0 -28
  142. package/example/src/PaymentResult/index.tsx +0 -96
  143. package/example/src/PaymentTest/index.tsx +0 -383
  144. package/example/src/Picker/index.tsx +0 -60
  145. package/example/src/constants.ts +0 -274
  146. package/example/src/utils.ts +0 -83
  147. package/example/yarn.lock +0 -7358
  148. package/exampleForExpo/.buckconfig +0 -6
  149. package/exampleForExpo/.expo/README.md +0 -8
  150. package/exampleForExpo/.expo/devices.json +0 -3
  151. package/exampleForExpo/.gitattributes +0 -1
  152. package/exampleForExpo/.gitignore +0 -125
  153. package/exampleForExpo/.idea/.gitignore +0 -3
  154. package/exampleForExpo/.idea/caches/deviceStreaming.xml +0 -549
  155. package/exampleForExpo/.idea/exampleForExpo.iml +0 -9
  156. package/exampleForExpo/.idea/misc.xml +0 -6
  157. package/exampleForExpo/.idea/modules.xml +0 -8
  158. package/exampleForExpo/.idea/vcs.xml +0 -6
  159. package/exampleForExpo/.idea/workspace.xml +0 -53
  160. package/exampleForExpo/README.md +0 -58
  161. package/exampleForExpo/__tests__/App.js +0 -10
  162. package/exampleForExpo/android/.gitignore +0 -21
  163. package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  164. package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  165. package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  166. package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
  167. package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
  168. package/exampleForExpo/android/app/BUCK +0 -55
  169. package/exampleForExpo/android/app/build.gradle +0 -362
  170. package/exampleForExpo/android/app/build_defs.bzl +0 -19
  171. package/exampleForExpo/android/app/debug.keystore +0 -0
  172. package/exampleForExpo/android/app/proguard-rules.pro +0 -14
  173. package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +0 -7
  174. package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +0 -69
  175. package/exampleForExpo/android/app/src/main/AndroidManifest.xml +0 -34
  176. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +0 -83
  177. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +0 -106
  178. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +0 -117
  179. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +0 -36
  180. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  181. package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +0 -7
  182. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  183. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  184. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  185. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  186. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  187. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  188. package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +0 -11
  189. package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  190. package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +0 -4
  191. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  192. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  193. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  194. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  195. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  196. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  197. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  198. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  199. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  200. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  201. package/exampleForExpo/android/app/src/main/res/values/colors.xml +0 -4
  202. package/exampleForExpo/android/app/src/main/res/values/strings.xml +0 -3
  203. package/exampleForExpo/android/app/src/main/res/values/styles.xml +0 -17
  204. package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +0 -1
  205. package/exampleForExpo/android/build.gradle +0 -65
  206. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  207. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  208. package/exampleForExpo/android/gradle.properties +0 -53
  209. package/exampleForExpo/android/gradlew +0 -240
  210. package/exampleForExpo/android/gradlew.bat +0 -91
  211. package/exampleForExpo/android/settings.gradle +0 -17
  212. package/exampleForExpo/app.json +0 -16
  213. package/exampleForExpo/babel.config.js +0 -11
  214. package/exampleForExpo/index.js +0 -9
  215. package/exampleForExpo/ios/.gitignore +0 -30
  216. package/exampleForExpo/ios/.xcode.env +0 -11
  217. package/exampleForExpo/ios/Podfile +0 -61
  218. package/exampleForExpo/ios/Podfile.lock +0 -734
  219. package/exampleForExpo/ios/Podfile.properties.json +0 -3
  220. package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +0 -9
  221. package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +0 -166
  222. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  223. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +0 -6
  224. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
  225. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  226. package/exampleForExpo/ios/exampleForExpo/Info.plist +0 -118
  227. package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +0 -43
  228. package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +0 -16
  229. package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +0 -8
  230. package/exampleForExpo/ios/exampleForExpo/main.m +0 -10
  231. package/exampleForExpo/ios/exampleForExpo/noop-file.swift +0 -4
  232. package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +0 -544
  233. package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +0 -88
  234. package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +0 -10
  235. package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  236. package/exampleForExpo/metro.config.js +0 -62
  237. package/exampleForExpo/package.json +0 -40
  238. package/exampleForExpo/src/App.js +0 -14
  239. package/exampleForExpo/src/Certification/index.js +0 -25
  240. package/exampleForExpo/src/CertificationResult/index.js +0 -61
  241. package/exampleForExpo/src/CertificationTest/index.js +0 -151
  242. package/exampleForExpo/src/Home/index.js +0 -80
  243. package/exampleForExpo/src/Loading/index.js +0 -10
  244. package/exampleForExpo/src/NavigationService.js +0 -102
  245. package/exampleForExpo/src/Payment/index.js +0 -23
  246. package/exampleForExpo/src/PaymentResult/index.js +0 -82
  247. package/exampleForExpo/src/PaymentTest/index.js +0 -313
  248. package/exampleForExpo/src/Picker/index.js +0 -19
  249. package/exampleForExpo/src/constants.js +0 -322
  250. package/exampleForExpo/src/utils.js +0 -116
  251. package/exampleForExpo/yarn.lock +0 -9498
  252. package/exampleForManagedExpo/.expo-shared/assets.json +0 -4
  253. package/exampleForManagedExpo/.gitignore +0 -22
  254. package/exampleForManagedExpo/App.js +0 -11
  255. package/exampleForManagedExpo/README.md +0 -33
  256. package/exampleForManagedExpo/app.json +0 -90
  257. package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
  258. package/exampleForManagedExpo/assets/favicon.png +0 -0
  259. package/exampleForManagedExpo/assets/icon.png +0 -0
  260. package/exampleForManagedExpo/assets/splash.png +0 -0
  261. package/exampleForManagedExpo/babel.config.js +0 -11
  262. package/exampleForManagedExpo/metro.config.js +0 -62
  263. package/exampleForManagedExpo/package.json +0 -36
  264. package/exampleForManagedExpo/src/Certification/index.js +0 -25
  265. package/exampleForManagedExpo/src/CertificationResult/index.js +0 -61
  266. package/exampleForManagedExpo/src/CertificationTest/index.js +0 -151
  267. package/exampleForManagedExpo/src/Home/index.js +0 -80
  268. package/exampleForManagedExpo/src/Loading/index.js +0 -10
  269. package/exampleForManagedExpo/src/NavigationService.js +0 -102
  270. package/exampleForManagedExpo/src/Payment/index.js +0 -23
  271. package/exampleForManagedExpo/src/PaymentResult/index.js +0 -82
  272. package/exampleForManagedExpo/src/PaymentTest/index.js +0 -313
  273. package/exampleForManagedExpo/src/Picker/index.js +0 -19
  274. package/exampleForManagedExpo/src/constants.js +0 -322
  275. package/exampleForManagedExpo/src/utils.js +0 -116
  276. package/exampleForManagedExpo/yarn.lock +0 -9411
  277. package/exampleForWebView/.buckconfig +0 -6
  278. package/exampleForWebView/.eslintrc.js +0 -4
  279. package/exampleForWebView/.gitattributes +0 -3
  280. package/exampleForWebView/.gitignore +0 -68
  281. package/exampleForWebView/.prettierrc.js +0 -7
  282. package/exampleForWebView/.watchmanconfig +0 -1
  283. package/exampleForWebView/README.md +0 -77
  284. package/exampleForWebView/__tests__/App-test.tsx +0 -14
  285. package/exampleForWebView/_editorconfig +0 -3
  286. package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  287. package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  288. package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  289. package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
  290. package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
  291. package/exampleForWebView/android/app/BUCK +0 -55
  292. package/exampleForWebView/android/app/build.gradle +0 -313
  293. package/exampleForWebView/android/app/build_defs.bzl +0 -19
  294. package/exampleForWebView/android/app/debug.keystore +0 -0
  295. package/exampleForWebView/android/app/proguard-rules.pro +0 -10
  296. package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +0 -13
  297. package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +0 -73
  298. package/exampleForWebView/android/app/src/main/AndroidManifest.xml +0 -26
  299. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +0 -48
  300. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +0 -91
  301. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +0 -116
  302. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +0 -36
  303. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  304. package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +0 -7
  305. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  306. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  307. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  308. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  309. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  310. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  311. package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +0 -11
  312. package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  313. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  314. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  315. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  316. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  317. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  318. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  319. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  320. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  321. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  322. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  323. package/exampleForWebView/android/app/src/main/res/values/strings.xml +0 -3
  324. package/exampleForWebView/android/app/src/main/res/values/styles.xml +0 -9
  325. package/exampleForWebView/android/build.gradle +0 -51
  326. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  327. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  328. package/exampleForWebView/android/gradle.properties +0 -40
  329. package/exampleForWebView/android/gradlew +0 -234
  330. package/exampleForWebView/android/gradlew.bat +0 -89
  331. package/exampleForWebView/android/settings.gradle +0 -11
  332. package/exampleForWebView/app.json +0 -4
  333. package/exampleForWebView/babel.config.js +0 -11
  334. package/exampleForWebView/index.js +0 -9
  335. package/exampleForWebView/ios/.xcode.env +0 -11
  336. package/exampleForWebView/ios/Podfile +0 -43
  337. package/exampleForWebView/ios/Podfile.lock +0 -748
  338. package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +0 -8
  339. package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +0 -133
  340. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  341. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +0 -6
  342. package/exampleForWebView/ios/exampleForWebView/Info.plist +0 -96
  343. package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +0 -47
  344. package/exampleForWebView/ios/exampleForWebView/main.m +0 -10
  345. package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +0 -723
  346. package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +0 -88
  347. package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +0 -10
  348. package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  349. package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +0 -24
  350. package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +0 -66
  351. package/exampleForWebView/manuals/CERTIFICATION.md +0 -223
  352. package/exampleForWebView/manuals/PAYMENT.md +0 -232
  353. package/exampleForWebView/metro.config.js +0 -61
  354. package/exampleForWebView/package.json +0 -54
  355. package/exampleForWebView/src/App.tsx +0 -50
  356. package/exampleForWebView/src/Certification.tsx +0 -54
  357. package/exampleForWebView/src/Home.tsx +0 -49
  358. package/exampleForWebView/src/Loading.tsx +0 -23
  359. package/exampleForWebView/src/Payment.tsx +0 -65
  360. package/exampleForWebView/yarn.lock +0 -7362
  361. package/iamport-react-native.podspec +0 -19
  362. package/ios/IamportReactNative-Bridging-Header.h +0 -1
  363. package/ios/IamportReactNative.xcodeproj/project.pbxproj +0 -293
  364. package/ios/IamportReactNativeViewManager.m +0 -12
  365. package/ios/IamportReactNativeViewManager.swift +0 -32
  366. package/lib/commonjs/components/Certification/index.js +0 -121
  367. package/lib/commonjs/components/Certification/index.js.map +0 -1
  368. package/lib/commonjs/components/ErrorOnParams/index.js +0 -50
  369. package/lib/commonjs/components/ErrorOnParams/index.js.map +0 -1
  370. package/lib/commonjs/components/Loading/index.js +0 -34
  371. package/lib/commonjs/components/Loading/index.js.map +0 -1
  372. package/lib/commonjs/components/Payment/index.js +0 -225
  373. package/lib/commonjs/components/Payment/index.js.map +0 -1
  374. package/lib/commonjs/constants/index.js +0 -114
  375. package/lib/commonjs/constants/index.js.map +0 -1
  376. package/lib/commonjs/img/iamport-logo.png +0 -0
  377. package/lib/commonjs/index.js +0 -29
  378. package/lib/commonjs/index.js.map +0 -1
  379. package/lib/commonjs/styles.js +0 -27
  380. package/lib/commonjs/styles.js.map +0 -1
  381. package/lib/commonjs/utils/IamportUrl.js +0 -289
  382. package/lib/commonjs/utils/IamportUrl.js.map +0 -1
  383. package/lib/commonjs/utils/Validation.js +0 -109
  384. package/lib/commonjs/utils/Validation.js.map +0 -1
  385. package/lib/commonjs/utils/ValidationForPayment.js +0 -112
  386. package/lib/commonjs/utils/ValidationForPayment.js.map +0 -1
  387. package/lib/typescript/components/Certification/index.d.ts.map +0 -1
  388. package/lib/typescript/components/ErrorOnParams/index.d.ts +0 -7
  389. package/lib/typescript/components/ErrorOnParams/index.d.ts.map +0 -1
  390. package/lib/typescript/components/Loading/index.d.ts +0 -4
  391. package/lib/typescript/components/Loading/index.d.ts.map +0 -1
  392. package/lib/typescript/components/Payment/index.d.ts.map +0 -1
  393. package/lib/typescript/constants/index.d.ts.map +0 -1
  394. package/lib/typescript/index.d.ts.map +0 -1
  395. package/lib/typescript/styles.d.ts.map +0 -1
  396. package/lib/typescript/utils/IamportUrl.d.ts.map +0 -1
  397. package/lib/typescript/utils/Validation.d.ts.map +0 -1
  398. package/lib/typescript/utils/ValidationForPayment.d.ts.map +0 -1
  399. package/manuals/CALLBACK.md +0 -72
  400. package/manuals/EXAMPLE.md +0 -168
  401. package/manuals/EXPO.md +0 -246
  402. package/manuals/INSTALL.md +0 -31
  403. package/manuals/SETTING.md +0 -140
  404. package/manuals/SUPPORT.md +0 -35
  405. package/manuals/TRANS.md +0 -77
  406. package/manuals/VERSION.md +0 -187
  407. package/manuals/assets/after-linking-iamport.png +0 -0
  408. package/manuals/assets/after-linking-webview.png +0 -0
  409. package/manuals/assets/allow-arbitrary.gif +0 -0
  410. package/manuals/assets/android-studio-avd-manager.png +0 -0
  411. package/manuals/assets/android-studio-build.png +0 -0
  412. package/manuals/assets/app-scheme-registry.gif +0 -0
  413. package/manuals/assets/expo-eject.png +0 -0
  414. package/manuals/assets/ios-emulator-certification.png +0 -0
  415. package/manuals/assets/ios-emulator-home.png +0 -0
  416. package/manuals/assets/ios-emulator-payment.png +0 -0
  417. package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
  418. package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
  419. package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
  420. package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
  421. package/manuals/assets/ios-trans-result.png +0 -0
  422. package/manuals/assets/webview-peer-dependency.png +0 -0
  423. package/scripts/bootstrap.js +0 -24
  424. package/tsconfig.build.json +0 -9
  425. package/tsconfig.json +0 -26
  426. package/yarn.lock +0 -6174
  427. /package/lib/typescript/{constants → src/constants}/index.d.ts +0 -0
  428. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  429. /package/lib/typescript/{utils → src/utils}/Validation.d.ts +0 -0
  430. /package/lib/typescript/{utils → src/utils}/ValidationForPayment.d.ts +0 -0
@@ -1,6 +0,0 @@
1
-
2
- [android]
3
- target = Google Inc.:Google APIs:23
4
-
5
- [maven_repositories]
6
- central = https://repo1.maven.org/maven2
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: '@react-native-community',
4
- };
@@ -1,3 +0,0 @@
1
- # Windows files should use crlf line endings
2
- # https://help.github.com/articles/dealing-with-line-endings/
3
- *.bat text eol=crlf
@@ -1,68 +0,0 @@
1
- # OSX
2
- #
3
- .DS_Store
4
-
5
- # Xcode
6
- #
7
- build/
8
- *.pbxuser
9
- !default.pbxuser
10
- *.mode1v3
11
- !default.mode1v3
12
- *.mode2v3
13
- !default.mode2v3
14
- *.perspectivev3
15
- !default.perspectivev3
16
- xcuserdata
17
- *.xccheckout
18
- *.moved-aside
19
- DerivedData
20
- *.hmap
21
- *.ipa
22
- *.xcuserstate
23
-
24
- # Android/IntelliJ
25
- #
26
- build/
27
- .idea
28
- .gradle
29
- local.properties
30
- *.iml
31
-
32
- # node.js
33
- #
34
- node_modules/
35
- npm-debug.log
36
- yarn-error.log
37
-
38
- # BUCK
39
- buck-out/
40
- \.buckd/
41
- *.keystore
42
- !debug.keystore
43
-
44
- # fastlane
45
- #
46
- # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47
- # screenshots whenever they are needed.
48
- # For more information about the recommended setup visit:
49
- # https://docs.fastlane.tools/best-practices/source-control/
50
-
51
- */fastlane/report.xml
52
- */fastlane/Preview.html
53
- */fastlane/screenshots
54
-
55
- # Bundle artifact
56
- *.jsbundle
57
-
58
- # CocoaPods
59
- /ios/Pods/
60
-
61
- # yarn
62
- .yarn/*
63
- !.yarn/cache
64
- !.yarn/patches
65
- !.yarn/plugins
66
- !.yarn/releases
67
- !.yarn/sdks
68
- !.yarn/versions
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- bracketSpacing: false,
3
- jsxBracketSameLine: true,
4
- singleQuote: true,
5
- trailingComma: 'all',
6
- arrowParens: 'avoid',
7
- };
@@ -1 +0,0 @@
1
- {}
@@ -1,77 +0,0 @@
1
- # exampleForWebView 프로젝트
2
-
3
- `iamport-react-native` 예제입니다.
4
-
5
- 리액트 네이티브로 앱을 만들때, 기존에 만들어진 웹 페이지를 웹뷰로 띄워 재사용하는 경우가 있습니다.
6
- 이 경우, 외부 앱(간편결제, 카드사 앱 등)과 통신하기 위해 네이티브 코드를 추가로 작성해야 합니다.
7
- 이 과정이 꽤 번거롭기 때문에 아임포트는 웹에서 리액트 네이티브로 post message를 보내는 방식을 권장하고 있습니다.
8
-
9
- 이 예제는 해당 내용이 구현된 리액트 결제/본인인증 테스트용 웹앱 예제 [iamport-react-example](https://github.com/iamport/iamport-react-example)과 함께 실행할 수 있습니다.
10
-
11
- ## iamport-react-example 실행
12
-
13
- `iamport-react-example` 프로젝트를 clone 후 실행합니다.
14
- ```shell
15
- $ git clone https://github.com/iamport/iamport-react-example
16
- $ cd iamport-react-example
17
- $ npm install
18
- $ npm start
19
- ```
20
-
21
- ## exampleForWebView 실행
22
-
23
- `iamport-react-native` 레포를 clone받은 후 프로젝트의 `exampleForWebView` 폴더 안으로 이동합니다.
24
- ```shell
25
- $ git clone https://github.com/iamport/iamport-react-native
26
- $ cd iamport-react-native/exampleForWebView
27
- ```
28
-
29
- 필요한 npm 모듈을 설치합니다.
30
- ```shell
31
- $ yarn
32
- ```
33
-
34
- `exampleForWebView` 프로젝트의 최상위 `HOME` 컴포넌트에서 웹뷰 source URL을 설정합니다.
35
- 테스트를 위해 `iamport-react-example`을 실행했을 때 표시되는 URL로 수정합니다.
36
- 실제 릴리즈 모드에서는 가맹점 도메인으로 변경해야 합니다.
37
- ```js
38
- import React from 'react';
39
- import WebView from 'react-native-webview';
40
-
41
- function Home() {
42
- const domain = `http://${가맹점 IP}`;
43
- ...
44
- }
45
-
46
- export default Home;
47
- ```
48
-
49
- 앱을 빌드하고 실행하기 전 Metro를 실행합니다.
50
- ```shell
51
- $ yarn start
52
- ```
53
-
54
- 각 환경에 맞게 앱을 빌드합니다.
55
-
56
- ### iOS
57
-
58
- - Xcode를 설치합니다.
59
- - 필요한 CocoaPod 라이브러리를 설치합니다.
60
- ```shell
61
- $ cd ios
62
- $ pod install
63
- ```
64
- - Xcode에서 `ios/exxampleForWebView.xcworkspace`를 오픈합니다.
65
- - 빌드 타깃을 선택하고 앱을 빋드 후 실행합니다.
66
-
67
- ### 안드로이드
68
-
69
- - Android Studio를 설치합니다.
70
- - Android Studio에서 `android`폴더를 오픈합니다.
71
- - 빌드 타깃을 선택하고 앱을 빌드 후 실행합니다.
72
-
73
- 아래는 위와 같이 웹 페이지를 리액트 네이티브에서 웹뷰로 띄워 재활용할때, 아임포트 결제 및 휴대폰 본인인증을 연동하는 과정을 설명합니다.
74
- 이해를 돕기 위해 앞서 소개한 `iamport-react-example` 웹앱과 `exampleForWebView` 프로젝트 코드를 예시로 사용합니다.
75
-
76
- - [결제 웹 페이지 재활용하기](./manuals/PAYMENT.md)
77
- - [휴대폰 본인인증 웹 페이지 재활용하기](./manuals/CERTIFICATION.md)
@@ -1,14 +0,0 @@
1
- /**
2
- * @format
3
- */
4
-
5
- import 'react-native';
6
- import React from 'react';
7
- import App from '../src/App';
8
-
9
- // Note: test renderer must be required after react-native.
10
- import renderer from 'react-test-renderer';
11
-
12
- it('renders correctly', () => {
13
- renderer.create(<App />);
14
- });
@@ -1,3 +0,0 @@
1
- # Windows files
2
- [*.bat]
3
- end_of_line = crlf
@@ -1,55 +0,0 @@
1
- # To learn about Buck see [Docs](https://buckbuild.com/).
2
- # To run your application with Buck:
3
- # - install Buck
4
- # - `npm start` - to start the packager
5
- # - `cd android`
6
- # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7
- # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8
- # - `buck install -r android/app` - compile, install and run application
9
- #
10
-
11
- load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
-
13
- lib_deps = []
14
-
15
- create_aar_targets(glob(["libs/*.aar"]))
16
-
17
- create_jar_targets(glob(["libs/*.jar"]))
18
-
19
- android_library(
20
- name = "all-libs",
21
- exported_deps = lib_deps,
22
- )
23
-
24
- android_library(
25
- name = "app-code",
26
- srcs = glob([
27
- "src/main/java/**/*.java",
28
- ]),
29
- deps = [
30
- ":all-libs",
31
- ":build_config",
32
- ":res",
33
- ],
34
- )
35
-
36
- android_build_config(
37
- name = "build_config",
38
- package = "com.exampleforwebview",
39
- )
40
-
41
- android_resource(
42
- name = "res",
43
- package = "com.exampleforwebview",
44
- res = "src/main/res",
45
- )
46
-
47
- android_binary(
48
- name = "app",
49
- keystore = "//android/keystores:debug",
50
- manifest = "src/main/AndroidManifest.xml",
51
- package_type = "debug",
52
- deps = [
53
- ":app-code",
54
- ],
55
- )
@@ -1,313 +0,0 @@
1
- apply plugin: "com.android.application"
2
-
3
- import com.android.build.OutputFile
4
- import org.apache.tools.ant.taskdefs.condition.Os
5
-
6
- /**
7
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
8
- * and bundleReleaseJsAndAssets).
9
- * These basically call `react-native bundle` with the correct arguments during the Android build
10
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
11
- * bundle directly from the development server. Below you can see all the possible configurations
12
- * and their defaults. If you decide to add a configuration block, make sure to add it before the
13
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
14
- *
15
- * project.ext.react = [
16
- * // the name of the generated asset file containing your JS bundle
17
- * bundleAssetName: "index.android.bundle",
18
- *
19
- * // the entry file for bundle generation. If none specified and
20
- * // "index.android.js" exists, it will be used. Otherwise "index.js" is
21
- * // default. Can be overridden with ENTRY_FILE environment variable.
22
- * entryFile: "index.android.js",
23
- *
24
- * // https://reactnative.dev/docs/performance#enable-the-ram-format
25
- * bundleCommand: "ram-bundle",
26
- *
27
- * // whether to bundle JS and assets in debug mode
28
- * bundleInDebug: false,
29
- *
30
- * // whether to bundle JS and assets in release mode
31
- * bundleInRelease: true,
32
- *
33
- * // whether to bundle JS and assets in another build variant (if configured).
34
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
35
- * // The configuration property can be in the following formats
36
- * // 'bundleIn${productFlavor}${buildType}'
37
- * // 'bundleIn${buildType}'
38
- * // bundleInFreeDebug: true,
39
- * // bundleInPaidRelease: true,
40
- * // bundleInBeta: true,
41
- *
42
- * // whether to disable dev mode in custom build variants (by default only disabled in release)
43
- * // for example: to disable dev mode in the staging build type (if configured)
44
- * devDisabledInStaging: true,
45
- * // The configuration property can be in the following formats
46
- * // 'devDisabledIn${productFlavor}${buildType}'
47
- * // 'devDisabledIn${buildType}'
48
- *
49
- * // the root of your project, i.e. where "package.json" lives
50
- * root: "../../",
51
- *
52
- * // where to put the JS bundle asset in debug mode
53
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
54
- *
55
- * // where to put the JS bundle asset in release mode
56
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
57
- *
58
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
59
- * // require('./image.png')), in debug mode
60
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
61
- *
62
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
63
- * // require('./image.png')), in release mode
64
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
65
- *
66
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
67
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
68
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle
69
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
70
- * // for example, you might want to remove it from here.
71
- * inputExcludes: ["android/**", "ios/**"],
72
- *
73
- * // override which node gets called and with what additional arguments
74
- * nodeExecutableAndArgs: ["node"],
75
- *
76
- * // supply additional arguments to the packager
77
- * extraPackagerArgs: []
78
- * ]
79
- */
80
-
81
- project.ext.react = [
82
- enableHermes: true, // clean and rebuild if changing
83
- ]
84
-
85
- apply from: "../../node_modules/react-native/react.gradle"
86
-
87
- /**
88
- * Set this to true to create two separate APKs instead of one:
89
- * - An APK that only works on ARM devices
90
- * - An APK that only works on x86 devices
91
- * The advantage is the size of the APK is reduced by about 4MB.
92
- * Upload all the APKs to the Play Store and people will download
93
- * the correct one based on the CPU architecture of their device.
94
- */
95
- def enableSeparateBuildPerCPUArchitecture = false
96
-
97
- /**
98
- * Run Proguard to shrink the Java bytecode in release builds.
99
- */
100
- def enableProguardInReleaseBuilds = false
101
-
102
- /**
103
- * The preferred build flavor of JavaScriptCore.
104
- *
105
- * For example, to use the international variant, you can use:
106
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
107
- *
108
- * The international variant includes ICU i18n library and necessary data
109
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
110
- * give correct results when using with locales other than en-US. Note that
111
- * this variant is about 6MiB larger per architecture than default.
112
- */
113
- def jscFlavor = 'org.webkit:android-jsc:+'
114
-
115
- /**
116
- * Whether to enable the Hermes VM.
117
- *
118
- * This should be set on project.ext.react and that value will be read here. If it is not set
119
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
120
- * and the benefits of using Hermes will therefore be sharply reduced.
121
- */
122
- def enableHermes = project.ext.react.get("enableHermes", false);
123
-
124
- /**
125
- * Architectures to build native code for.
126
- */
127
- def reactNativeArchitectures() {
128
- def value = project.getProperties().get("reactNativeArchitectures")
129
- return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
130
- }
131
-
132
- android {
133
- ndkVersion rootProject.ext.ndkVersion
134
-
135
- compileSdkVersion rootProject.ext.compileSdkVersion
136
-
137
- defaultConfig {
138
- applicationId "com.exampleforwebview"
139
- minSdkVersion rootProject.ext.minSdkVersion
140
- targetSdkVersion rootProject.ext.targetSdkVersion
141
- versionCode 1
142
- versionName "1.0"
143
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
144
-
145
- if (isNewArchitectureEnabled()) {
146
- // We configure the CMake build only if you decide to opt-in for the New Architecture.
147
- externalNativeBuild {
148
- cmake {
149
- arguments "-DPROJECT_BUILD_DIR=$buildDir",
150
- "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
151
- "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
152
- "-DNODE_MODULES_DIR=$rootDir/../node_modules",
153
- "-DANDROID_STL=c++_shared"
154
- }
155
- }
156
- if (!enableSeparateBuildPerCPUArchitecture) {
157
- ndk {
158
- abiFilters (*reactNativeArchitectures())
159
- }
160
- }
161
- }
162
- }
163
-
164
- if (isNewArchitectureEnabled()) {
165
- // We configure the NDK build only if you decide to opt-in for the New Architecture.
166
- externalNativeBuild {
167
- cmake {
168
- path "$projectDir/src/main/jni/CMakeLists.txt"
169
- }
170
- }
171
- def reactAndroidProjectDir = project(':ReactAndroid').projectDir
172
- def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
173
- dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
174
- from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
175
- into("$buildDir/react-ndk/exported")
176
- }
177
- def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
178
- dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
179
- from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
180
- into("$buildDir/react-ndk/exported")
181
- }
182
- afterEvaluate {
183
- // If you wish to add a custom TurboModule or component locally,
184
- // you should uncomment this line.
185
- // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
186
- preDebugBuild.dependsOn(packageReactNdkDebugLibs)
187
- preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
188
-
189
- // Due to a bug inside AGP, we have to explicitly set a dependency
190
- // between configureCMakeDebug* tasks and the preBuild tasks.
191
- // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
192
- configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
193
- configureCMakeDebug.dependsOn(preDebugBuild)
194
- reactNativeArchitectures().each { architecture ->
195
- tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
196
- dependsOn("preDebugBuild")
197
- }
198
- tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
199
- dependsOn("preReleaseBuild")
200
- }
201
- }
202
- }
203
- }
204
-
205
- splits {
206
- abi {
207
- reset()
208
- enable enableSeparateBuildPerCPUArchitecture
209
- universalApk false // If true, also generate a universal APK
210
- include (*reactNativeArchitectures())
211
- }
212
- }
213
- signingConfigs {
214
- debug {
215
- storeFile file('debug.keystore')
216
- storePassword 'android'
217
- keyAlias 'androiddebugkey'
218
- keyPassword 'android'
219
- }
220
- }
221
- buildTypes {
222
- debug {
223
- signingConfig signingConfigs.debug
224
- }
225
- release {
226
- // Caution! In production, you need to generate your own keystore file.
227
- // see https://reactnative.dev/docs/signed-apk-android.
228
- signingConfig signingConfigs.debug
229
- minifyEnabled enableProguardInReleaseBuilds
230
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
231
- }
232
- }
233
-
234
- // applicationVariants are e.g. debug, release
235
- applicationVariants.all { variant ->
236
- variant.outputs.each { output ->
237
- // For each separate APK per architecture, set a unique version code as described here:
238
- // https://developer.android.com/studio/build/configure-apk-splits.html
239
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
240
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
241
- def abi = output.getFilter(OutputFile.ABI)
242
- if (abi != null) { // null for the universal-debug, universal-release variants
243
- output.versionCodeOverride =
244
- defaultConfig.versionCode * 1000 + versionCodes.get(abi)
245
- }
246
-
247
- }
248
- }
249
- }
250
-
251
- dependencies {
252
- implementation fileTree(dir: "libs", include: ["*.jar"])
253
-
254
- //noinspection GradleDynamicVersion
255
- implementation "com.facebook.react:react-native:+" // From node_modules
256
-
257
- implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
258
-
259
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
260
- exclude group:'com.facebook.fbjni'
261
- }
262
-
263
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
264
- exclude group:'com.facebook.flipper'
265
- exclude group:'com.squareup.okhttp3', module:'okhttp'
266
- }
267
-
268
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
269
- exclude group:'com.facebook.flipper'
270
- }
271
-
272
- if (enableHermes) {
273
- //noinspection GradleDynamicVersion
274
- implementation("com.facebook.react:hermes-engine:+") { // From node_modules
275
- exclude group:'com.facebook.fbjni'
276
- }
277
- } else {
278
- implementation jscFlavor
279
- }
280
- }
281
-
282
- if (isNewArchitectureEnabled()) {
283
- // If new architecture is enabled, we let you build RN from source
284
- // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
285
- // This will be applied to all the imported transtitive dependency.
286
- configurations.all {
287
- resolutionStrategy.dependencySubstitution {
288
- substitute(module("com.facebook.react:react-native"))
289
- .using(project(":ReactAndroid"))
290
- .because("On New Architecture we're building React Native from source")
291
- substitute(module("com.facebook.react:hermes-engine"))
292
- .using(project(":ReactAndroid:hermes-engine"))
293
- .because("On New Architecture we're building Hermes from source")
294
- }
295
- }
296
- }
297
-
298
- // Run this once to be able to run the application with BUCK
299
- // puts all compile dependencies into folder libs for BUCK to use
300
- task copyDownloadableDepsToLibs(type: Copy) {
301
- from configurations.implementation
302
- into 'libs'
303
- }
304
-
305
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
306
-
307
- def isNewArchitectureEnabled() {
308
- // To opt-in for the New Architecture, you can either:
309
- // - Set `newArchEnabled` to true inside the `gradle.properties` file
310
- // - Invoke gradle with `-newArchEnabled=true`
311
- // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
312
- return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
313
- }
@@ -1,19 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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>