iamport-react-native 2.0.13 → 2.0.15
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 +187 -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 +4 -3
- 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,98 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
executors:
|
|
4
|
+
default:
|
|
5
|
+
docker:
|
|
6
|
+
- image: circleci/node:10
|
|
7
|
+
working_directory: ~/project
|
|
8
|
+
|
|
9
|
+
commands:
|
|
10
|
+
attach_project:
|
|
11
|
+
steps:
|
|
12
|
+
- attach_workspace:
|
|
13
|
+
at: ~/project
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
install-dependencies:
|
|
17
|
+
executor: default
|
|
18
|
+
steps:
|
|
19
|
+
- checkout
|
|
20
|
+
- attach_project
|
|
21
|
+
- restore_cache:
|
|
22
|
+
keys:
|
|
23
|
+
- dependencies-{{ checksum "package.json" }}
|
|
24
|
+
- dependencies-
|
|
25
|
+
- restore_cache:
|
|
26
|
+
keys:
|
|
27
|
+
- dependencies-example-{{ checksum "example/package.json" }}
|
|
28
|
+
- dependencies-example-
|
|
29
|
+
- run:
|
|
30
|
+
name: Install dependencies
|
|
31
|
+
command: |
|
|
32
|
+
yarn install --cwd example --frozen-lockfile
|
|
33
|
+
yarn install --frozen-lockfile
|
|
34
|
+
- save_cache:
|
|
35
|
+
key: dependencies-{{ checksum "package.json" }}
|
|
36
|
+
paths: node_modules
|
|
37
|
+
- save_cache:
|
|
38
|
+
key: dependencies-example-{{ checksum "example/package.json" }}
|
|
39
|
+
paths: example/node_modules
|
|
40
|
+
- persist_to_workspace:
|
|
41
|
+
root: .
|
|
42
|
+
paths: .
|
|
43
|
+
|
|
44
|
+
lint:
|
|
45
|
+
executor: default
|
|
46
|
+
steps:
|
|
47
|
+
- attach_project
|
|
48
|
+
- run:
|
|
49
|
+
name: Lint files
|
|
50
|
+
command: |
|
|
51
|
+
yarn lint
|
|
52
|
+
|
|
53
|
+
typescript:
|
|
54
|
+
executor: default
|
|
55
|
+
steps:
|
|
56
|
+
- attach_project
|
|
57
|
+
- run:
|
|
58
|
+
name: Typecheck files
|
|
59
|
+
command: |
|
|
60
|
+
yarn typescript
|
|
61
|
+
|
|
62
|
+
unit-tests:
|
|
63
|
+
executor: default
|
|
64
|
+
steps:
|
|
65
|
+
- attach_project
|
|
66
|
+
- run:
|
|
67
|
+
name: Run unit tests
|
|
68
|
+
command: |
|
|
69
|
+
yarn test --coverage
|
|
70
|
+
- store_artifacts:
|
|
71
|
+
path: coverage
|
|
72
|
+
destination: coverage
|
|
73
|
+
|
|
74
|
+
build-package:
|
|
75
|
+
executor: default
|
|
76
|
+
steps:
|
|
77
|
+
- attach_project
|
|
78
|
+
- run:
|
|
79
|
+
name: Build package
|
|
80
|
+
command: |
|
|
81
|
+
yarn prepare
|
|
82
|
+
|
|
83
|
+
workflows:
|
|
84
|
+
build-and-test:
|
|
85
|
+
jobs:
|
|
86
|
+
- install-dependencies
|
|
87
|
+
- lint:
|
|
88
|
+
requires:
|
|
89
|
+
- install-dependencies
|
|
90
|
+
- typescript:
|
|
91
|
+
requires:
|
|
92
|
+
- install-dependencies
|
|
93
|
+
- unit-tests:
|
|
94
|
+
requires:
|
|
95
|
+
- install-dependencies
|
|
96
|
+
- build-package:
|
|
97
|
+
requires:
|
|
98
|
+
- install-dependencies
|
package/.editorconfig
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
|
2
|
+
# coding styles between different editors and IDEs
|
|
3
|
+
# editorconfig.org
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
[*]
|
|
8
|
+
|
|
9
|
+
indent_style = space
|
|
10
|
+
indent_size = 2
|
|
11
|
+
|
|
12
|
+
end_of_line = lf
|
|
13
|
+
charset = utf-8
|
|
14
|
+
trim_trailing_whitespace = true
|
|
15
|
+
insert_final_newline = true
|
package/.gitattributes
ADDED
package/.gitignore
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# OSX
|
|
2
|
+
#
|
|
3
|
+
.DS_Store
|
|
4
|
+
|
|
5
|
+
# XDE
|
|
6
|
+
.expo/
|
|
7
|
+
|
|
8
|
+
# VSCode
|
|
9
|
+
.vscode/
|
|
10
|
+
jsconfig.json
|
|
11
|
+
|
|
12
|
+
# Xcode
|
|
13
|
+
#
|
|
14
|
+
build/
|
|
15
|
+
*.pbxuser
|
|
16
|
+
!default.pbxuser
|
|
17
|
+
*.mode1v3
|
|
18
|
+
!default.mode1v3
|
|
19
|
+
*.mode2v3
|
|
20
|
+
!default.mode2v3
|
|
21
|
+
*.perspectivev3
|
|
22
|
+
!default.perspectivev3
|
|
23
|
+
xcuserdata
|
|
24
|
+
*.xccheckout
|
|
25
|
+
*.moved-aside
|
|
26
|
+
DerivedData
|
|
27
|
+
*.hmap
|
|
28
|
+
*.ipa
|
|
29
|
+
*.xcuserstate
|
|
30
|
+
project.xcworkspace
|
|
31
|
+
|
|
32
|
+
# Android/IJ
|
|
33
|
+
#
|
|
34
|
+
.idea
|
|
35
|
+
.gradle
|
|
36
|
+
local.properties
|
|
37
|
+
android.iml
|
|
38
|
+
|
|
39
|
+
# Cocoapods
|
|
40
|
+
#
|
|
41
|
+
example/ios/Pods
|
|
42
|
+
|
|
43
|
+
# node.js
|
|
44
|
+
#
|
|
45
|
+
node_modules/
|
|
46
|
+
npm-debug.log
|
|
47
|
+
yarn-debug.log
|
|
48
|
+
yarn-error.log
|
|
49
|
+
|
|
50
|
+
# BUCK
|
|
51
|
+
buck-out/
|
|
52
|
+
\.buckd/
|
|
53
|
+
android/app/libs
|
|
54
|
+
android/keystores/debug.keystore
|
|
55
|
+
|
|
56
|
+
# Expo
|
|
57
|
+
.expo/*
|
|
58
|
+
|
|
59
|
+
# generated by bob
|
|
60
|
+
lib/
|
|
61
|
+
|
|
62
|
+
# yarn
|
|
63
|
+
.yarn/*
|
|
64
|
+
!.yarn/cache
|
|
65
|
+
!.yarn/patches
|
|
66
|
+
!.yarn/plugins
|
|
67
|
+
!.yarn/releases
|
|
68
|
+
!.yarn/sdks
|
|
69
|
+
!.yarn/versions
|
package/.yarnrc
ADDED
package/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
package/README.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# OSX
|
|
2
|
+
#
|
|
3
|
+
.DS_Store
|
|
4
|
+
|
|
5
|
+
# XDE
|
|
6
|
+
.expo/
|
|
7
|
+
|
|
8
|
+
# VSCode
|
|
9
|
+
.vscode/
|
|
10
|
+
jsconfig.json
|
|
11
|
+
|
|
12
|
+
# Xcode
|
|
13
|
+
#
|
|
14
|
+
build/
|
|
15
|
+
*.pbxuser
|
|
16
|
+
!default.pbxuser
|
|
17
|
+
*.mode1v3
|
|
18
|
+
!default.mode1v3
|
|
19
|
+
*.mode2v3
|
|
20
|
+
!default.mode2v3
|
|
21
|
+
*.perspectivev3
|
|
22
|
+
!default.perspectivev3
|
|
23
|
+
xcuserdata
|
|
24
|
+
*.xccheckout
|
|
25
|
+
*.moved-aside
|
|
26
|
+
DerivedData
|
|
27
|
+
*.hmap
|
|
28
|
+
*.ipa
|
|
29
|
+
*.xcuserstate
|
|
30
|
+
project.xcworkspace
|
|
31
|
+
|
|
32
|
+
# Android/IJ
|
|
33
|
+
#
|
|
34
|
+
.idea
|
|
35
|
+
.gradle
|
|
36
|
+
local.properties
|
|
37
|
+
android.iml
|
|
38
|
+
|
|
39
|
+
# Cocoapods
|
|
40
|
+
#
|
|
41
|
+
example/ios/Pods
|
|
42
|
+
|
|
43
|
+
# node.js
|
|
44
|
+
#
|
|
45
|
+
node_modules/
|
|
46
|
+
npm-debug.log
|
|
47
|
+
yarn-debug.log
|
|
48
|
+
yarn-error.log
|
|
49
|
+
|
|
50
|
+
# BUCK
|
|
51
|
+
buck-out/
|
|
52
|
+
\.buckd/
|
|
53
|
+
android/app/libs
|
|
54
|
+
android/keystores/debug.keystore
|
|
55
|
+
|
|
56
|
+
# Expo
|
|
57
|
+
.expo/*
|
|
58
|
+
|
|
59
|
+
# generated by bob
|
|
60
|
+
lib/
|
|
61
|
+
|
|
62
|
+
# yarn
|
|
63
|
+
.yarn/*
|
|
64
|
+
!.yarn/cache
|
|
65
|
+
!.yarn/patches
|
|
66
|
+
!.yarn/plugins
|
|
67
|
+
!.yarn/releases
|
|
68
|
+
!.yarn/sdks
|
|
69
|
+
!.yarn/versions
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# example 프로젝트
|
|
2
|
+
|
|
3
|
+
`iamport-react-native` 예제입니다.
|
|
4
|
+
|
|
5
|
+
기본적인 형태의 리액트 네이티브 애플리케이션으로 앱 내에서 웹뷰를 통해 본인인증 및 결제를 실행한 후 결과를 확인할 수 있습니다.
|
|
6
|
+
|
|
7
|
+
타입스크립트로 작성되어 있어 `IMPData.PaymentData`와 `IMPData.CertificationData` interface를 통해 결제에 필요한 파라미터들의 타입 체크를 수행합니다.
|
|
8
|
+
|
|
9
|
+
## 실행
|
|
10
|
+
|
|
11
|
+
`iamport-react-native` 레포를 clone받은 후 프로젝트의 `example` 폴더 안으로 이동합니다.
|
|
12
|
+
```shell
|
|
13
|
+
$ git clone https://github.com/iamport/iamport-react-native
|
|
14
|
+
$ cd iamport-react-native/example
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
필요한 npm 모듈을 설치합니다.
|
|
18
|
+
```shell
|
|
19
|
+
$ yarn
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
앱을 빌드하고 실행하기 전 Metro를 실행합니다.
|
|
23
|
+
```shell
|
|
24
|
+
$ yarn start
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
각 환경에 맞게 앱을 빌드합니다.
|
|
28
|
+
|
|
29
|
+
### iOS
|
|
30
|
+
|
|
31
|
+
- Xcode를 설치합니다.
|
|
32
|
+
- 필요한 CocoaPod 라이브러리를 설치합니다.
|
|
33
|
+
```shell
|
|
34
|
+
$ cd ios
|
|
35
|
+
$ pod install
|
|
36
|
+
```
|
|
37
|
+
- Xcode에서 `ios/IamportReactNativeExample.xcworkspace`를 오픈합니다.
|
|
38
|
+
- 빌드 타깃을 선택하고 앱을 빋드 후 실행합니다.
|
|
39
|
+
|
|
40
|
+
### 안드로이드
|
|
41
|
+
|
|
42
|
+
- Android Studio를 설치합니다.
|
|
43
|
+
- Android Studio에서 `android`폴더를 오픈합니다.
|
|
44
|
+
- 빌드 타깃을 선택하고 앱을 빌드 후 실행합니다.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
apply plugin: "com.android.application"
|
|
2
|
+
apply plugin: "com.facebook.react"
|
|
3
|
+
|
|
4
|
+
import com.android.build.OutputFile
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is the configuration block to customize your React Native Android app.
|
|
8
|
+
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
9
|
+
*/
|
|
10
|
+
react {
|
|
11
|
+
/* Folders */
|
|
12
|
+
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
|
13
|
+
// root = file("../")
|
|
14
|
+
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
|
15
|
+
// reactNativeDir = file("../node_modules/react-native")
|
|
16
|
+
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
|
|
17
|
+
// codegenDir = file("../node_modules/react-native-codegen")
|
|
18
|
+
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
|
|
19
|
+
// cliFile = file("../node_modules/react-native/cli.js")
|
|
20
|
+
|
|
21
|
+
/* Variants */
|
|
22
|
+
// The list of variants to that are debuggable. For those we're going to
|
|
23
|
+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
|
24
|
+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
25
|
+
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
26
|
+
|
|
27
|
+
/* Bundling */
|
|
28
|
+
// A list containing the node command and its flags. Default is just 'node'.
|
|
29
|
+
// nodeExecutableAndArgs = ["node"]
|
|
30
|
+
//
|
|
31
|
+
// The command to run when bundling. By default is 'bundle'
|
|
32
|
+
// bundleCommand = "ram-bundle"
|
|
33
|
+
//
|
|
34
|
+
// The path to the CLI configuration file. Default is empty.
|
|
35
|
+
// bundleConfig = file(../rn-cli.config.js)
|
|
36
|
+
//
|
|
37
|
+
// The name of the generated asset file containing your JS bundle
|
|
38
|
+
// bundleAssetName = "MyApplication.android.bundle"
|
|
39
|
+
//
|
|
40
|
+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
41
|
+
// entryFile = file("../js/MyApplication.android.js")
|
|
42
|
+
//
|
|
43
|
+
// A list of extra flags to pass to the 'bundle' commands.
|
|
44
|
+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
45
|
+
// extraPackagerArgs = []
|
|
46
|
+
|
|
47
|
+
/* Hermes Commands */
|
|
48
|
+
// The hermes compiler command to run. By default it is 'hermesc'
|
|
49
|
+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
50
|
+
//
|
|
51
|
+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
52
|
+
// hermesFlags = ["-O", "-output-source-map"]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Set this to true to create four separate APKs instead of one,
|
|
57
|
+
* one for each native architecture. This is useful if you don't
|
|
58
|
+
* use App Bundles (https://developer.android.com/guide/app-bundle/)
|
|
59
|
+
* and want to have separate APKs to upload to the Play Store.
|
|
60
|
+
*/
|
|
61
|
+
def enableSeparateBuildPerCPUArchitecture = false
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
65
|
+
*/
|
|
66
|
+
def enableProguardInReleaseBuilds = false
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The preferred build flavor of JavaScriptCore (JSC)
|
|
70
|
+
*
|
|
71
|
+
* For example, to use the international variant, you can use:
|
|
72
|
+
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
73
|
+
*
|
|
74
|
+
* The international variant includes ICU i18n library and necessary data
|
|
75
|
+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
76
|
+
* give correct results when using with locales other than en-US. Note that
|
|
77
|
+
* this variant is about 6MiB larger per architecture than default.
|
|
78
|
+
*/
|
|
79
|
+
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Private function to get the list of Native Architectures you want to build.
|
|
83
|
+
* This reads the value from reactNativeArchitectures in your gradle.properties
|
|
84
|
+
* file and works together with the --active-arch-only flag of react-native run-android.
|
|
85
|
+
*/
|
|
86
|
+
def reactNativeArchitectures() {
|
|
87
|
+
def value = project.getProperties().get("reactNativeArchitectures")
|
|
88
|
+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
android {
|
|
92
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
93
|
+
|
|
94
|
+
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
95
|
+
|
|
96
|
+
namespace "com.example.iamportreactnative"
|
|
97
|
+
defaultConfig {
|
|
98
|
+
applicationId "com.example.iamportreactnative"
|
|
99
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
100
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
101
|
+
versionCode 1
|
|
102
|
+
versionName "1.0"
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
splits {
|
|
106
|
+
abi {
|
|
107
|
+
reset()
|
|
108
|
+
enable enableSeparateBuildPerCPUArchitecture
|
|
109
|
+
universalApk false // If true, also generate a universal APK
|
|
110
|
+
include (*reactNativeArchitectures())
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
signingConfigs {
|
|
114
|
+
debug {
|
|
115
|
+
storeFile file('debug.keystore')
|
|
116
|
+
storePassword 'android'
|
|
117
|
+
keyAlias 'androiddebugkey'
|
|
118
|
+
keyPassword 'android'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
buildTypes {
|
|
122
|
+
debug {
|
|
123
|
+
signingConfig signingConfigs.debug
|
|
124
|
+
}
|
|
125
|
+
release {
|
|
126
|
+
// Caution! In production, you need to generate your own keystore file.
|
|
127
|
+
// see https://reactnative.dev/docs/signed-apk-android.
|
|
128
|
+
signingConfig signingConfigs.debug
|
|
129
|
+
minifyEnabled enableProguardInReleaseBuilds
|
|
130
|
+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// applicationVariants are e.g. debug, release
|
|
135
|
+
applicationVariants.all { variant ->
|
|
136
|
+
variant.outputs.each { output ->
|
|
137
|
+
// For each separate APK per architecture, set a unique version code as described here:
|
|
138
|
+
// https://developer.android.com/studio/build/configure-apk-splits.html
|
|
139
|
+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
|
|
140
|
+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
|
141
|
+
def abi = output.getFilter(OutputFile.ABI)
|
|
142
|
+
if (abi != null) { // null for the universal-debug, universal-release variants
|
|
143
|
+
output.versionCodeOverride =
|
|
144
|
+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
dependencies {
|
|
152
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
153
|
+
implementation("com.facebook.react:react-android")
|
|
154
|
+
|
|
155
|
+
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
|
|
156
|
+
|
|
157
|
+
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
|
|
158
|
+
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
|
159
|
+
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
|
163
|
+
if (hermesEnabled.toBoolean()) {
|
|
164
|
+
implementation("com.facebook.react:hermes-android")
|
|
165
|
+
} else {
|
|
166
|
+
implementation jscFlavor
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
171
|
+
|
|
172
|
+
project.ext.vectoricons = [
|
|
173
|
+
iconFontNames: [ 'FontAwesome.ttf' ]
|
|
174
|
+
]
|
|
175
|
+
|
|
176
|
+
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
|
177
|
+
def isNewArchitectureEnabled() {
|
|
178
|
+
// To opt-in for the New Architecture, you can either:
|
|
179
|
+
// - Set `newArchEnabled` to true inside the `gradle.properties` file
|
|
180
|
+
// - Invoke gradle with `-newArchEnabled=true`
|
|
181
|
+
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
|
|
182
|
+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
183
|
+
}
|
|
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,8 @@
|
|
|
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 android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
|
|
8
|
+
</manifest>
|
package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java
ADDED
|
@@ -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 com.example.iamportreactnative;
|
|
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
|
+
}
|