iamport-react-native 2.0.13 → 2.0.14

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 (376) hide show
  1. package/.circleci/config.yml +98 -0
  2. package/.editorconfig +15 -0
  3. package/.gitattributes +3 -0
  4. package/.gitignore +69 -0
  5. package/.yarnrc +3 -0
  6. package/.yarnrc.yml +1 -0
  7. package/README.md +1 -1
  8. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  9. package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
  10. package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
  11. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  12. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  13. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  14. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  15. package/android/.gradle/8.9/gc.properties +0 -0
  16. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  17. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  18. package/android/.gradle/vcs-1/gc.properties +0 -0
  19. package/babel.config.js +3 -0
  20. package/example/.gitignore +69 -0
  21. package/example/README.md +44 -0
  22. package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  23. package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  24. package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  25. package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  26. package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  27. package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  28. package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  29. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  30. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  31. package/example/android/.gradle/7.5.1/gc.properties +0 -0
  32. package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  33. package/example/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  34. package/example/android/.gradle/vcs-1/gc.properties +0 -0
  35. package/example/android/app/build.gradle +183 -0
  36. package/example/android/app/debug.keystore +0 -0
  37. package/example/android/app/proguard-rules.pro +10 -0
  38. package/example/android/app/src/debug/AndroidManifest.xml +8 -0
  39. package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +69 -0
  40. package/example/android/app/src/main/AndroidManifest.xml +34 -0
  41. package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +15 -0
  42. package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +80 -0
  43. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  44. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  45. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  46. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  47. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  48. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  49. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  50. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  51. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  52. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  53. package/example/android/app/src/main/res/values/strings.xml +3 -0
  54. package/example/android/app/src/main/res/values/styles.xml +9 -0
  55. package/example/android/build.gradle +21 -0
  56. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  57. package/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  58. package/example/android/gradle.properties +44 -0
  59. package/example/android/gradlew +183 -0
  60. package/example/android/gradlew.bat +103 -0
  61. package/example/android/settings.gradle +9 -0
  62. package/example/app.json +4 -0
  63. package/example/babel.config.js +11 -0
  64. package/example/index.js +5 -0
  65. package/example/ios/File.swift +8 -0
  66. package/example/ios/Gemfile +7 -0
  67. package/example/ios/Gemfile.lock +99 -0
  68. package/example/ios/IamportReactNativeExample/AppDelegate.h +15 -0
  69. package/example/ios/IamportReactNativeExample/AppDelegate.mm +138 -0
  70. package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  71. package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +6 -0
  72. package/example/ios/IamportReactNativeExample/Info.plist +121 -0
  73. package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +58 -0
  74. package/example/ios/IamportReactNativeExample/main.m +16 -0
  75. package/example/ios/IamportReactNativeExample-Bridging-Header.h +3 -0
  76. package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +969 -0
  77. package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +99 -0
  78. package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -0
  79. package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  80. package/example/ios/Podfile +57 -0
  81. package/example/ios/Podfile.lock +756 -0
  82. package/example/metro.config.js +66 -0
  83. package/example/package.json +40 -0
  84. package/example/src/App.tsx +17 -0
  85. package/example/src/Certification/index.tsx +30 -0
  86. package/example/src/CertificationResult/index.tsx +79 -0
  87. package/example/src/CertificationTest/index.tsx +214 -0
  88. package/example/src/Home/index.tsx +87 -0
  89. package/example/src/Loading/index.tsx +12 -0
  90. package/example/src/NavigationService.tsx +127 -0
  91. package/example/src/Payment/index.tsx +28 -0
  92. package/example/src/PaymentResult/index.tsx +96 -0
  93. package/example/src/PaymentTest/index.tsx +383 -0
  94. package/example/src/Picker/index.tsx +60 -0
  95. package/example/src/constants.ts +274 -0
  96. package/example/src/utils.ts +83 -0
  97. package/example/yarn.lock +7358 -0
  98. package/exampleForExpo/.buckconfig +6 -0
  99. package/exampleForExpo/.expo/README.md +8 -0
  100. package/exampleForExpo/.expo/devices.json +3 -0
  101. package/exampleForExpo/.gitattributes +1 -0
  102. package/exampleForExpo/.gitignore +125 -0
  103. package/exampleForExpo/.idea/.gitignore +3 -0
  104. package/exampleForExpo/.idea/caches/deviceStreaming.xml +549 -0
  105. package/exampleForExpo/.idea/exampleForExpo.iml +9 -0
  106. package/exampleForExpo/.idea/misc.xml +6 -0
  107. package/exampleForExpo/.idea/modules.xml +8 -0
  108. package/exampleForExpo/.idea/vcs.xml +6 -0
  109. package/exampleForExpo/.idea/workspace.xml +53 -0
  110. package/exampleForExpo/README.md +58 -0
  111. package/exampleForExpo/__tests__/App.js +10 -0
  112. package/exampleForExpo/android/.gitignore +21 -0
  113. package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  114. package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  115. package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  116. package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
  117. package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
  118. package/exampleForExpo/android/app/BUCK +55 -0
  119. package/exampleForExpo/android/app/build.gradle +362 -0
  120. package/exampleForExpo/android/app/build_defs.bzl +19 -0
  121. package/exampleForExpo/android/app/debug.keystore +0 -0
  122. package/exampleForExpo/android/app/proguard-rules.pro +14 -0
  123. package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +7 -0
  124. package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +69 -0
  125. package/exampleForExpo/android/app/src/main/AndroidManifest.xml +34 -0
  126. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +83 -0
  127. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +106 -0
  128. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +117 -0
  129. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +36 -0
  130. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
  131. package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +7 -0
  132. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
  133. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
  134. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
  135. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
  136. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
  137. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
  138. package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +11 -0
  139. package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  140. package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +4 -0
  141. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  142. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  143. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  144. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  145. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  146. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  147. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  148. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  149. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  150. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  151. package/exampleForExpo/android/app/src/main/res/values/colors.xml +4 -0
  152. package/exampleForExpo/android/app/src/main/res/values/strings.xml +3 -0
  153. package/exampleForExpo/android/app/src/main/res/values/styles.xml +17 -0
  154. package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +1 -0
  155. package/exampleForExpo/android/build.gradle +65 -0
  156. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  157. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  158. package/exampleForExpo/android/gradle.properties +53 -0
  159. package/exampleForExpo/android/gradlew +240 -0
  160. package/exampleForExpo/android/gradlew.bat +91 -0
  161. package/exampleForExpo/android/settings.gradle +17 -0
  162. package/exampleForExpo/app.json +16 -0
  163. package/exampleForExpo/babel.config.js +11 -0
  164. package/exampleForExpo/index.js +9 -0
  165. package/exampleForExpo/ios/.gitignore +30 -0
  166. package/exampleForExpo/ios/.xcode.env +11 -0
  167. package/exampleForExpo/ios/Podfile +61 -0
  168. package/exampleForExpo/ios/Podfile.lock +734 -0
  169. package/exampleForExpo/ios/Podfile.properties.json +3 -0
  170. package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +9 -0
  171. package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +166 -0
  172. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
  173. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +6 -0
  174. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
  175. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  176. package/exampleForExpo/ios/exampleForExpo/Info.plist +118 -0
  177. package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +43 -0
  178. package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +16 -0
  179. package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +8 -0
  180. package/exampleForExpo/ios/exampleForExpo/main.m +10 -0
  181. package/exampleForExpo/ios/exampleForExpo/noop-file.swift +4 -0
  182. package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +544 -0
  183. package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +88 -0
  184. package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +10 -0
  185. package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  186. package/exampleForExpo/metro.config.js +62 -0
  187. package/exampleForExpo/package.json +40 -0
  188. package/exampleForExpo/src/App.js +14 -0
  189. package/exampleForExpo/src/Certification/index.js +25 -0
  190. package/exampleForExpo/src/CertificationResult/index.js +61 -0
  191. package/exampleForExpo/src/CertificationTest/index.js +151 -0
  192. package/exampleForExpo/src/Home/index.js +80 -0
  193. package/exampleForExpo/src/Loading/index.js +10 -0
  194. package/exampleForExpo/src/NavigationService.js +102 -0
  195. package/exampleForExpo/src/Payment/index.js +23 -0
  196. package/exampleForExpo/src/PaymentResult/index.js +82 -0
  197. package/exampleForExpo/src/PaymentTest/index.js +313 -0
  198. package/exampleForExpo/src/Picker/index.js +19 -0
  199. package/exampleForExpo/src/constants.js +322 -0
  200. package/exampleForExpo/src/utils.js +116 -0
  201. package/exampleForExpo/yarn.lock +9498 -0
  202. package/exampleForManagedExpo/.expo-shared/assets.json +4 -0
  203. package/exampleForManagedExpo/.gitignore +22 -0
  204. package/exampleForManagedExpo/App.js +11 -0
  205. package/exampleForManagedExpo/README.md +33 -0
  206. package/exampleForManagedExpo/app.json +90 -0
  207. package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
  208. package/exampleForManagedExpo/assets/favicon.png +0 -0
  209. package/exampleForManagedExpo/assets/icon.png +0 -0
  210. package/exampleForManagedExpo/assets/splash.png +0 -0
  211. package/exampleForManagedExpo/babel.config.js +11 -0
  212. package/exampleForManagedExpo/metro.config.js +62 -0
  213. package/exampleForManagedExpo/package.json +36 -0
  214. package/exampleForManagedExpo/src/Certification/index.js +25 -0
  215. package/exampleForManagedExpo/src/CertificationResult/index.js +61 -0
  216. package/exampleForManagedExpo/src/CertificationTest/index.js +151 -0
  217. package/exampleForManagedExpo/src/Home/index.js +80 -0
  218. package/exampleForManagedExpo/src/Loading/index.js +10 -0
  219. package/exampleForManagedExpo/src/NavigationService.js +102 -0
  220. package/exampleForManagedExpo/src/Payment/index.js +23 -0
  221. package/exampleForManagedExpo/src/PaymentResult/index.js +82 -0
  222. package/exampleForManagedExpo/src/PaymentTest/index.js +313 -0
  223. package/exampleForManagedExpo/src/Picker/index.js +19 -0
  224. package/exampleForManagedExpo/src/constants.js +322 -0
  225. package/exampleForManagedExpo/src/utils.js +116 -0
  226. package/exampleForManagedExpo/yarn.lock +9411 -0
  227. package/exampleForWebView/.buckconfig +6 -0
  228. package/exampleForWebView/.eslintrc.js +4 -0
  229. package/exampleForWebView/.gitattributes +3 -0
  230. package/exampleForWebView/.gitignore +68 -0
  231. package/exampleForWebView/.prettierrc.js +7 -0
  232. package/exampleForWebView/.watchmanconfig +1 -0
  233. package/exampleForWebView/README.md +77 -0
  234. package/exampleForWebView/__tests__/App-test.tsx +14 -0
  235. package/exampleForWebView/_editorconfig +3 -0
  236. package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  237. package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  238. package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  239. package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
  240. package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
  241. package/exampleForWebView/android/app/BUCK +55 -0
  242. package/exampleForWebView/android/app/build.gradle +313 -0
  243. package/exampleForWebView/android/app/build_defs.bzl +19 -0
  244. package/exampleForWebView/android/app/debug.keystore +0 -0
  245. package/exampleForWebView/android/app/proguard-rules.pro +10 -0
  246. package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +13 -0
  247. package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +73 -0
  248. package/exampleForWebView/android/app/src/main/AndroidManifest.xml +26 -0
  249. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +48 -0
  250. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +91 -0
  251. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +116 -0
  252. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +36 -0
  253. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
  254. package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +7 -0
  255. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
  256. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
  257. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
  258. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
  259. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
  260. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
  261. package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +11 -0
  262. package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  263. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  264. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  265. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  266. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  267. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  268. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  269. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  270. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  271. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  272. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  273. package/exampleForWebView/android/app/src/main/res/values/strings.xml +3 -0
  274. package/exampleForWebView/android/app/src/main/res/values/styles.xml +9 -0
  275. package/exampleForWebView/android/build.gradle +51 -0
  276. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  277. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  278. package/exampleForWebView/android/gradle.properties +40 -0
  279. package/exampleForWebView/android/gradlew +234 -0
  280. package/exampleForWebView/android/gradlew.bat +89 -0
  281. package/exampleForWebView/android/settings.gradle +11 -0
  282. package/exampleForWebView/app.json +4 -0
  283. package/exampleForWebView/babel.config.js +11 -0
  284. package/exampleForWebView/index.js +9 -0
  285. package/exampleForWebView/ios/.xcode.env +11 -0
  286. package/exampleForWebView/ios/Podfile +43 -0
  287. package/exampleForWebView/ios/Podfile.lock +748 -0
  288. package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +8 -0
  289. package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +133 -0
  290. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  291. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +6 -0
  292. package/exampleForWebView/ios/exampleForWebView/Info.plist +96 -0
  293. package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +47 -0
  294. package/exampleForWebView/ios/exampleForWebView/main.m +10 -0
  295. package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +723 -0
  296. package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +88 -0
  297. package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +10 -0
  298. package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  299. package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +24 -0
  300. package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +66 -0
  301. package/exampleForWebView/manuals/CERTIFICATION.md +223 -0
  302. package/exampleForWebView/manuals/PAYMENT.md +232 -0
  303. package/exampleForWebView/metro.config.js +61 -0
  304. package/exampleForWebView/package.json +54 -0
  305. package/exampleForWebView/src/App.tsx +50 -0
  306. package/exampleForWebView/src/Certification.tsx +54 -0
  307. package/exampleForWebView/src/Home.tsx +49 -0
  308. package/exampleForWebView/src/Loading.tsx +23 -0
  309. package/exampleForWebView/src/Payment.tsx +65 -0
  310. package/exampleForWebView/yarn.lock +7362 -0
  311. package/lib/commonjs/components/Certification/index.js +10 -13
  312. package/lib/commonjs/components/Certification/index.js.map +1 -1
  313. package/lib/commonjs/components/ErrorOnParams/index.js +5 -7
  314. package/lib/commonjs/components/ErrorOnParams/index.js.map +1 -1
  315. package/lib/commonjs/components/Loading/index.js +2 -3
  316. package/lib/commonjs/components/Loading/index.js.map +1 -1
  317. package/lib/commonjs/components/Payment/index.js +10 -13
  318. package/lib/commonjs/components/Payment/index.js.map +1 -1
  319. package/lib/commonjs/constants/index.js +2 -4
  320. package/lib/commonjs/constants/index.js.map +1 -1
  321. package/lib/commonjs/index.js +2 -3
  322. package/lib/commonjs/index.js.map +1 -1
  323. package/lib/commonjs/styles.js +1 -2
  324. package/lib/commonjs/styles.js.map +1 -1
  325. package/lib/commonjs/utils/IamportUrl.js +2 -3
  326. package/lib/commonjs/utils/IamportUrl.js.map +1 -1
  327. package/lib/commonjs/utils/Validation.js +1 -2
  328. package/lib/commonjs/utils/Validation.js.map +1 -1
  329. package/lib/commonjs/utils/ValidationForPayment.js +1 -2
  330. package/lib/commonjs/utils/ValidationForPayment.js.map +1 -1
  331. package/lib/module/components/Certification/index.js +7 -8
  332. package/lib/module/components/Certification/index.js.map +1 -1
  333. package/lib/module/components/ErrorOnParams/index.js +3 -4
  334. package/lib/module/components/ErrorOnParams/index.js.map +1 -1
  335. package/lib/module/components/Loading/index.js.map +1 -1
  336. package/lib/module/components/Payment/index.js +7 -8
  337. package/lib/module/components/Payment/index.js.map +1 -1
  338. package/lib/module/constants/index.js +1 -2
  339. package/lib/module/constants/index.js.map +1 -1
  340. package/lib/module/index.js.map +1 -1
  341. package/lib/module/styles.js.map +1 -1
  342. package/lib/module/utils/IamportUrl.js.map +1 -1
  343. package/lib/module/utils/Validation.js.map +1 -1
  344. package/lib/module/utils/ValidationForPayment.js.map +1 -1
  345. package/lib/typescript/constants/index.d.ts +1 -1
  346. package/lib/typescript/constants/index.d.ts.map +1 -1
  347. package/manuals/CALLBACK.md +72 -0
  348. package/manuals/EXAMPLE.md +168 -0
  349. package/manuals/EXPO.md +246 -0
  350. package/manuals/INSTALL.md +31 -0
  351. package/manuals/SETTING.md +140 -0
  352. package/manuals/SUPPORT.md +35 -0
  353. package/manuals/TRANS.md +77 -0
  354. package/manuals/VERSION.md +184 -0
  355. package/manuals/assets/after-linking-iamport.png +0 -0
  356. package/manuals/assets/after-linking-webview.png +0 -0
  357. package/manuals/assets/allow-arbitrary.gif +0 -0
  358. package/manuals/assets/android-studio-avd-manager.png +0 -0
  359. package/manuals/assets/android-studio-build.png +0 -0
  360. package/manuals/assets/app-scheme-registry.gif +0 -0
  361. package/manuals/assets/expo-eject.png +0 -0
  362. package/manuals/assets/ios-emulator-certification.png +0 -0
  363. package/manuals/assets/ios-emulator-home.png +0 -0
  364. package/manuals/assets/ios-emulator-payment.png +0 -0
  365. package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
  366. package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
  367. package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
  368. package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
  369. package/manuals/assets/ios-trans-result.png +0 -0
  370. package/manuals/assets/webview-peer-dependency.png +0 -0
  371. package/package.json +3 -2
  372. package/scripts/bootstrap.js +24 -0
  373. package/src/constants/index.ts +8 -0
  374. package/tsconfig.build.json +9 -0
  375. package/tsconfig.json +26 -0
  376. package/yarn.lock +6174 -0
@@ -0,0 +1,58 @@
1
+ # exampleForExpo 프로젝트
2
+
3
+ `iamport-react-native` 예제입니다.
4
+
5
+ Expo를 통해 아임포트 결제모듈을 연동하는 것을 구현한 예제 프로젝트입니다.
6
+ 그 중에서도 bare 프로젝트를 생성했을 때, 혹은 기존 managed 프로젝트를 eject 했을 때를 가정해 만들어졌습니다.
7
+ 또한 자바스크립트로 작성되었기 때문에 타입스크립트가 아닌 자바스크립트에서의 `iamport-react-native` 사용법도 보실 수 있습니다.
8
+
9
+ Expo 관련 설정은 [Expo 설정하기](../manuals/EXPO.md)에서 보실 수 있습니다.
10
+
11
+ ## Expo CLI 설치
12
+
13
+ ```shell
14
+ $ yarn global add expo-cli
15
+ ```
16
+
17
+ ## Expo Go 앱에서 실행
18
+
19
+ 먼저 테스트할 기기에 [Expo Go](https://expo.dev/client) 앱을 설치합니다.
20
+
21
+ `iamport-react-native` 레포를 clone받은 후 프로젝트의 `example` 폴더 안으로 이동합니다.
22
+ ```shell
23
+ $ git clone https://github.com/iamport/iamport-react-native
24
+ $ cd iamport-react-native/exampleForExpo
25
+ ```
26
+
27
+ Expo 개발 서버를 실행합니다.
28
+ ```shell
29
+ $ expo start
30
+ ```
31
+
32
+ 서버의 로딩이 완료되면 안드로이드의 경우 Expo Go 앱에서, iOS의 경우 카메라를 통해 QR 코드를 찍어 앱을 실행합니다.
33
+
34
+ Expo Go 앱의 특성상 일부 결제수단(e.g. 뱅크페이)은 직접 빌드하는 것이 아니면 사용이 불가합니다.
35
+
36
+ ## 플랫폼별로 앱을 직접 빌드해 실행
37
+
38
+ 앱을 빌드하기 전 Metro를 실행합니다.
39
+ ```shell
40
+ $ yarn start
41
+ ```
42
+
43
+ ### iOS
44
+
45
+ - Xcode를 설치합니다.
46
+ - 필요한 CocoaPod 라이브러리를 설치합니다.
47
+ ```shell
48
+ $ cd ios
49
+ $ pod install
50
+ ```
51
+ - Xcode에서 `ios/exampleForExpo.xcworkspace`를 오픈합니다.
52
+ - 빌드 타깃을 선택하고 앱을 빋드 후 실행합니다.
53
+
54
+ ### 안드로이드
55
+
56
+ - Android Studio를 설치합니다.
57
+ - Android Studio에서 `android`폴더를 오픈합니다.
58
+ - 빌드 타깃을 선택하고 앱을 빌드 후 실행합니다.
@@ -0,0 +1,10 @@
1
+ import 'react-native';
2
+ import React from 'react';
3
+ import App from 'exampleForExpo/src/App';
4
+
5
+ // Note: test renderer must be required after react-native.
6
+ import renderer from 'react-test-renderer';
7
+
8
+ it('renders correctly', () => {
9
+ renderer.create(<App />);
10
+ });
@@ -0,0 +1,21 @@
1
+ # OSX
2
+ #
3
+ .DS_Store
4
+
5
+ # Android/IntelliJ
6
+ #
7
+ build/
8
+ .idea
9
+ .gradle
10
+ local.properties
11
+ *.iml
12
+ *.hprof
13
+
14
+ # BUCK
15
+ buck-out/
16
+ \.buckd/
17
+ *.keystore
18
+ !debug.keystore
19
+
20
+ # Bundle artifacts
21
+ *.jsbundle
@@ -0,0 +1,55 @@
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 = "kr.iamport.exampleForExpo",
39
+ )
40
+
41
+ android_resource(
42
+ name = "res",
43
+ package = "kr.iamport.exampleForExpo",
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
+ )
@@ -0,0 +1,362 @@
1
+ apply plugin: "com.android.application"
2
+
3
+ import com.android.build.OutputFile
4
+
5
+ /**
6
+ * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7
+ * and bundleReleaseJsAndAssets).
8
+ * These basically call `react-native bundle` with the correct arguments during the Android build
9
+ * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
+ * bundle directly from the development server. Below you can see all the possible configurations
11
+ * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
+ * `apply from: "../../node_modules/react-native/react.gradle"` line.
13
+ *
14
+ * project.ext.react = [
15
+ * // the name of the generated asset file containing your JS bundle
16
+ * bundleAssetName: "index.android.bundle",
17
+ *
18
+ * // the entry file for bundle generation. If none specified and
19
+ * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20
+ * // default. Can be overridden with ENTRY_FILE environment variable.
21
+ * entryFile: "index.android.js",
22
+ *
23
+ * // https://reactnative.dev/docs/performance#enable-the-ram-format
24
+ * bundleCommand: "ram-bundle",
25
+ *
26
+ * // whether to bundle JS and assets in debug mode
27
+ * bundleInDebug: false,
28
+ *
29
+ * // whether to bundle JS and assets in release mode
30
+ * bundleInRelease: true,
31
+ *
32
+ * // whether to bundle JS and assets in another build variant (if configured).
33
+ * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34
+ * // The configuration property can be in the following formats
35
+ * // 'bundleIn${productFlavor}${buildType}'
36
+ * // 'bundleIn${buildType}'
37
+ * // bundleInFreeDebug: true,
38
+ * // bundleInPaidRelease: true,
39
+ * // bundleInBeta: true,
40
+ *
41
+ * // whether to disable dev mode in custom build variants (by default only disabled in release)
42
+ * // for example: to disable dev mode in the staging build type (if configured)
43
+ * devDisabledInStaging: true,
44
+ * // The configuration property can be in the following formats
45
+ * // 'devDisabledIn${productFlavor}${buildType}'
46
+ * // 'devDisabledIn${buildType}'
47
+ *
48
+ * // the root of your project, i.e. where "package.json" lives
49
+ * root: "../../",
50
+ *
51
+ * // where to put the JS bundle asset in debug mode
52
+ * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53
+ *
54
+ * // where to put the JS bundle asset in release mode
55
+ * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56
+ *
57
+ * // where to put drawable resources / React Native assets, e.g. the ones you use via
58
+ * // require('./image.png')), in debug mode
59
+ * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60
+ *
61
+ * // where to put drawable resources / React Native assets, e.g. the ones you use via
62
+ * // require('./image.png')), in release mode
63
+ * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64
+ *
65
+ * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66
+ * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67
+ * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68
+ * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69
+ * // for example, you might want to remove it from here.
70
+ * inputExcludes: ["android/**", "ios/**"],
71
+ *
72
+ * // override which node gets called and with what additional arguments
73
+ * nodeExecutableAndArgs: ["node"],
74
+ *
75
+ * // supply additional arguments to the packager
76
+ * extraPackagerArgs: []
77
+ * ]
78
+ */
79
+
80
+ def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
81
+
82
+ def reactNativeRoot = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath()
83
+
84
+ project.ext.react = [
85
+ entryFile: ["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android"].execute(null, rootDir).text.trim(),
86
+ enableHermes: (findProperty('expo.jsEngine') ?: "jsc") == "hermes",
87
+ hermesCommand: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc",
88
+ cliPath: "${reactNativeRoot}/cli.js",
89
+ composeSourceMapsPath: "${reactNativeRoot}/scripts/compose-source-maps.js",
90
+ ]
91
+
92
+ apply from: new File(reactNativeRoot, "react.gradle")
93
+
94
+ /**
95
+ * Set this to true to create two separate APKs instead of one:
96
+ * - An APK that only works on ARM devices
97
+ * - An APK that only works on x86 devices
98
+ * The advantage is the size of the APK is reduced by about 4MB.
99
+ * Upload all the APKs to the Play Store and people will download
100
+ * the correct one based on the CPU architecture of their device.
101
+ */
102
+ def enableSeparateBuildPerCPUArchitecture = false
103
+
104
+ /**
105
+ * Run Proguard to shrink the Java bytecode in release builds.
106
+ */
107
+ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean()
108
+
109
+ /**
110
+ * The preferred build flavor of JavaScriptCore.
111
+ *
112
+ * For example, to use the international variant, you can use:
113
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
114
+ *
115
+ * The international variant includes ICU i18n library and necessary data
116
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
117
+ * give correct results when using with locales other than en-US. Note that
118
+ * this variant is about 6MiB larger per architecture than default.
119
+ */
120
+ def jscFlavor = 'org.webkit:android-jsc:+'
121
+
122
+ /**
123
+ * Whether to enable the Hermes VM.
124
+ *
125
+ * This should be set on project.ext.react and that value will be read here. If it is not set
126
+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
127
+ * and the benefits of using Hermes will therefore be sharply reduced.
128
+ */
129
+ def enableHermes = project.ext.react.get("enableHermes", false);
130
+
131
+ /**
132
+ * Architectures to build native code for.
133
+ */
134
+ def reactNativeArchitectures() {
135
+ def value = project.getProperties().get("reactNativeArchitectures")
136
+ return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
137
+ }
138
+
139
+ android {
140
+ ndkVersion rootProject.ext.ndkVersion
141
+
142
+ compileSdkVersion rootProject.ext.compileSdkVersion
143
+
144
+ defaultConfig {
145
+ applicationId 'kr.iamport.exampleForExpo'
146
+ minSdkVersion rootProject.ext.minSdkVersion
147
+ targetSdkVersion rootProject.ext.targetSdkVersion
148
+ versionCode 1
149
+ versionName "1.0.0"
150
+ buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
151
+
152
+ if (isNewArchitectureEnabled()) {
153
+ // We configure the CMake build only if you decide to opt-in for the New Architecture.
154
+ externalNativeBuild {
155
+ cmake {
156
+ arguments "-DPROJECT_BUILD_DIR=$buildDir",
157
+ "-DREACT_ANDROID_DIR=${reactNativeRoot}/ReactAndroid",
158
+ "-DREACT_ANDROID_BUILD_DIR=${reactNativeRoot}/ReactAndroid/build",
159
+ "-DNODE_MODULES_DIR=$rootDir/../node_modules",
160
+ "-DANDROID_STL=c++_shared"
161
+ }
162
+ }
163
+ if (!enableSeparateBuildPerCPUArchitecture) {
164
+ ndk {
165
+ abiFilters (*reactNativeArchitectures())
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ if (isNewArchitectureEnabled()) {
172
+ // We configure the CMake build only if you decide to opt-in for the New Architecture.
173
+ externalNativeBuild {
174
+ cmake {
175
+ path "$projectDir/src/main/jni/CMakeLists.txt"
176
+ }
177
+ }
178
+ def reactAndroidProjectDir = project(':ReactAndroid').projectDir
179
+ def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
180
+ dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
181
+ from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
182
+ into("$buildDir/react-ndk/exported")
183
+ }
184
+ def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
185
+ dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
186
+ from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
187
+ into("$buildDir/react-ndk/exported")
188
+ }
189
+ afterEvaluate {
190
+ // If you wish to add a custom TurboModule or component locally,
191
+ // you should uncomment this line.
192
+ // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
193
+ preDebugBuild.dependsOn(packageReactNdkDebugLibs)
194
+ preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
195
+
196
+ // Due to a bug inside AGP, we have to explicitly set a dependency
197
+ // between configureCMakeDebug* tasks and the preBuild tasks.
198
+ // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
199
+ configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
200
+ configureCMakeDebug.dependsOn(preDebugBuild)
201
+ reactNativeArchitectures().each { architecture ->
202
+ tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
203
+ dependsOn("preDebugBuild")
204
+ }
205
+ tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
206
+ dependsOn("preReleaseBuild")
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ splits {
213
+ abi {
214
+ reset()
215
+ enable enableSeparateBuildPerCPUArchitecture
216
+ universalApk false // If true, also generate a universal APK
217
+ include (*reactNativeArchitectures())
218
+ }
219
+ }
220
+ signingConfigs {
221
+ debug {
222
+ storeFile file('debug.keystore')
223
+ storePassword 'android'
224
+ keyAlias 'androiddebugkey'
225
+ keyPassword 'android'
226
+ }
227
+ }
228
+ buildTypes {
229
+ debug {
230
+ signingConfig signingConfigs.debug
231
+ }
232
+ release {
233
+ // Caution! In production, you need to generate your own keystore file.
234
+ // see https://reactnative.dev/docs/signed-apk-android.
235
+ signingConfig signingConfigs.debug
236
+ minifyEnabled enableProguardInReleaseBuilds
237
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
238
+ }
239
+ }
240
+
241
+ // applicationVariants are e.g. debug, release
242
+ applicationVariants.all { variant ->
243
+ variant.outputs.each { output ->
244
+ // For each separate APK per architecture, set a unique version code as described here:
245
+ // https://developer.android.com/studio/build/configure-apk-splits.html
246
+ def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
247
+ def abi = output.getFilter(OutputFile.ABI)
248
+ if (abi != null) { // null for the universal-debug, universal-release variants
249
+ output.versionCodeOverride =
250
+ versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
251
+ }
252
+
253
+ }
254
+ }
255
+ }
256
+
257
+ // Apply static values from `gradle.properties` to the `android.packagingOptions`
258
+ // Accepts values in comma delimited lists, example:
259
+ // android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini
260
+ ["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop ->
261
+ // Split option: 'foo,bar' -> ['foo', 'bar']
262
+ def options = (findProperty("android.packagingOptions.$prop") ?: "").split(",");
263
+ // Trim all elements in place.
264
+ for (i in 0..<options.size()) options[i] = options[i].trim();
265
+ // `[] - ""` is essentially `[""].filter(Boolean)` removing all empty strings.
266
+ options -= ""
267
+
268
+ if (options.length > 0) {
269
+ println "android.packagingOptions.$prop += $options ($options.length)"
270
+ // Ex: android.packagingOptions.pickFirsts += '**/SCCS/**'
271
+ options.each {
272
+ android.packagingOptions[prop] += it
273
+ }
274
+ }
275
+ }
276
+
277
+ dependencies {
278
+ implementation fileTree(dir: "libs", include: ["*.jar"])
279
+
280
+ //noinspection GradleDynamicVersion
281
+ implementation "com.facebook.react:react-native:+" // From node_modules
282
+
283
+ def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
284
+ def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
285
+ def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
286
+ def frescoVersion = rootProject.ext.frescoVersion
287
+
288
+ // If your app supports Android versions before Ice Cream Sandwich (API level 14)
289
+ if (isGifEnabled || isWebpEnabled) {
290
+ implementation "com.facebook.fresco:fresco:${frescoVersion}"
291
+ implementation "com.facebook.fresco:imagepipeline-okhttp3:${frescoVersion}"
292
+ }
293
+
294
+ if (isGifEnabled) {
295
+ // For animated gif support
296
+ implementation "com.facebook.fresco:animated-gif:${frescoVersion}"
297
+ }
298
+
299
+ if (isWebpEnabled) {
300
+ // For webp support
301
+ implementation "com.facebook.fresco:webpsupport:${frescoVersion}"
302
+ if (isWebpAnimatedEnabled) {
303
+ // Animated webp support
304
+ implementation "com.facebook.fresco:animated-webp:${frescoVersion}"
305
+ }
306
+ }
307
+
308
+ implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
309
+ debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
310
+ exclude group:'com.facebook.fbjni'
311
+ }
312
+ debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
313
+ exclude group:'com.facebook.flipper'
314
+ exclude group:'com.squareup.okhttp3', module:'okhttp'
315
+ }
316
+ debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
317
+ exclude group:'com.facebook.flipper'
318
+ }
319
+
320
+ if (enableHermes) {
321
+ //noinspection GradleDynamicVersion
322
+ implementation("com.facebook.react:hermes-engine:+") { // From node_modules
323
+ exclude group:'com.facebook.fbjni'
324
+ }
325
+ } else {
326
+ implementation jscFlavor
327
+ }
328
+ }
329
+
330
+ if (isNewArchitectureEnabled()) {
331
+ // If new architecture is enabled, we let you build RN from source
332
+ // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
333
+ // This will be applied to all the imported transtitive dependency.
334
+ configurations.all {
335
+ resolutionStrategy.dependencySubstitution {
336
+ substitute(module("com.facebook.react:react-native"))
337
+ .using(project(":ReactAndroid"))
338
+ .because("On New Architecture we're building React Native from source")
339
+ substitute(module("com.facebook.react:hermes-engine"))
340
+ .using(project(":ReactAndroid:hermes-engine"))
341
+ .because("On New Architecture we're building Hermes from source")
342
+ }
343
+ }
344
+ }
345
+
346
+ // Run this once to be able to run the application with BUCK
347
+ // puts all compile dependencies into folder libs for BUCK to use
348
+ task copyDownloadableDepsToLibs(type: Copy) {
349
+ from configurations.implementation
350
+ into 'libs'
351
+ }
352
+
353
+ apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
354
+ applyNativeModulesAppBuildGradle(project)
355
+
356
+ def isNewArchitectureEnabled() {
357
+ // To opt-in for the New Architecture, you can either:
358
+ // - Set `newArchEnabled` to true inside the `gradle.properties` file
359
+ // - Invoke gradle with `-newArchEnabled=true`
360
+ // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
361
+ return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
362
+ }
@@ -0,0 +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
+ )
@@ -0,0 +1,14 @@
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
+ # react-native-reanimated
11
+ -keep class com.swmansion.reanimated.** { *; }
12
+ -keep class com.facebook.react.turbomodule.** { *; }
13
+
14
+ # Add any project specific keep options here:
@@ -0,0 +1,7 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ xmlns:tools="http://schemas.android.com/tools">
3
+
4
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5
+
6
+ <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
7
+ </manifest>
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its 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 kr.iamport.exampleForExpo;
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.ReactInstanceManager;
23
+ import com.facebook.react.bridge.ReactContext;
24
+ import com.facebook.react.modules.network.NetworkingModule;
25
+ import okhttp3.OkHttpClient;
26
+
27
+ public class ReactNativeFlipper {
28
+ public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29
+ if (FlipperUtils.shouldEnableFlipper(context)) {
30
+ final FlipperClient client = AndroidFlipperClient.getInstance(context);
31
+ client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
32
+ client.addPlugin(new ReactFlipperPlugin());
33
+ client.addPlugin(new DatabasesFlipperPlugin(context));
34
+ client.addPlugin(new SharedPreferencesFlipperPlugin(context));
35
+ client.addPlugin(CrashReporterPlugin.getInstance());
36
+ NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
37
+ NetworkingModule.setCustomClientBuilder(
38
+ new NetworkingModule.CustomClientBuilder() {
39
+ @Override
40
+ public void apply(OkHttpClient.Builder builder) {
41
+ builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
42
+ }
43
+ });
44
+ client.addPlugin(networkFlipperPlugin);
45
+ client.start();
46
+ // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
47
+ // Hence we run if after all native modules have been initialized
48
+ ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
49
+ if (reactContext == null) {
50
+ reactInstanceManager.addReactInstanceEventListener(
51
+ new ReactInstanceManager.ReactInstanceEventListener() {
52
+ @Override
53
+ public void onReactContextInitialized(ReactContext reactContext) {
54
+ reactInstanceManager.removeReactInstanceEventListener(this);
55
+ reactContext.runOnNativeModulesQueueThread(
56
+ new Runnable() {
57
+ @Override
58
+ public void run() {
59
+ client.addPlugin(new FrescoFlipperPlugin());
60
+ }
61
+ });
62
+ }
63
+ });
64
+ } else {
65
+ client.addPlugin(new FrescoFlipperPlugin());
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,34 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="kr.iamport.exampleForExpo">
2
+ <uses-permission android:name="android.permission.INTERNET"/>
3
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
4
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5
+ <uses-permission android:name="android.permission.VIBRATE"/>
6
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
7
+ <queries>
8
+ <intent>
9
+ <action android:name="android.intent.action.VIEW"/>
10
+ <category android:name="android.intent.category.BROWSABLE"/>
11
+ <data android:scheme="https"/>
12
+ </intent>
13
+ </queries>
14
+ <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
15
+ <meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
16
+ <meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="47.0.0"/>
17
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
18
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
19
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anymate98/exampleForExpo"/>
20
+ <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
21
+ <intent-filter>
22
+ <action android:name="android.intent.action.MAIN"/>
23
+ <category android:name="android.intent.category.LAUNCHER"/>
24
+ </intent-filter>
25
+ <intent-filter>
26
+ <action android:name="android.intent.action.VIEW"/>
27
+ <category android:name="android.intent.category.DEFAULT"/>
28
+ <category android:name="android.intent.category.BROWSABLE"/>
29
+ <data android:scheme="exampleforexpo" />
30
+ </intent-filter>
31
+ </activity>
32
+ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
33
+ </application>
34
+ </manifest>