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.
- package/.circleci/config.yml +98 -0
- package/.editorconfig +15 -0
- package/.gitattributes +3 -0
- package/.gitignore +69 -0
- package/.yarnrc +3 -0
- package/.yarnrc.yml +1 -0
- package/README.md +1 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/babel.config.js +3 -0
- package/example/.gitignore +69 -0
- package/example/README.md +44 -0
- package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
- package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/7.5.1/gc.properties +0 -0
- package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/example/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/android/app/build.gradle +183 -0
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +10 -0
- package/example/android/app/src/debug/AndroidManifest.xml +8 -0
- package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +69 -0
- package/example/android/app/src/main/AndroidManifest.xml +34 -0
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +15 -0
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +80 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +3 -0
- package/example/android/app/src/main/res/values/styles.xml +9 -0
- package/example/android/build.gradle +21 -0
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/example/android/gradle.properties +44 -0
- package/example/android/gradlew +183 -0
- package/example/android/gradlew.bat +103 -0
- package/example/android/settings.gradle +9 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +11 -0
- package/example/index.js +5 -0
- package/example/ios/File.swift +8 -0
- package/example/ios/Gemfile +7 -0
- package/example/ios/Gemfile.lock +99 -0
- package/example/ios/IamportReactNativeExample/AppDelegate.h +15 -0
- package/example/ios/IamportReactNativeExample/AppDelegate.mm +138 -0
- package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +6 -0
- package/example/ios/IamportReactNativeExample/Info.plist +121 -0
- package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +58 -0
- package/example/ios/IamportReactNativeExample/main.m +16 -0
- package/example/ios/IamportReactNativeExample-Bridging-Header.h +3 -0
- package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +969 -0
- package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +99 -0
- package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/Podfile +57 -0
- package/example/ios/Podfile.lock +756 -0
- package/example/metro.config.js +66 -0
- package/example/package.json +40 -0
- package/example/src/App.tsx +17 -0
- package/example/src/Certification/index.tsx +30 -0
- package/example/src/CertificationResult/index.tsx +79 -0
- package/example/src/CertificationTest/index.tsx +214 -0
- package/example/src/Home/index.tsx +87 -0
- package/example/src/Loading/index.tsx +12 -0
- package/example/src/NavigationService.tsx +127 -0
- package/example/src/Payment/index.tsx +28 -0
- package/example/src/PaymentResult/index.tsx +96 -0
- package/example/src/PaymentTest/index.tsx +383 -0
- package/example/src/Picker/index.tsx +60 -0
- package/example/src/constants.ts +274 -0
- package/example/src/utils.ts +83 -0
- package/example/yarn.lock +7358 -0
- package/exampleForExpo/.buckconfig +6 -0
- package/exampleForExpo/.expo/README.md +8 -0
- package/exampleForExpo/.expo/devices.json +3 -0
- package/exampleForExpo/.gitattributes +1 -0
- package/exampleForExpo/.gitignore +125 -0
- package/exampleForExpo/.idea/.gitignore +3 -0
- package/exampleForExpo/.idea/caches/deviceStreaming.xml +549 -0
- package/exampleForExpo/.idea/exampleForExpo.iml +9 -0
- package/exampleForExpo/.idea/misc.xml +6 -0
- package/exampleForExpo/.idea/modules.xml +8 -0
- package/exampleForExpo/.idea/vcs.xml +6 -0
- package/exampleForExpo/.idea/workspace.xml +53 -0
- package/exampleForExpo/README.md +58 -0
- package/exampleForExpo/__tests__/App.js +10 -0
- package/exampleForExpo/android/.gitignore +21 -0
- package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
- package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
- package/exampleForExpo/android/app/BUCK +55 -0
- package/exampleForExpo/android/app/build.gradle +362 -0
- package/exampleForExpo/android/app/build_defs.bzl +19 -0
- package/exampleForExpo/android/app/debug.keystore +0 -0
- package/exampleForExpo/android/app/proguard-rules.pro +14 -0
- package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +7 -0
- package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +69 -0
- package/exampleForExpo/android/app/src/main/AndroidManifest.xml +34 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +83 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +106 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +117 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +36 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
- package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +7 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
- package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +11 -0
- package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +4 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/values/colors.xml +4 -0
- package/exampleForExpo/android/app/src/main/res/values/strings.xml +3 -0
- package/exampleForExpo/android/app/src/main/res/values/styles.xml +17 -0
- package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +1 -0
- package/exampleForExpo/android/build.gradle +65 -0
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/exampleForExpo/android/gradle.properties +53 -0
- package/exampleForExpo/android/gradlew +240 -0
- package/exampleForExpo/android/gradlew.bat +91 -0
- package/exampleForExpo/android/settings.gradle +17 -0
- package/exampleForExpo/app.json +16 -0
- package/exampleForExpo/babel.config.js +11 -0
- package/exampleForExpo/index.js +9 -0
- package/exampleForExpo/ios/.gitignore +30 -0
- package/exampleForExpo/ios/.xcode.env +11 -0
- package/exampleForExpo/ios/Podfile +61 -0
- package/exampleForExpo/ios/Podfile.lock +734 -0
- package/exampleForExpo/ios/Podfile.properties.json +3 -0
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +9 -0
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +166 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +6 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/exampleForExpo/ios/exampleForExpo/Info.plist +118 -0
- package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +43 -0
- package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +16 -0
- package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +8 -0
- package/exampleForExpo/ios/exampleForExpo/main.m +10 -0
- package/exampleForExpo/ios/exampleForExpo/noop-file.swift +4 -0
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +544 -0
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +88 -0
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +10 -0
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/exampleForExpo/metro.config.js +62 -0
- package/exampleForExpo/package.json +40 -0
- package/exampleForExpo/src/App.js +14 -0
- package/exampleForExpo/src/Certification/index.js +25 -0
- package/exampleForExpo/src/CertificationResult/index.js +61 -0
- package/exampleForExpo/src/CertificationTest/index.js +151 -0
- package/exampleForExpo/src/Home/index.js +80 -0
- package/exampleForExpo/src/Loading/index.js +10 -0
- package/exampleForExpo/src/NavigationService.js +102 -0
- package/exampleForExpo/src/Payment/index.js +23 -0
- package/exampleForExpo/src/PaymentResult/index.js +82 -0
- package/exampleForExpo/src/PaymentTest/index.js +313 -0
- package/exampleForExpo/src/Picker/index.js +19 -0
- package/exampleForExpo/src/constants.js +322 -0
- package/exampleForExpo/src/utils.js +116 -0
- package/exampleForExpo/yarn.lock +9498 -0
- package/exampleForManagedExpo/.expo-shared/assets.json +4 -0
- package/exampleForManagedExpo/.gitignore +22 -0
- package/exampleForManagedExpo/App.js +11 -0
- package/exampleForManagedExpo/README.md +33 -0
- package/exampleForManagedExpo/app.json +90 -0
- package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
- package/exampleForManagedExpo/assets/favicon.png +0 -0
- package/exampleForManagedExpo/assets/icon.png +0 -0
- package/exampleForManagedExpo/assets/splash.png +0 -0
- package/exampleForManagedExpo/babel.config.js +11 -0
- package/exampleForManagedExpo/metro.config.js +62 -0
- package/exampleForManagedExpo/package.json +36 -0
- package/exampleForManagedExpo/src/Certification/index.js +25 -0
- package/exampleForManagedExpo/src/CertificationResult/index.js +61 -0
- package/exampleForManagedExpo/src/CertificationTest/index.js +151 -0
- package/exampleForManagedExpo/src/Home/index.js +80 -0
- package/exampleForManagedExpo/src/Loading/index.js +10 -0
- package/exampleForManagedExpo/src/NavigationService.js +102 -0
- package/exampleForManagedExpo/src/Payment/index.js +23 -0
- package/exampleForManagedExpo/src/PaymentResult/index.js +82 -0
- package/exampleForManagedExpo/src/PaymentTest/index.js +313 -0
- package/exampleForManagedExpo/src/Picker/index.js +19 -0
- package/exampleForManagedExpo/src/constants.js +322 -0
- package/exampleForManagedExpo/src/utils.js +116 -0
- package/exampleForManagedExpo/yarn.lock +9411 -0
- package/exampleForWebView/.buckconfig +6 -0
- package/exampleForWebView/.eslintrc.js +4 -0
- package/exampleForWebView/.gitattributes +3 -0
- package/exampleForWebView/.gitignore +68 -0
- package/exampleForWebView/.prettierrc.js +7 -0
- package/exampleForWebView/.watchmanconfig +1 -0
- package/exampleForWebView/README.md +77 -0
- package/exampleForWebView/__tests__/App-test.tsx +14 -0
- package/exampleForWebView/_editorconfig +3 -0
- package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
- package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
- package/exampleForWebView/android/app/BUCK +55 -0
- package/exampleForWebView/android/app/build.gradle +313 -0
- package/exampleForWebView/android/app/build_defs.bzl +19 -0
- package/exampleForWebView/android/app/debug.keystore +0 -0
- package/exampleForWebView/android/app/proguard-rules.pro +10 -0
- package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +13 -0
- package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +73 -0
- package/exampleForWebView/android/app/src/main/AndroidManifest.xml +26 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +48 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +91 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +116 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +36 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
- package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +7 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
- package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +11 -0
- package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/values/strings.xml +3 -0
- package/exampleForWebView/android/app/src/main/res/values/styles.xml +9 -0
- package/exampleForWebView/android/build.gradle +51 -0
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/exampleForWebView/android/gradle.properties +40 -0
- package/exampleForWebView/android/gradlew +234 -0
- package/exampleForWebView/android/gradlew.bat +89 -0
- package/exampleForWebView/android/settings.gradle +11 -0
- package/exampleForWebView/app.json +4 -0
- package/exampleForWebView/babel.config.js +11 -0
- package/exampleForWebView/index.js +9 -0
- package/exampleForWebView/ios/.xcode.env +11 -0
- package/exampleForWebView/ios/Podfile +43 -0
- package/exampleForWebView/ios/Podfile.lock +748 -0
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +8 -0
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +133 -0
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +6 -0
- package/exampleForWebView/ios/exampleForWebView/Info.plist +96 -0
- package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +47 -0
- package/exampleForWebView/ios/exampleForWebView/main.m +10 -0
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +723 -0
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +88 -0
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +10 -0
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +24 -0
- package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +66 -0
- package/exampleForWebView/manuals/CERTIFICATION.md +223 -0
- package/exampleForWebView/manuals/PAYMENT.md +232 -0
- package/exampleForWebView/metro.config.js +61 -0
- package/exampleForWebView/package.json +54 -0
- package/exampleForWebView/src/App.tsx +50 -0
- package/exampleForWebView/src/Certification.tsx +54 -0
- package/exampleForWebView/src/Home.tsx +49 -0
- package/exampleForWebView/src/Loading.tsx +23 -0
- package/exampleForWebView/src/Payment.tsx +65 -0
- package/exampleForWebView/yarn.lock +7362 -0
- package/lib/commonjs/components/Certification/index.js +10 -13
- package/lib/commonjs/components/Certification/index.js.map +1 -1
- package/lib/commonjs/components/ErrorOnParams/index.js +5 -7
- package/lib/commonjs/components/ErrorOnParams/index.js.map +1 -1
- package/lib/commonjs/components/Loading/index.js +2 -3
- package/lib/commonjs/components/Loading/index.js.map +1 -1
- package/lib/commonjs/components/Payment/index.js +10 -13
- package/lib/commonjs/components/Payment/index.js.map +1 -1
- package/lib/commonjs/constants/index.js +2 -4
- package/lib/commonjs/constants/index.js.map +1 -1
- package/lib/commonjs/index.js +2 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles.js +1 -2
- package/lib/commonjs/styles.js.map +1 -1
- package/lib/commonjs/utils/IamportUrl.js +2 -3
- package/lib/commonjs/utils/IamportUrl.js.map +1 -1
- package/lib/commonjs/utils/Validation.js +1 -2
- package/lib/commonjs/utils/Validation.js.map +1 -1
- package/lib/commonjs/utils/ValidationForPayment.js +1 -2
- package/lib/commonjs/utils/ValidationForPayment.js.map +1 -1
- package/lib/module/components/Certification/index.js +7 -8
- package/lib/module/components/Certification/index.js.map +1 -1
- package/lib/module/components/ErrorOnParams/index.js +3 -4
- package/lib/module/components/ErrorOnParams/index.js.map +1 -1
- package/lib/module/components/Loading/index.js.map +1 -1
- package/lib/module/components/Payment/index.js +7 -8
- package/lib/module/components/Payment/index.js.map +1 -1
- package/lib/module/constants/index.js +1 -2
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles.js.map +1 -1
- package/lib/module/utils/IamportUrl.js.map +1 -1
- package/lib/module/utils/Validation.js.map +1 -1
- package/lib/module/utils/ValidationForPayment.js.map +1 -1
- package/lib/typescript/constants/index.d.ts +1 -1
- package/lib/typescript/constants/index.d.ts.map +1 -1
- package/manuals/CALLBACK.md +72 -0
- package/manuals/EXAMPLE.md +168 -0
- package/manuals/EXPO.md +246 -0
- package/manuals/INSTALL.md +31 -0
- package/manuals/SETTING.md +140 -0
- package/manuals/SUPPORT.md +35 -0
- package/manuals/TRANS.md +77 -0
- package/manuals/VERSION.md +184 -0
- package/manuals/assets/after-linking-iamport.png +0 -0
- package/manuals/assets/after-linking-webview.png +0 -0
- package/manuals/assets/allow-arbitrary.gif +0 -0
- package/manuals/assets/android-studio-avd-manager.png +0 -0
- package/manuals/assets/android-studio-build.png +0 -0
- package/manuals/assets/app-scheme-registry.gif +0 -0
- package/manuals/assets/expo-eject.png +0 -0
- package/manuals/assets/ios-emulator-certification.png +0 -0
- package/manuals/assets/ios-emulator-home.png +0 -0
- package/manuals/assets/ios-emulator-payment.png +0 -0
- package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
- package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
- package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
- package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
- package/manuals/assets/ios-trans-result.png +0 -0
- package/manuals/assets/webview-peer-dependency.png +0 -0
- package/package.json +3 -2
- package/scripts/bootstrap.js +24 -0
- package/src/constants/index.ts +8 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +26 -0
- package/yarn.lock +6174 -0
|
@@ -0,0 +1,68 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,77 @@
|
|
|
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)
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
});
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -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 = "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
|
+
)
|
|
@@ -0,0 +1,313 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
+
)
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Add project specific ProGuard rules here.
|
|
2
|
+
# By default, the flags in this file are appended to flags specified
|
|
3
|
+
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
4
|
+
# You can edit the include path and order by changing the proguardFiles
|
|
5
|
+
# directive in build.gradle.
|
|
6
|
+
#
|
|
7
|
+
# For more details, see
|
|
8
|
+
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
9
|
+
|
|
10
|
+
# Add any project specific keep options here:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
4
|
+
|
|
5
|
+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
6
|
+
|
|
7
|
+
<application
|
|
8
|
+
android:usesCleartextTraffic="true"
|
|
9
|
+
tools:targetApi="28"
|
|
10
|
+
tools:ignore="GoogleAppIndexingWarning">
|
|
11
|
+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
|
|
12
|
+
</application>
|
|
13
|
+
</manifest>
|