Showing
71 changed files
with
1678 additions
and
365 deletions
Example/.babelrc
0 → 100644
Example/.buckconfig
0 → 100644
Example/.flowconfig
0 → 100644
| 1 | +[ignore] | ||
| 2 | +; We fork some components by platform | ||
| 3 | +.*/*[.]android.js | ||
| 4 | + | ||
| 5 | +; Ignore "BUCK" generated dirs | ||
| 6 | +<PROJECT_ROOT>/\.buckd/ | ||
| 7 | + | ||
| 8 | +; Ignore unexpected extra "@providesModule" | ||
| 9 | +.*/node_modules/.*/node_modules/fbjs/.* | ||
| 10 | + | ||
| 11 | +; Ignore duplicate module providers | ||
| 12 | +; For RN Apps installed via npm, "Libraries" folder is inside | ||
| 13 | +; "node_modules/react-native" but in the source repo it is in the root | ||
| 14 | +.*/Libraries/react-native/React.js | ||
| 15 | + | ||
| 16 | +; Ignore polyfills | ||
| 17 | +.*/Libraries/polyfills/.* | ||
| 18 | + | ||
| 19 | +; Ignore metro | ||
| 20 | +.*/node_modules/metro/.* | ||
| 21 | + | ||
| 22 | +[include] | ||
| 23 | + | ||
| 24 | +[libs] | ||
| 25 | +node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
| 26 | +node_modules/react-native/flow/ | ||
| 27 | +node_modules/react-native/flow-github/ | ||
| 28 | + | ||
| 29 | +[options] | ||
| 30 | +emoji=true | ||
| 31 | + | ||
| 32 | +module.system=haste | ||
| 33 | + | ||
| 34 | +munge_underscores=true | ||
| 35 | + | ||
| 36 | +module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' | ||
| 37 | + | ||
| 38 | +module.file_ext=.js | ||
| 39 | +module.file_ext=.jsx | ||
| 40 | +module.file_ext=.json | ||
| 41 | +module.file_ext=.native.js | ||
| 42 | + | ||
| 43 | +suppress_type=$FlowIssue | ||
| 44 | +suppress_type=$FlowFixMe | ||
| 45 | +suppress_type=$FlowFixMeProps | ||
| 46 | +suppress_type=$FlowFixMeState | ||
| 47 | + | ||
| 48 | +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) | ||
| 49 | +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
| 50 | +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy | ||
| 51 | +suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError | ||
| 52 | + | ||
| 53 | +[version] | ||
| 54 | +^0.67.0 |
Example/.gitattributes
0 → 100644
| 1 | +*.pbxproj -text |
Example/.gitignore
0 → 100644
| 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 | +project.xcworkspace | ||
| 24 | + | ||
| 25 | +# Android/IntelliJ | ||
| 26 | +# | ||
| 27 | +build/ | ||
| 28 | +.idea | ||
| 29 | +.gradle | ||
| 30 | +local.properties | ||
| 31 | +*.iml | ||
| 32 | + | ||
| 33 | +# node.js | ||
| 34 | +# | ||
| 35 | +node_modules/ | ||
| 36 | +npm-debug.log | ||
| 37 | +yarn-error.log | ||
| 38 | + | ||
| 39 | +# BUCK | ||
| 40 | +buck-out/ | ||
| 41 | +\.buckd/ | ||
| 42 | +*.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 |
Example/.watchmanconfig
0 → 100644
| 1 | +{} |
Example/App.js
0 → 100644
| 1 | +/** | ||
| 2 | + * Sample React Native App | ||
| 3 | + * https://github.com/facebook/react-native | ||
| 4 | + * @flow | ||
| 5 | + */ | ||
| 6 | + | ||
| 7 | +import React, { Component } from 'react'; | ||
| 8 | +import { | ||
| 9 | + Platform, | ||
| 10 | + StyleSheet, | ||
| 11 | + TouchableOpacity, | ||
| 12 | + Alert, | ||
| 13 | + Text, | ||
| 14 | + View | ||
| 15 | +} from 'react-native'; | ||
| 16 | +var ImagePicker = require('react-native-image-picker'); | ||
| 17 | + | ||
| 18 | +import {readerQR} from 'react-native-lewin-qrcode' | ||
| 19 | + | ||
| 20 | +const instructions = Platform.select({ | ||
| 21 | + ios: 'Press Cmd+R to reload,\n' + | ||
| 22 | + 'Cmd+D or shake for dev menu', | ||
| 23 | + android: 'Double tap R on your keyboard to reload,\n' + | ||
| 24 | + 'Shake or press menu button for dev menu', | ||
| 25 | +}); | ||
| 26 | + | ||
| 27 | +type Props = {}; | ||
| 28 | +export default class App extends Component<Props> { | ||
| 29 | + openPhoto(){ | ||
| 30 | + console.log('ImagePicker'); | ||
| 31 | + ImagePicker.launchImageLibrary({}, (response) => { | ||
| 32 | + console.log('Response = ', response); | ||
| 33 | + | ||
| 34 | + if (response.didCancel) { | ||
| 35 | + console.log('User cancelled image picker'); | ||
| 36 | + } | ||
| 37 | + else if (response.error) { | ||
| 38 | + console.log('ImagePicker Error: ', response.error); | ||
| 39 | + } | ||
| 40 | + else if (response.customButton) { | ||
| 41 | + console.log('User tapped custom button: ', response.customButton); | ||
| 42 | + } | ||
| 43 | + else { | ||
| 44 | + if(response.uri){ | ||
| 45 | + var path = response.path; | ||
| 46 | + if(!path){ | ||
| 47 | + path = response.uri; | ||
| 48 | + } | ||
| 49 | + readerQR(path).then((data)=>{ | ||
| 50 | + Alert.alert('识别结果',data); | ||
| 51 | + }).catch((err)=>{ | ||
| 52 | + Alert.alert('识别失败'); | ||
| 53 | + }); | ||
| 54 | + | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + }); | ||
| 58 | + } | ||
| 59 | + render() { | ||
| 60 | + return ( | ||
| 61 | + <View style={styles.container}> | ||
| 62 | + <Text style={styles.welcome}> | ||
| 63 | + Welcome to React Native Lewin QRCODE! | ||
| 64 | + </Text> | ||
| 65 | + <TouchableOpacity onPress={()=>{ | ||
| 66 | + this.openPhoto(); | ||
| 67 | + }}> | ||
| 68 | + <Text style={{marginTop: 20}}>打开相册识别二维码</Text> | ||
| 69 | + </TouchableOpacity> | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + </View> | ||
| 73 | + ); | ||
| 74 | + } | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +const styles = StyleSheet.create({ | ||
| 78 | + container: { | ||
| 79 | + flex: 1, | ||
| 80 | + justifyContent: 'center', | ||
| 81 | + alignItems: 'center', | ||
| 82 | + backgroundColor: '#F5FCFF', | ||
| 83 | + }, | ||
| 84 | + welcome: { | ||
| 85 | + fontSize: 20, | ||
| 86 | + textAlign: 'center', | ||
| 87 | + margin: 10, | ||
| 88 | + }, | ||
| 89 | + instructions: { | ||
| 90 | + textAlign: 'center', | ||
| 91 | + color: '#333333', | ||
| 92 | + marginBottom: 5, | ||
| 93 | + }, | ||
| 94 | +}); |
Example/android/app/BUCK
0 → 100644
| 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 | +lib_deps = [] | ||
| 12 | + | ||
| 13 | +for jarfile in glob(['libs/*.jar']): | ||
| 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 | + ) | ||
| 20 | + | ||
| 21 | +for aarfile in glob(['libs/*.aar']): | ||
| 22 | + name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] | ||
| 23 | + lib_deps.append(':' + name) | ||
| 24 | + android_prebuilt_aar( | ||
| 25 | + name = name, | ||
| 26 | + aar = aarfile, | ||
| 27 | + ) | ||
| 28 | + | ||
| 29 | +android_library( | ||
| 30 | + name = "all-libs", | ||
| 31 | + exported_deps = lib_deps, | ||
| 32 | +) | ||
| 33 | + | ||
| 34 | +android_library( | ||
| 35 | + name = "app-code", | ||
| 36 | + srcs = glob([ | ||
| 37 | + "src/main/java/**/*.java", | ||
| 38 | + ]), | ||
| 39 | + deps = [ | ||
| 40 | + ":all-libs", | ||
| 41 | + ":build_config", | ||
| 42 | + ":res", | ||
| 43 | + ], | ||
| 44 | +) | ||
| 45 | + | ||
| 46 | +android_build_config( | ||
| 47 | + name = "build_config", | ||
| 48 | + package = "com.example", | ||
| 49 | +) | ||
| 50 | + | ||
| 51 | +android_resource( | ||
| 52 | + name = "res", | ||
| 53 | + package = "com.example", | ||
| 54 | + res = "src/main/res", | ||
| 55 | +) | ||
| 56 | + | ||
| 57 | +android_binary( | ||
| 58 | + name = "app", | ||
| 59 | + keystore = "//android/keystores:debug", | ||
| 60 | + manifest = "src/main/AndroidManifest.xml", | ||
| 61 | + package_type = "debug", | ||
| 62 | + deps = [ | ||
| 63 | + ":app-code", | ||
| 64 | + ], | ||
| 65 | +) |
Example/android/app/build.gradle
0 → 100644
| 1 | +apply plugin: "com.android.application" | ||
| 2 | + | ||
| 3 | +import com.android.build.OutputFile | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets | ||
| 7 | + * and bundleReleaseJsAndAssets). | ||
| 8 | + * These basically call `react-native bundle` with the correct arguments during the Android build | ||
| 9 | + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the | ||
| 10 | + * bundle directly from the development server. Below you can see all the possible configurations | ||
| 11 | + * and their defaults. If you decide to add a configuration block, make sure to add it before the | ||
| 12 | + * `apply from: "../../node_modules/react-native/react.gradle"` line. | ||
| 13 | + * | ||
| 14 | + * project.ext.react = [ | ||
| 15 | + * // the name of the generated asset file containing your JS bundle | ||
| 16 | + * bundleAssetName: "index.android.bundle", | ||
| 17 | + * | ||
| 18 | + * // the entry file for bundle generation | ||
| 19 | + * entryFile: "index.android.js", | ||
| 20 | + * | ||
| 21 | + * // whether to bundle JS and assets in debug mode | ||
| 22 | + * bundleInDebug: false, | ||
| 23 | + * | ||
| 24 | + * // whether to bundle JS and assets in release mode | ||
| 25 | + * bundleInRelease: true, | ||
| 26 | + * | ||
| 27 | + * // whether to bundle JS and assets in another build variant (if configured). | ||
| 28 | + * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants | ||
| 29 | + * // The configuration property can be in the following formats | ||
| 30 | + * // 'bundleIn${productFlavor}${buildType}' | ||
| 31 | + * // 'bundleIn${buildType}' | ||
| 32 | + * // bundleInFreeDebug: true, | ||
| 33 | + * // bundleInPaidRelease: true, | ||
| 34 | + * // bundleInBeta: true, | ||
| 35 | + * | ||
| 36 | + * // whether to disable dev mode in custom build variants (by default only disabled in release) | ||
| 37 | + * // for example: to disable dev mode in the staging build type (if configured) | ||
| 38 | + * devDisabledInStaging: true, | ||
| 39 | + * // The configuration property can be in the following formats | ||
| 40 | + * // 'devDisabledIn${productFlavor}${buildType}' | ||
| 41 | + * // 'devDisabledIn${buildType}' | ||
| 42 | + * | ||
| 43 | + * // the root of your project, i.e. where "package.json" lives | ||
| 44 | + * root: "../../", | ||
| 45 | + * | ||
| 46 | + * // where to put the JS bundle asset in debug mode | ||
| 47 | + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", | ||
| 48 | + * | ||
| 49 | + * // where to put the JS bundle asset in release mode | ||
| 50 | + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", | ||
| 51 | + * | ||
| 52 | + * // where to put drawable resources / React Native assets, e.g. the ones you use via | ||
| 53 | + * // require('./image.png')), in debug mode | ||
| 54 | + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", | ||
| 55 | + * | ||
| 56 | + * // where to put drawable resources / React Native assets, e.g. the ones you use via | ||
| 57 | + * // require('./image.png')), in release mode | ||
| 58 | + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", | ||
| 59 | + * | ||
| 60 | + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means | ||
| 61 | + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to | ||
| 62 | + * // date; if you have any other folders that you want to ignore for performance reasons (gradle | ||
| 63 | + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ | ||
| 64 | + * // for example, you might want to remove it from here. | ||
| 65 | + * inputExcludes: ["android/**", "ios/**"], | ||
| 66 | + * | ||
| 67 | + * // override which node gets called and with what additional arguments | ||
| 68 | + * nodeExecutableAndArgs: ["node"], | ||
| 69 | + * | ||
| 70 | + * // supply additional arguments to the packager | ||
| 71 | + * extraPackagerArgs: [] | ||
| 72 | + * ] | ||
| 73 | + */ | ||
| 74 | + | ||
| 75 | +project.ext.react = [ | ||
| 76 | + entryFile: "index.js" | ||
| 77 | +] | ||
| 78 | + | ||
| 79 | +apply from: "../../node_modules/react-native/react.gradle" | ||
| 80 | + | ||
| 81 | +/** | ||
| 82 | + * Set this to true to create two separate APKs instead of one: | ||
| 83 | + * - An APK that only works on ARM devices | ||
| 84 | + * - An APK that only works on x86 devices | ||
| 85 | + * The advantage is the size of the APK is reduced by about 4MB. | ||
| 86 | + * Upload all the APKs to the Play Store and people will download | ||
| 87 | + * the correct one based on the CPU architecture of their device. | ||
| 88 | + */ | ||
| 89 | +def enableSeparateBuildPerCPUArchitecture = false | ||
| 90 | + | ||
| 91 | +/** | ||
| 92 | + * Run Proguard to shrink the Java bytecode in release builds. | ||
| 93 | + */ | ||
| 94 | +def enableProguardInReleaseBuilds = false | ||
| 95 | + | ||
| 96 | +android { | ||
| 97 | + compileSdkVersion 23 | ||
| 98 | + buildToolsVersion "23.0.1" | ||
| 99 | + | ||
| 100 | + defaultConfig { | ||
| 101 | + applicationId "com.example" | ||
| 102 | + minSdkVersion 16 | ||
| 103 | + targetSdkVersion 22 | ||
| 104 | + versionCode 1 | ||
| 105 | + versionName "1.0" | ||
| 106 | + ndk { | ||
| 107 | + abiFilters "armeabi-v7a", "x86" | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + splits { | ||
| 111 | + abi { | ||
| 112 | + reset() | ||
| 113 | + enable enableSeparateBuildPerCPUArchitecture | ||
| 114 | + universalApk false // If true, also generate a universal APK | ||
| 115 | + include "armeabi-v7a", "x86" | ||
| 116 | + } | ||
| 117 | + } | ||
| 118 | + buildTypes { | ||
| 119 | + release { | ||
| 120 | + minifyEnabled enableProguardInReleaseBuilds | ||
| 121 | + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + // applicationVariants are e.g. debug, release | ||
| 125 | + applicationVariants.all { variant -> | ||
| 126 | + variant.outputs.each { output -> | ||
| 127 | + // For each separate APK per architecture, set a unique version code as described here: | ||
| 128 | + // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits | ||
| 129 | + def versionCodes = ["armeabi-v7a":1, "x86":2] | ||
| 130 | + def abi = output.getFilter(OutputFile.ABI) | ||
| 131 | + if (abi != null) { // null for the universal-debug, universal-release variants | ||
| 132 | + output.versionCodeOverride = | ||
| 133 | + versionCodes.get(abi) * 1048576 + defaultConfig.versionCode | ||
| 134 | + } | ||
| 135 | + } | ||
| 136 | + } | ||
| 137 | +} | ||
| 138 | + | ||
| 139 | +dependencies { | ||
| 140 | + compile project(':react-native-lewin-qrcode') | ||
| 141 | + compile project(':react-native-image-picker') | ||
| 142 | + compile fileTree(dir: "libs", include: ["*.jar"]) | ||
| 143 | + compile "com.android.support:appcompat-v7:23.0.1" | ||
| 144 | + compile "com.facebook.react:react-native:+" // From node_modules | ||
| 145 | +} | ||
| 146 | + | ||
| 147 | +// Run this once to be able to run the application with BUCK | ||
| 148 | +// puts all compile dependencies into folder libs for BUCK to use | ||
| 149 | +task copyDownloadableDepsToLibs(type: Copy) { | ||
| 150 | + from configurations.compile | ||
| 151 | + into 'libs' | ||
| 152 | +} |
Example/android/app/proguard-rules.pro
0 → 100644
| 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: | ||
| 11 | + | ||
| 12 | +# If your project uses WebView with JS, uncomment the following | ||
| 13 | +# and specify the fully qualified class name to the JavaScript interface | ||
| 14 | +# class: | ||
| 15 | +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
| 16 | +# public *; | ||
| 17 | +#} | ||
| 18 | + | ||
| 19 | +# Disabling obfuscation is useful if you collect stack traces from production crashes | ||
| 20 | +# (unless you are using a system that supports de-obfuscate the stack traces). | ||
| 21 | +-dontobfuscate | ||
| 22 | + | ||
| 23 | +# React Native | ||
| 24 | + | ||
| 25 | +# Keep our interfaces so they can be used by other ProGuard rules. | ||
| 26 | +# See http://sourceforge.net/p/proguard/bugs/466/ | ||
| 27 | +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip | ||
| 28 | +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters | ||
| 29 | +-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip | ||
| 30 | + | ||
| 31 | +# Do not strip any method/class that is annotated with @DoNotStrip | ||
| 32 | +-keep @com.facebook.proguard.annotations.DoNotStrip class * | ||
| 33 | +-keep @com.facebook.common.internal.DoNotStrip class * | ||
| 34 | +-keepclassmembers class * { | ||
| 35 | + @com.facebook.proguard.annotations.DoNotStrip *; | ||
| 36 | + @com.facebook.common.internal.DoNotStrip *; | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { | ||
| 40 | + void set*(***); | ||
| 41 | + *** get*(); | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } | ||
| 45 | +-keep class * extends com.facebook.react.bridge.NativeModule { *; } | ||
| 46 | +-keepclassmembers,includedescriptorclasses class * { native <methods>; } | ||
| 47 | +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; } | ||
| 48 | +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; } | ||
| 49 | +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; } | ||
| 50 | + | ||
| 51 | +-dontwarn com.facebook.react.** | ||
| 52 | + | ||
| 53 | +# TextLayoutBuilder uses a non-public Android constructor within StaticLayout. | ||
| 54 | +# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. | ||
| 55 | +-dontwarn android.text.StaticLayout | ||
| 56 | + | ||
| 57 | +# okhttp | ||
| 58 | + | ||
| 59 | +-keepattributes Signature | ||
| 60 | +-keepattributes *Annotation* | ||
| 61 | +-keep class okhttp3.** { *; } | ||
| 62 | +-keep interface okhttp3.** { *; } | ||
| 63 | +-dontwarn okhttp3.** | ||
| 64 | + | ||
| 65 | +# okio | ||
| 66 | + | ||
| 67 | +-keep class sun.misc.Unsafe { *; } | ||
| 68 | +-dontwarn java.nio.file.* | ||
| 69 | +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement | ||
| 70 | +-dontwarn okio.** |
| 1 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | + package="com.example"> | ||
| 3 | + | ||
| 4 | + <uses-permission android:name="android.permission.INTERNET" /> | ||
| 5 | + <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | ||
| 6 | + <uses-permission android:name="android.permission.CAMERA" /> | ||
| 7 | + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
| 8 | + | ||
| 9 | + <application | ||
| 10 | + android:name=".MainApplication" | ||
| 11 | + android:label="@string/app_name" | ||
| 12 | + android:icon="@mipmap/ic_launcher" | ||
| 13 | + android:allowBackup="false" | ||
| 14 | + android:theme="@style/AppTheme"> | ||
| 15 | + <activity | ||
| 16 | + android:name=".MainActivity" | ||
| 17 | + android:label="@string/app_name" | ||
| 18 | + android:configChanges="keyboard|keyboardHidden|orientation|screenSize" | ||
| 19 | + android:windowSoftInputMode="adjustResize"> | ||
| 20 | + <intent-filter> | ||
| 21 | + <action android:name="android.intent.action.MAIN" /> | ||
| 22 | + <category android:name="android.intent.category.LAUNCHER" /> | ||
| 23 | + </intent-filter> | ||
| 24 | + </activity> | ||
| 25 | + <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> | ||
| 26 | + </application> | ||
| 27 | + | ||
| 28 | +</manifest> |
| 1 | +package com.example; | ||
| 2 | + | ||
| 3 | +import com.facebook.react.ReactActivity; | ||
| 4 | + | ||
| 5 | +public class MainActivity extends ReactActivity { | ||
| 6 | + | ||
| 7 | + /** | ||
| 8 | + * Returns the name of the main component registered from JavaScript. | ||
| 9 | + * This is used to schedule rendering of the component. | ||
| 10 | + */ | ||
| 11 | + @Override | ||
| 12 | + protected String getMainComponentName() { | ||
| 13 | + return "Example"; | ||
| 14 | + } | ||
| 15 | +} |
| 1 | +package com.example; | ||
| 2 | + | ||
| 3 | +import android.app.Application; | ||
| 4 | + | ||
| 5 | +import com.facebook.react.ReactApplication; | ||
| 6 | +import com.lewin.qrcode.QRScanReaderPackage; | ||
| 7 | +import com.imagepicker.ImagePickerPackage; | ||
| 8 | +import com.facebook.react.ReactNativeHost; | ||
| 9 | +import com.facebook.react.ReactPackage; | ||
| 10 | +import com.facebook.react.shell.MainReactPackage; | ||
| 11 | +import com.facebook.soloader.SoLoader; | ||
| 12 | + | ||
| 13 | +import java.util.Arrays; | ||
| 14 | +import java.util.List; | ||
| 15 | + | ||
| 16 | +public class MainApplication extends Application implements ReactApplication { | ||
| 17 | + | ||
| 18 | + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { | ||
| 19 | + @Override | ||
| 20 | + public boolean getUseDeveloperSupport() { | ||
| 21 | + return BuildConfig.DEBUG; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @Override | ||
| 25 | + protected List<ReactPackage> getPackages() { | ||
| 26 | + return Arrays.<ReactPackage>asList( | ||
| 27 | + new MainReactPackage(), | ||
| 28 | + new QRScanReaderPackage(), | ||
| 29 | + new ImagePickerPackage() | ||
| 30 | + ); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @Override | ||
| 34 | + protected String getJSMainModuleName() { | ||
| 35 | + return "index"; | ||
| 36 | + } | ||
| 37 | + }; | ||
| 38 | + | ||
| 39 | + @Override | ||
| 40 | + public ReactNativeHost getReactNativeHost() { | ||
| 41 | + return mReactNativeHost; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + @Override | ||
| 45 | + public void onCreate() { | ||
| 46 | + super.onCreate(); | ||
| 47 | + SoLoader.init(this, /* native exopackage */ false); | ||
| 48 | + } | ||
| 49 | +} |
3.34 KB
2.15 KB
4.73 KB
7.54 KB
Example/android/build.gradle
0 → 100644
| 1 | +// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
| 2 | + | ||
| 3 | +buildscript { | ||
| 4 | + repositories { | ||
| 5 | + jcenter() | ||
| 6 | + } | ||
| 7 | + dependencies { | ||
| 8 | + classpath 'com.android.tools.build:gradle:2.2.3' | ||
| 9 | + | ||
| 10 | + // NOTE: Do not place your application dependencies here; they belong | ||
| 11 | + // in the individual module build.gradle files | ||
| 12 | + } | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +allprojects { | ||
| 16 | + repositories { | ||
| 17 | + mavenLocal() | ||
| 18 | + jcenter() | ||
| 19 | + maven { | ||
| 20 | + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
| 21 | + url "$rootDir/../node_modules/react-native/android" | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | +} |
Example/android/gradle.properties
0 → 100644
| 1 | +# Project-wide Gradle settings. | ||
| 2 | + | ||
| 3 | +# IDE (e.g. Android Studio) users: | ||
| 4 | +# Gradle settings configured through the IDE *will override* | ||
| 5 | +# any settings specified in this file. | ||
| 6 | + | ||
| 7 | +# For more details on how to configure your build environment visit | ||
| 8 | +# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
| 9 | + | ||
| 10 | +# Specifies the JVM arguments used for the daemon process. | ||
| 11 | +# The setting is particularly useful for tweaking memory settings. | ||
| 12 | +# Default value: -Xmx10248m -XX:MaxPermSize=256m | ||
| 13 | +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
| 14 | + | ||
| 15 | +# When configured, Gradle will run in incubating parallel mode. | ||
| 16 | +# This option should only be used with decoupled projects. More details, visit | ||
| 17 | +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
| 18 | +# org.gradle.parallel=true | ||
| 19 | + | ||
| 20 | +android.useDeprecatedNdk=true |
No preview for this file type
Example/android/gradlew
0 → 100755
| 1 | +#!/usr/bin/env bash | ||
| 2 | + | ||
| 3 | +############################################################################## | ||
| 4 | +## | ||
| 5 | +## Gradle start up script for UN*X | ||
| 6 | +## | ||
| 7 | +############################################################################## | ||
| 8 | + | ||
| 9 | +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
| 10 | +DEFAULT_JVM_OPTS="" | ||
| 11 | + | ||
| 12 | +APP_NAME="Gradle" | ||
| 13 | +APP_BASE_NAME=`basename "$0"` | ||
| 14 | + | ||
| 15 | +# Use the maximum available, or set MAX_FD != -1 to use that value. | ||
| 16 | +MAX_FD="maximum" | ||
| 17 | + | ||
| 18 | +warn ( ) { | ||
| 19 | + echo "$*" | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +die ( ) { | ||
| 23 | + echo | ||
| 24 | + echo "$*" | ||
| 25 | + echo | ||
| 26 | + exit 1 | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +# OS specific support (must be 'true' or 'false'). | ||
| 30 | +cygwin=false | ||
| 31 | +msys=false | ||
| 32 | +darwin=false | ||
| 33 | +case "`uname`" in | ||
| 34 | + CYGWIN* ) | ||
| 35 | + cygwin=true | ||
| 36 | + ;; | ||
| 37 | + Darwin* ) | ||
| 38 | + darwin=true | ||
| 39 | + ;; | ||
| 40 | + MINGW* ) | ||
| 41 | + msys=true | ||
| 42 | + ;; | ||
| 43 | +esac | ||
| 44 | + | ||
| 45 | +# For Cygwin, ensure paths are in UNIX format before anything is touched. | ||
| 46 | +if $cygwin ; then | ||
| 47 | + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` | ||
| 48 | +fi | ||
| 49 | + | ||
| 50 | +# Attempt to set APP_HOME | ||
| 51 | +# Resolve links: $0 may be a link | ||
| 52 | +PRG="$0" | ||
| 53 | +# Need this for relative symlinks. | ||
| 54 | +while [ -h "$PRG" ] ; do | ||
| 55 | + ls=`ls -ld "$PRG"` | ||
| 56 | + link=`expr "$ls" : '.*-> \(.*\)$'` | ||
| 57 | + if expr "$link" : '/.*' > /dev/null; then | ||
| 58 | + PRG="$link" | ||
| 59 | + else | ||
| 60 | + PRG=`dirname "$PRG"`"/$link" | ||
| 61 | + fi | ||
| 62 | +done | ||
| 63 | +SAVED="`pwd`" | ||
| 64 | +cd "`dirname \"$PRG\"`/" >&- | ||
| 65 | +APP_HOME="`pwd -P`" | ||
| 66 | +cd "$SAVED" >&- | ||
| 67 | + | ||
| 68 | +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | ||
| 69 | + | ||
| 70 | +# Determine the Java command to use to start the JVM. | ||
| 71 | +if [ -n "$JAVA_HOME" ] ; then | ||
| 72 | + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then | ||
| 73 | + # IBM's JDK on AIX uses strange locations for the executables | ||
| 74 | + JAVACMD="$JAVA_HOME/jre/sh/java" | ||
| 75 | + else | ||
| 76 | + JAVACMD="$JAVA_HOME/bin/java" | ||
| 77 | + fi | ||
| 78 | + if [ ! -x "$JAVACMD" ] ; then | ||
| 79 | + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME | ||
| 80 | + | ||
| 81 | +Please set the JAVA_HOME variable in your environment to match the | ||
| 82 | +location of your Java installation." | ||
| 83 | + fi | ||
| 84 | +else | ||
| 85 | + JAVACMD="java" | ||
| 86 | + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
| 87 | + | ||
| 88 | +Please set the JAVA_HOME variable in your environment to match the | ||
| 89 | +location of your Java installation." | ||
| 90 | +fi | ||
| 91 | + | ||
| 92 | +# Increase the maximum file descriptors if we can. | ||
| 93 | +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then | ||
| 94 | + MAX_FD_LIMIT=`ulimit -H -n` | ||
| 95 | + if [ $? -eq 0 ] ; then | ||
| 96 | + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then | ||
| 97 | + MAX_FD="$MAX_FD_LIMIT" | ||
| 98 | + fi | ||
| 99 | + ulimit -n $MAX_FD | ||
| 100 | + if [ $? -ne 0 ] ; then | ||
| 101 | + warn "Could not set maximum file descriptor limit: $MAX_FD" | ||
| 102 | + fi | ||
| 103 | + else | ||
| 104 | + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" | ||
| 105 | + fi | ||
| 106 | +fi | ||
| 107 | + | ||
| 108 | +# For Darwin, add options to specify how the application appears in the dock | ||
| 109 | +if $darwin; then | ||
| 110 | + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" | ||
| 111 | +fi | ||
| 112 | + | ||
| 113 | +# For Cygwin, switch paths to Windows format before running java | ||
| 114 | +if $cygwin ; then | ||
| 115 | + APP_HOME=`cygpath --path --mixed "$APP_HOME"` | ||
| 116 | + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` | ||
| 117 | + | ||
| 118 | + # We build the pattern for arguments to be converted via cygpath | ||
| 119 | + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` | ||
| 120 | + SEP="" | ||
| 121 | + for dir in $ROOTDIRSRAW ; do | ||
| 122 | + ROOTDIRS="$ROOTDIRS$SEP$dir" | ||
| 123 | + SEP="|" | ||
| 124 | + done | ||
| 125 | + OURCYGPATTERN="(^($ROOTDIRS))" | ||
| 126 | + # Add a user-defined pattern to the cygpath arguments | ||
| 127 | + if [ "$GRADLE_CYGPATTERN" != "" ] ; then | ||
| 128 | + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" | ||
| 129 | + fi | ||
| 130 | + # Now convert the arguments - kludge to limit ourselves to /bin/sh | ||
| 131 | + i=0 | ||
| 132 | + for arg in "$@" ; do | ||
| 133 | + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` | ||
| 134 | + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option | ||
| 135 | + | ||
| 136 | + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition | ||
| 137 | + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` | ||
| 138 | + else | ||
| 139 | + eval `echo args$i`="\"$arg\"" | ||
| 140 | + fi | ||
| 141 | + i=$((i+1)) | ||
| 142 | + done | ||
| 143 | + case $i in | ||
| 144 | + (0) set -- ;; | ||
| 145 | + (1) set -- "$args0" ;; | ||
| 146 | + (2) set -- "$args0" "$args1" ;; | ||
| 147 | + (3) set -- "$args0" "$args1" "$args2" ;; | ||
| 148 | + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; | ||
| 149 | + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; | ||
| 150 | + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; | ||
| 151 | + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; | ||
| 152 | + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; | ||
| 153 | + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; | ||
| 154 | + esac | ||
| 155 | +fi | ||
| 156 | + | ||
| 157 | +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules | ||
| 158 | +function splitJvmOpts() { | ||
| 159 | + JVM_OPTS=("$@") | ||
| 160 | +} | ||
| 161 | +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS | ||
| 162 | +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" | ||
| 163 | + | ||
| 164 | +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" |
Example/android/gradlew.bat
0 → 100644
| 1 | +@if "%DEBUG%" == "" @echo off | ||
| 2 | +@rem ########################################################################## | ||
| 3 | +@rem | ||
| 4 | +@rem Gradle startup script for Windows | ||
| 5 | +@rem | ||
| 6 | +@rem ########################################################################## | ||
| 7 | + | ||
| 8 | +@rem Set local scope for the variables with windows NT shell | ||
| 9 | +if "%OS%"=="Windows_NT" setlocal | ||
| 10 | + | ||
| 11 | +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
| 12 | +set DEFAULT_JVM_OPTS= | ||
| 13 | + | ||
| 14 | +set DIRNAME=%~dp0 | ||
| 15 | +if "%DIRNAME%" == "" set DIRNAME=. | ||
| 16 | +set APP_BASE_NAME=%~n0 | ||
| 17 | +set APP_HOME=%DIRNAME% | ||
| 18 | + | ||
| 19 | +@rem Find java.exe | ||
| 20 | +if defined JAVA_HOME goto findJavaFromJavaHome | ||
| 21 | + | ||
| 22 | +set JAVA_EXE=java.exe | ||
| 23 | +%JAVA_EXE% -version >NUL 2>&1 | ||
| 24 | +if "%ERRORLEVEL%" == "0" goto init | ||
| 25 | + | ||
| 26 | +echo. | ||
| 27 | +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
| 28 | +echo. | ||
| 29 | +echo Please set the JAVA_HOME variable in your environment to match the | ||
| 30 | +echo location of your Java installation. | ||
| 31 | + | ||
| 32 | +goto fail | ||
| 33 | + | ||
| 34 | +:findJavaFromJavaHome | ||
| 35 | +set JAVA_HOME=%JAVA_HOME:"=% | ||
| 36 | +set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
| 37 | + | ||
| 38 | +if exist "%JAVA_EXE%" goto init | ||
| 39 | + | ||
| 40 | +echo. | ||
| 41 | +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
| 42 | +echo. | ||
| 43 | +echo Please set the JAVA_HOME variable in your environment to match the | ||
| 44 | +echo location of your Java installation. | ||
| 45 | + | ||
| 46 | +goto fail | ||
| 47 | + | ||
| 48 | +:init | ||
| 49 | +@rem Get command-line arguments, handling Windowz variants | ||
| 50 | + | ||
| 51 | +if not "%OS%" == "Windows_NT" goto win9xME_args | ||
| 52 | +if "%@eval[2+2]" == "4" goto 4NT_args | ||
| 53 | + | ||
| 54 | +:win9xME_args | ||
| 55 | +@rem Slurp the command line arguments. | ||
| 56 | +set CMD_LINE_ARGS= | ||
| 57 | +set _SKIP=2 | ||
| 58 | + | ||
| 59 | +:win9xME_args_slurp | ||
| 60 | +if "x%~1" == "x" goto execute | ||
| 61 | + | ||
| 62 | +set CMD_LINE_ARGS=%* | ||
| 63 | +goto execute | ||
| 64 | + | ||
| 65 | +:4NT_args | ||
| 66 | +@rem Get arguments from the 4NT Shell from JP Software | ||
| 67 | +set CMD_LINE_ARGS=%$ | ||
| 68 | + | ||
| 69 | +:execute | ||
| 70 | +@rem Setup the command line | ||
| 71 | + | ||
| 72 | +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
| 73 | + | ||
| 74 | +@rem Execute Gradle | ||
| 75 | +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||
| 76 | + | ||
| 77 | +:end | ||
| 78 | +@rem End local scope for the variables with windows NT shell | ||
| 79 | +if "%ERRORLEVEL%"=="0" goto mainEnd | ||
| 80 | + | ||
| 81 | +:fail | ||
| 82 | +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||
| 83 | +rem the _cmd.exe /c_ return code! | ||
| 84 | +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||
| 85 | +exit /b 1 | ||
| 86 | + | ||
| 87 | +:mainEnd | ||
| 88 | +if "%OS%"=="Windows_NT" endlocal | ||
| 89 | + | ||
| 90 | +:omega |
Example/android/keystores/BUCK
0 → 100644
Example/android/settings.gradle
0 → 100644
| 1 | +rootProject.name = 'Example' | ||
| 2 | +include ':react-native-lewin-qrcode' | ||
| 3 | +project(':react-native-lewin-qrcode').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-lewin-qrcode/android') | ||
| 4 | +include ':react-native-image-picker' | ||
| 5 | +project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android') | ||
| 6 | + | ||
| 7 | +include ':app' |
Example/app.json
0 → 100644
Example/index.js
0 → 100644
Example/ios/Example-tvOS/Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>en</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>$(EXECUTABLE_NAME)</string> | ||
| 9 | + <key>CFBundleIdentifier</key> | ||
| 10 | + <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> | ||
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 12 | + <string>6.0</string> | ||
| 13 | + <key>CFBundleName</key> | ||
| 14 | + <string>$(PRODUCT_NAME)</string> | ||
| 15 | + <key>CFBundlePackageType</key> | ||
| 16 | + <string>APPL</string> | ||
| 17 | + <key>CFBundleShortVersionString</key> | ||
| 18 | + <string>1.0</string> | ||
| 19 | + <key>CFBundleSignature</key> | ||
| 20 | + <string>????</string> | ||
| 21 | + <key>CFBundleVersion</key> | ||
| 22 | + <string>1</string> | ||
| 23 | + <key>LSRequiresIPhoneOS</key> | ||
| 24 | + <true/> | ||
| 25 | + <key>UILaunchStoryboardName</key> | ||
| 26 | + <string>LaunchScreen</string> | ||
| 27 | + <key>UIRequiredDeviceCapabilities</key> | ||
| 28 | + <array> | ||
| 29 | + <string>armv7</string> | ||
| 30 | + </array> | ||
| 31 | + <key>UISupportedInterfaceOrientations</key> | ||
| 32 | + <array> | ||
| 33 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 34 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 35 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 36 | + </array> | ||
| 37 | + <key>UIViewControllerBasedStatusBarAppearance</key> | ||
| 38 | + <false/> | ||
| 39 | + <key>NSLocationWhenInUseUsageDescription</key> | ||
| 40 | + <string></string> | ||
| 41 | + <key>NSAppTransportSecurity</key> | ||
| 42 | + <!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ --> | ||
| 43 | + <dict> | ||
| 44 | + <key>NSExceptionDomains</key> | ||
| 45 | + <dict> | ||
| 46 | + <key>localhost</key> | ||
| 47 | + <dict> | ||
| 48 | + <key>NSExceptionAllowsInsecureHTTPLoads</key> | ||
| 49 | + <true/> | ||
| 50 | + </dict> | ||
| 51 | + </dict> | ||
| 52 | + </dict> | ||
| 53 | +</dict> | ||
| 54 | +</plist> |
| @@ -3,22 +3,22 @@ | @@ -3,22 +3,22 @@ | ||
| 3 | <plist version="1.0"> | 3 | <plist version="1.0"> |
| 4 | <dict> | 4 | <dict> |
| 5 | <key>CFBundleDevelopmentRegion</key> | 5 | <key>CFBundleDevelopmentRegion</key> |
| 6 | - <string>$(DEVELOPMENT_LANGUAGE)</string> | 6 | + <string>en</string> |
| 7 | <key>CFBundleExecutable</key> | 7 | <key>CFBundleExecutable</key> |
| 8 | <string>$(EXECUTABLE_NAME)</string> | 8 | <string>$(EXECUTABLE_NAME)</string> |
| 9 | <key>CFBundleIdentifier</key> | 9 | <key>CFBundleIdentifier</key> |
| 10 | - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | 10 | + <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> |
| 11 | <key>CFBundleInfoDictionaryVersion</key> | 11 | <key>CFBundleInfoDictionaryVersion</key> |
| 12 | <string>6.0</string> | 12 | <string>6.0</string> |
| 13 | <key>CFBundleName</key> | 13 | <key>CFBundleName</key> |
| 14 | <string>$(PRODUCT_NAME)</string> | 14 | <string>$(PRODUCT_NAME)</string> |
| 15 | <key>CFBundlePackageType</key> | 15 | <key>CFBundlePackageType</key> |
| 16 | - <string>FMWK</string> | 16 | + <string>BNDL</string> |
| 17 | <key>CFBundleShortVersionString</key> | 17 | <key>CFBundleShortVersionString</key> |
| 18 | <string>1.0</string> | 18 | <string>1.0</string> |
| 19 | + <key>CFBundleSignature</key> | ||
| 20 | + <string>????</string> | ||
| 19 | <key>CFBundleVersion</key> | 21 | <key>CFBundleVersion</key> |
| 20 | - <string>$(CURRENT_PROJECT_VERSION)</string> | 22 | + <string>1</string> |
| 21 | - <key>NSPrincipalClass</key> | ||
| 22 | - <string></string> | ||
| 23 | </dict> | 23 | </dict> |
| 24 | </plist> | 24 | </plist> |
This diff is collapsed. Click to expand it.
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "0820" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "NO" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "2D2A28121D9B038B00D4039D" | ||
| 18 | + BuildableName = "libReact.a" | ||
| 19 | + BlueprintName = "React-tvOS" | ||
| 20 | + ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + <BuildActionEntry | ||
| 24 | + buildForTesting = "YES" | ||
| 25 | + buildForRunning = "YES" | ||
| 26 | + buildForProfiling = "YES" | ||
| 27 | + buildForArchiving = "YES" | ||
| 28 | + buildForAnalyzing = "YES"> | ||
| 29 | + <BuildableReference | ||
| 30 | + BuildableIdentifier = "primary" | ||
| 31 | + BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" | ||
| 32 | + BuildableName = "Example-tvOS.app" | ||
| 33 | + BlueprintName = "Example-tvOS" | ||
| 34 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 35 | + </BuildableReference> | ||
| 36 | + </BuildActionEntry> | ||
| 37 | + <BuildActionEntry | ||
| 38 | + buildForTesting = "YES" | ||
| 39 | + buildForRunning = "YES" | ||
| 40 | + buildForProfiling = "NO" | ||
| 41 | + buildForArchiving = "NO" | ||
| 42 | + buildForAnalyzing = "YES"> | ||
| 43 | + <BuildableReference | ||
| 44 | + BuildableIdentifier = "primary" | ||
| 45 | + BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7" | ||
| 46 | + BuildableName = "Example-tvOSTests.xctest" | ||
| 47 | + BlueprintName = "Example-tvOSTests" | ||
| 48 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 49 | + </BuildableReference> | ||
| 50 | + </BuildActionEntry> | ||
| 51 | + </BuildActionEntries> | ||
| 52 | + </BuildAction> | ||
| 53 | + <TestAction | ||
| 54 | + buildConfiguration = "Debug" | ||
| 55 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 56 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 57 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 58 | + <Testables> | ||
| 59 | + <TestableReference | ||
| 60 | + skipped = "NO"> | ||
| 61 | + <BuildableReference | ||
| 62 | + BuildableIdentifier = "primary" | ||
| 63 | + BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7" | ||
| 64 | + BuildableName = "Example-tvOSTests.xctest" | ||
| 65 | + BlueprintName = "Example-tvOSTests" | ||
| 66 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 67 | + </BuildableReference> | ||
| 68 | + </TestableReference> | ||
| 69 | + </Testables> | ||
| 70 | + <MacroExpansion> | ||
| 71 | + <BuildableReference | ||
| 72 | + BuildableIdentifier = "primary" | ||
| 73 | + BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" | ||
| 74 | + BuildableName = "Example-tvOS.app" | ||
| 75 | + BlueprintName = "Example-tvOS" | ||
| 76 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 77 | + </BuildableReference> | ||
| 78 | + </MacroExpansion> | ||
| 79 | + <AdditionalOptions> | ||
| 80 | + </AdditionalOptions> | ||
| 81 | + </TestAction> | ||
| 82 | + <LaunchAction | ||
| 83 | + buildConfiguration = "Debug" | ||
| 84 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 85 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 86 | + launchStyle = "0" | ||
| 87 | + useCustomWorkingDirectory = "NO" | ||
| 88 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 89 | + debugDocumentVersioning = "YES" | ||
| 90 | + debugServiceExtension = "internal" | ||
| 91 | + allowLocationSimulation = "YES"> | ||
| 92 | + <BuildableProductRunnable | ||
| 93 | + runnableDebuggingMode = "0"> | ||
| 94 | + <BuildableReference | ||
| 95 | + BuildableIdentifier = "primary" | ||
| 96 | + BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" | ||
| 97 | + BuildableName = "Example-tvOS.app" | ||
| 98 | + BlueprintName = "Example-tvOS" | ||
| 99 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 100 | + </BuildableReference> | ||
| 101 | + </BuildableProductRunnable> | ||
| 102 | + <AdditionalOptions> | ||
| 103 | + </AdditionalOptions> | ||
| 104 | + </LaunchAction> | ||
| 105 | + <ProfileAction | ||
| 106 | + buildConfiguration = "Release" | ||
| 107 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 108 | + savedToolIdentifier = "" | ||
| 109 | + useCustomWorkingDirectory = "NO" | ||
| 110 | + debugDocumentVersioning = "YES"> | ||
| 111 | + <BuildableProductRunnable | ||
| 112 | + runnableDebuggingMode = "0"> | ||
| 113 | + <BuildableReference | ||
| 114 | + BuildableIdentifier = "primary" | ||
| 115 | + BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" | ||
| 116 | + BuildableName = "Example-tvOS.app" | ||
| 117 | + BlueprintName = "Example-tvOS" | ||
| 118 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 119 | + </BuildableReference> | ||
| 120 | + </BuildableProductRunnable> | ||
| 121 | + </ProfileAction> | ||
| 122 | + <AnalyzeAction | ||
| 123 | + buildConfiguration = "Debug"> | ||
| 124 | + </AnalyzeAction> | ||
| 125 | + <ArchiveAction | ||
| 126 | + buildConfiguration = "Release" | ||
| 127 | + revealArchiveInOrganizer = "YES"> | ||
| 128 | + </ArchiveAction> | ||
| 129 | +</Scheme> |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "0620" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "NO" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192" | ||
| 18 | + BuildableName = "libReact.a" | ||
| 19 | + BlueprintName = "React" | ||
| 20 | + ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + <BuildActionEntry | ||
| 24 | + buildForTesting = "YES" | ||
| 25 | + buildForRunning = "YES" | ||
| 26 | + buildForProfiling = "YES" | ||
| 27 | + buildForArchiving = "YES" | ||
| 28 | + buildForAnalyzing = "YES"> | ||
| 29 | + <BuildableReference | ||
| 30 | + BuildableIdentifier = "primary" | ||
| 31 | + BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| 32 | + BuildableName = "Example.app" | ||
| 33 | + BlueprintName = "Example" | ||
| 34 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 35 | + </BuildableReference> | ||
| 36 | + </BuildActionEntry> | ||
| 37 | + <BuildActionEntry | ||
| 38 | + buildForTesting = "YES" | ||
| 39 | + buildForRunning = "YES" | ||
| 40 | + buildForProfiling = "NO" | ||
| 41 | + buildForArchiving = "NO" | ||
| 42 | + buildForAnalyzing = "YES"> | ||
| 43 | + <BuildableReference | ||
| 44 | + BuildableIdentifier = "primary" | ||
| 45 | + BlueprintIdentifier = "00E356ED1AD99517003FC87E" | ||
| 46 | + BuildableName = "ExampleTests.xctest" | ||
| 47 | + BlueprintName = "ExampleTests" | ||
| 48 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 49 | + </BuildableReference> | ||
| 50 | + </BuildActionEntry> | ||
| 51 | + </BuildActionEntries> | ||
| 52 | + </BuildAction> | ||
| 53 | + <TestAction | ||
| 54 | + buildConfiguration = "Debug" | ||
| 55 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 56 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 57 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 58 | + <Testables> | ||
| 59 | + <TestableReference | ||
| 60 | + skipped = "NO"> | ||
| 61 | + <BuildableReference | ||
| 62 | + BuildableIdentifier = "primary" | ||
| 63 | + BlueprintIdentifier = "00E356ED1AD99517003FC87E" | ||
| 64 | + BuildableName = "ExampleTests.xctest" | ||
| 65 | + BlueprintName = "ExampleTests" | ||
| 66 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 67 | + </BuildableReference> | ||
| 68 | + </TestableReference> | ||
| 69 | + </Testables> | ||
| 70 | + <MacroExpansion> | ||
| 71 | + <BuildableReference | ||
| 72 | + BuildableIdentifier = "primary" | ||
| 73 | + BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| 74 | + BuildableName = "Example.app" | ||
| 75 | + BlueprintName = "Example" | ||
| 76 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 77 | + </BuildableReference> | ||
| 78 | + </MacroExpansion> | ||
| 79 | + <AdditionalOptions> | ||
| 80 | + </AdditionalOptions> | ||
| 81 | + </TestAction> | ||
| 82 | + <LaunchAction | ||
| 83 | + buildConfiguration = "Debug" | ||
| 84 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 85 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 86 | + launchStyle = "0" | ||
| 87 | + useCustomWorkingDirectory = "NO" | ||
| 88 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 89 | + debugDocumentVersioning = "YES" | ||
| 90 | + debugServiceExtension = "internal" | ||
| 91 | + allowLocationSimulation = "YES"> | ||
| 92 | + <BuildableProductRunnable | ||
| 93 | + runnableDebuggingMode = "0"> | ||
| 94 | + <BuildableReference | ||
| 95 | + BuildableIdentifier = "primary" | ||
| 96 | + BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| 97 | + BuildableName = "Example.app" | ||
| 98 | + BlueprintName = "Example" | ||
| 99 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 100 | + </BuildableReference> | ||
| 101 | + </BuildableProductRunnable> | ||
| 102 | + <AdditionalOptions> | ||
| 103 | + </AdditionalOptions> | ||
| 104 | + </LaunchAction> | ||
| 105 | + <ProfileAction | ||
| 106 | + buildConfiguration = "Release" | ||
| 107 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 108 | + savedToolIdentifier = "" | ||
| 109 | + useCustomWorkingDirectory = "NO" | ||
| 110 | + debugDocumentVersioning = "YES"> | ||
| 111 | + <BuildableProductRunnable | ||
| 112 | + runnableDebuggingMode = "0"> | ||
| 113 | + <BuildableReference | ||
| 114 | + BuildableIdentifier = "primary" | ||
| 115 | + BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| 116 | + BuildableName = "Example.app" | ||
| 117 | + BlueprintName = "Example" | ||
| 118 | + ReferencedContainer = "container:Example.xcodeproj"> | ||
| 119 | + </BuildableReference> | ||
| 120 | + </BuildableProductRunnable> | ||
| 121 | + </ProfileAction> | ||
| 122 | + <AnalyzeAction | ||
| 123 | + buildConfiguration = "Debug"> | ||
| 124 | + </AnalyzeAction> | ||
| 125 | + <ArchiveAction | ||
| 126 | + buildConfiguration = "Release" | ||
| 127 | + revealArchiveInOrganizer = "YES"> | ||
| 128 | + </ArchiveAction> | ||
| 129 | +</Scheme> |
Example/ios/Example/AppDelegate.h
0 → 100644
| 1 | +/** | ||
| 2 | + * Copyright (c) 2015-present, Facebook, Inc. | ||
| 3 | + * | ||
| 4 | + * This source code is licensed under the MIT license found in the | ||
| 5 | + * LICENSE file in the root directory of this source tree. | ||
| 6 | + */ | ||
| 7 | + | ||
| 8 | +#import <UIKit/UIKit.h> | ||
| 9 | + | ||
| 10 | +@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
| 11 | + | ||
| 12 | +@property (nonatomic, strong) UIWindow *window; | ||
| 13 | + | ||
| 14 | +@end |
Example/ios/Example/AppDelegate.m
0 → 100644
| 1 | +/** | ||
| 2 | + * Copyright (c) 2015-present, Facebook, Inc. | ||
| 3 | + * | ||
| 4 | + * This source code is licensed under the MIT license found in the | ||
| 5 | + * LICENSE file in the root directory of this source tree. | ||
| 6 | + */ | ||
| 7 | + | ||
| 8 | +#import "AppDelegate.h" | ||
| 9 | + | ||
| 10 | +#import <React/RCTBundleURLProvider.h> | ||
| 11 | +#import <React/RCTRootView.h> | ||
| 12 | + | ||
| 13 | +@implementation AppDelegate | ||
| 14 | + | ||
| 15 | +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
| 16 | +{ | ||
| 17 | + NSURL *jsCodeLocation; | ||
| 18 | + | ||
| 19 | + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; | ||
| 20 | + | ||
| 21 | + RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation | ||
| 22 | + moduleName:@"Example" | ||
| 23 | + initialProperties:nil | ||
| 24 | + launchOptions:launchOptions]; | ||
| 25 | + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; | ||
| 26 | + | ||
| 27 | + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | ||
| 28 | + UIViewController *rootViewController = [UIViewController new]; | ||
| 29 | + rootViewController.view = rootView; | ||
| 30 | + self.window.rootViewController = rootViewController; | ||
| 31 | + [self.window makeKeyAndVisible]; | ||
| 32 | + return YES; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +@end |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> | ||
| 3 | + <dependencies> | ||
| 4 | + <deployment identifier="iOS"/> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/> | ||
| 6 | + <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> | ||
| 7 | + </dependencies> | ||
| 8 | + <objects> | ||
| 9 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
| 10 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
| 11 | + <view contentMode="scaleToFill" id="iN0-l3-epB"> | ||
| 12 | + <rect key="frame" x="0.0" y="0.0" width="480" height="480"/> | ||
| 13 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 14 | + <subviews> | ||
| 15 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> | ||
| 16 | + <rect key="frame" x="20" y="439" width="441" height="21"/> | ||
| 17 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
| 18 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | ||
| 19 | + <nil key="highlightedColor"/> | ||
| 20 | + </label> | ||
| 21 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> | ||
| 22 | + <rect key="frame" x="20" y="140" width="441" height="43"/> | ||
| 23 | + <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> | ||
| 24 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | ||
| 25 | + <nil key="highlightedColor"/> | ||
| 26 | + </label> | ||
| 27 | + </subviews> | ||
| 28 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
| 29 | + <constraints> | ||
| 30 | + <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> | ||
| 31 | + <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> | ||
| 32 | + <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/> | ||
| 33 | + <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/> | ||
| 34 | + <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/> | ||
| 35 | + <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/> | ||
| 36 | + </constraints> | ||
| 37 | + <nil key="simulatedStatusBarMetrics"/> | ||
| 38 | + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | ||
| 39 | + <point key="canvasLocation" x="548" y="455"/> | ||
| 40 | + </view> | ||
| 41 | + </objects> | ||
| 42 | +</document> |
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "iphone", | ||
| 5 | + "size" : "29x29", | ||
| 6 | + "scale" : "2x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "idiom" : "iphone", | ||
| 10 | + "size" : "29x29", | ||
| 11 | + "scale" : "3x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "idiom" : "iphone", | ||
| 15 | + "size" : "40x40", | ||
| 16 | + "scale" : "2x" | ||
| 17 | + }, | ||
| 18 | + { | ||
| 19 | + "idiom" : "iphone", | ||
| 20 | + "size" : "40x40", | ||
| 21 | + "scale" : "3x" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "idiom" : "iphone", | ||
| 25 | + "size" : "60x60", | ||
| 26 | + "scale" : "2x" | ||
| 27 | + }, | ||
| 28 | + { | ||
| 29 | + "idiom" : "iphone", | ||
| 30 | + "size" : "60x60", | ||
| 31 | + "scale" : "3x" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "version" : 1, | ||
| 36 | + "author" : "xcode" | ||
| 37 | + } | ||
| 38 | +} |
Example/ios/Example/Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>NSPhotoLibraryUsageDescription</key> | ||
| 6 | + <string>$(PRODUCT_NAME) would like access to your photo gallery</string> | ||
| 7 | + <key>NSCameraUsageDescription</key> | ||
| 8 | + <string>$(PRODUCT_NAME) would like to use your camera</string> | ||
| 9 | + <key>NSPhotoLibraryAddUsageDescription</key> | ||
| 10 | + <string>$(PRODUCT_NAME) would like to save photos to your photo gallery</string> | ||
| 11 | + <key>NSMicrophoneUsageDescription</key> | ||
| 12 | + <string>$(PRODUCT_NAME) would like to your microphone (for videos)</string> | ||
| 13 | + <key>CFBundleDevelopmentRegion</key> | ||
| 14 | + <string>en</string> | ||
| 15 | + <key>CFBundleDisplayName</key> | ||
| 16 | + <string>Example</string> | ||
| 17 | + <key>CFBundleExecutable</key> | ||
| 18 | + <string>$(EXECUTABLE_NAME)</string> | ||
| 19 | + <key>CFBundleIdentifier</key> | ||
| 20 | + <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> | ||
| 21 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 22 | + <string>6.0</string> | ||
| 23 | + <key>CFBundleName</key> | ||
| 24 | + <string>$(PRODUCT_NAME)</string> | ||
| 25 | + <key>CFBundlePackageType</key> | ||
| 26 | + <string>APPL</string> | ||
| 27 | + <key>CFBundleShortVersionString</key> | ||
| 28 | + <string>1.0</string> | ||
| 29 | + <key>CFBundleSignature</key> | ||
| 30 | + <string>????</string> | ||
| 31 | + <key>CFBundleVersion</key> | ||
| 32 | + <string>1</string> | ||
| 33 | + <key>LSRequiresIPhoneOS</key> | ||
| 34 | + <true/> | ||
| 35 | + <key>UILaunchStoryboardName</key> | ||
| 36 | + <string>LaunchScreen</string> | ||
| 37 | + <key>UIRequiredDeviceCapabilities</key> | ||
| 38 | + <array> | ||
| 39 | + <string>armv7</string> | ||
| 40 | + </array> | ||
| 41 | + <key>UISupportedInterfaceOrientations</key> | ||
| 42 | + <array> | ||
| 43 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 44 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 45 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 46 | + </array> | ||
| 47 | + <key>UIViewControllerBasedStatusBarAppearance</key> | ||
| 48 | + <false/> | ||
| 49 | + <key>NSLocationWhenInUseUsageDescription</key> | ||
| 50 | + <string></string> | ||
| 51 | + <key>NSAppTransportSecurity</key> | ||
| 52 | + <!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ --> | ||
| 53 | + <dict> | ||
| 54 | + <key>NSExceptionDomains</key> | ||
| 55 | + <dict> | ||
| 56 | + <key>localhost</key> | ||
| 57 | + <dict> | ||
| 58 | + <key>NSExceptionAllowsInsecureHTTPLoads</key> | ||
| 59 | + <true/> | ||
| 60 | + </dict> | ||
| 61 | + </dict> | ||
| 62 | + </dict> | ||
| 63 | +</dict> | ||
| 64 | +</plist> |
Example/ios/Example/main.m
0 → 100644
| 1 | +/** | ||
| 2 | + * Copyright (c) 2015-present, Facebook, Inc. | ||
| 3 | + * | ||
| 4 | + * This source code is licensed under the MIT license found in the | ||
| 5 | + * LICENSE file in the root directory of this source tree. | ||
| 6 | + */ | ||
| 7 | + | ||
| 8 | +#import <UIKit/UIKit.h> | ||
| 9 | + | ||
| 10 | +#import "AppDelegate.h" | ||
| 11 | + | ||
| 12 | +int main(int argc, char * argv[]) { | ||
| 13 | + @autoreleasepool { | ||
| 14 | + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); | ||
| 15 | + } | ||
| 16 | +} |
Example/ios/ExampleTests/ExampleTests.m
0 → 100644
| 1 | +/** | ||
| 2 | + * Copyright (c) 2015-present, Facebook, Inc. | ||
| 3 | + * | ||
| 4 | + * This source code is licensed under the MIT license found in the | ||
| 5 | + * LICENSE file in the root directory of this source tree. | ||
| 6 | + */ | ||
| 7 | + | ||
| 8 | +#import <UIKit/UIKit.h> | ||
| 9 | +#import <XCTest/XCTest.h> | ||
| 10 | + | ||
| 11 | +#import <React/RCTLog.h> | ||
| 12 | +#import <React/RCTRootView.h> | ||
| 13 | + | ||
| 14 | +#define TIMEOUT_SECONDS 600 | ||
| 15 | +#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" | ||
| 16 | + | ||
| 17 | +@interface ExampleTests : XCTestCase | ||
| 18 | + | ||
| 19 | +@end | ||
| 20 | + | ||
| 21 | +@implementation ExampleTests | ||
| 22 | + | ||
| 23 | +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test | ||
| 24 | +{ | ||
| 25 | + if (test(view)) { | ||
| 26 | + return YES; | ||
| 27 | + } | ||
| 28 | + for (UIView *subview in [view subviews]) { | ||
| 29 | + if ([self findSubviewInView:subview matching:test]) { | ||
| 30 | + return YES; | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | + return NO; | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | +- (void)testRendersWelcomeScreen | ||
| 37 | +{ | ||
| 38 | + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; | ||
| 39 | + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; | ||
| 40 | + BOOL foundElement = NO; | ||
| 41 | + | ||
| 42 | + __block NSString *redboxError = nil; | ||
| 43 | + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { | ||
| 44 | + if (level >= RCTLogLevelError) { | ||
| 45 | + redboxError = message; | ||
| 46 | + } | ||
| 47 | + }); | ||
| 48 | + | ||
| 49 | + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { | ||
| 50 | + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; | ||
| 51 | + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; | ||
| 52 | + | ||
| 53 | + foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { | ||
| 54 | + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { | ||
| 55 | + return YES; | ||
| 56 | + } | ||
| 57 | + return NO; | ||
| 58 | + }]; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + RCTSetLogFunction(RCTDefaultLogFunction); | ||
| 62 | + | ||
| 63 | + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); | ||
| 64 | + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); | ||
| 65 | +} | ||
| 66 | + | ||
| 67 | + | ||
| 68 | +@end |
Example/ios/ExampleTests/Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>en</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>$(EXECUTABLE_NAME)</string> | ||
| 9 | + <key>CFBundleIdentifier</key> | ||
| 10 | + <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> | ||
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 12 | + <string>6.0</string> | ||
| 13 | + <key>CFBundleName</key> | ||
| 14 | + <string>$(PRODUCT_NAME)</string> | ||
| 15 | + <key>CFBundlePackageType</key> | ||
| 16 | + <string>BNDL</string> | ||
| 17 | + <key>CFBundleShortVersionString</key> | ||
| 18 | + <string>1.0</string> | ||
| 19 | + <key>CFBundleSignature</key> | ||
| 20 | + <string>????</string> | ||
| 21 | + <key>CFBundleVersion</key> | ||
| 22 | + <string>1</string> | ||
| 23 | +</dict> | ||
| 24 | +</plist> |
Example/package-lock.json
0 → 100644
This diff could not be displayed because it is too large.
Example/package.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "Example", | ||
| 3 | + "version": "0.0.1", | ||
| 4 | + "private": true, | ||
| 5 | + "scripts": { | ||
| 6 | + "start": "node node_modules/react-native/local-cli/cli.js start", | ||
| 7 | + "test": "jest" | ||
| 8 | + }, | ||
| 9 | + "dependencies": { | ||
| 10 | + "react": "latest", | ||
| 11 | + "react-native": "latest", | ||
| 12 | + "react-native-image-picker": "^0.26.7", | ||
| 13 | + "react-native-lewin-qrcode": "file:../" | ||
| 14 | + }, | ||
| 15 | + "devDependencies": { | ||
| 16 | + "babel-jest": "22.4.3", | ||
| 17 | + "babel-preset-react-native": "4.0.0", | ||
| 18 | + "jest": "22.4.3", | ||
| 19 | + "react-test-renderer": "16.3.1" | ||
| 20 | + }, | ||
| 21 | + "jest": { | ||
| 22 | + "preset": "react-native" | ||
| 23 | + } | ||
| 24 | +} |
Example/yarn.lock
0 → 100644
This diff could not be displayed because it is too large.
android/.gitignore
deleted
100644 → 0
| 1 | 1 | ||
| 2 | +import groovy.json.JsonSlurper | ||
| 3 | + | ||
| 4 | +def computeVersionName() { | ||
| 5 | + // dynamically retrieve version from package.json | ||
| 6 | + def slurper = new JsonSlurper() | ||
| 7 | + def json = slurper.parse(file('../package.json'), "utf-8") | ||
| 8 | + return json.version | ||
| 9 | +} | ||
| 2 | buildscript { | 10 | buildscript { |
| 3 | repositories { | 11 | repositories { |
| 4 | jcenter() | 12 | jcenter() |
| @@ -19,7 +27,7 @@ android { | @@ -19,7 +27,7 @@ android { | ||
| 19 | minSdkVersion 16 | 27 | minSdkVersion 16 |
| 20 | targetSdkVersion 22 | 28 | targetSdkVersion 22 |
| 21 | versionCode 1 | 29 | versionCode 1 |
| 22 | - versionName "1.0" | 30 | + versionName computeVersionName() |
| 23 | } | 31 | } |
| 24 | lintOptions { | 32 | lintOptions { |
| 25 | abortOnError false | 33 | abortOnError false |
| @@ -28,6 +36,12 @@ android { | @@ -28,6 +36,12 @@ android { | ||
| 28 | 36 | ||
| 29 | repositories { | 37 | repositories { |
| 30 | mavenCentral() | 38 | mavenCentral() |
| 39 | + maven { | ||
| 40 | + url "$projectDir/../Example/node_modules/react-native/android" | ||
| 41 | + } | ||
| 42 | + maven { | ||
| 43 | + url "$projectDir/../../react-native/android" | ||
| 44 | + } | ||
| 31 | } | 45 | } |
| 32 | 46 | ||
| 33 | dependencies { | 47 | dependencies { |
| 1 | -package com.lewin.qrcode; | ||
| 2 | - | ||
| 3 | -import android.content.Context; | ||
| 4 | -import android.support.test.InstrumentationRegistry; | ||
| 5 | -import android.support.test.runner.AndroidJUnit4; | ||
| 6 | - | ||
| 7 | -import org.junit.Test; | ||
| 8 | -import org.junit.runner.RunWith; | ||
| 9 | - | ||
| 10 | -import static org.junit.Assert.*; | ||
| 11 | - | ||
| 12 | -/** | ||
| 13 | - * Instrumented test, which will execute on an Android device. | ||
| 14 | - * | ||
| 15 | - * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
| 16 | - */ | ||
| 17 | -@RunWith(AndroidJUnit4.class) | ||
| 18 | -public class ExampleInstrumentedTest { | ||
| 19 | - @Test | ||
| 20 | - public void useAppContext() throws Exception { | ||
| 21 | - // Context of the app under test. | ||
| 22 | - Context appContext = InstrumentationRegistry.getTargetContext(); | ||
| 23 | - | ||
| 24 | - assertEquals("com.lewin.qrcode", appContext.getPackageName()); | ||
| 25 | - } | ||
| 26 | -} |
| 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | package="com.lewin.qrcode"> | 2 | package="com.lewin.qrcode"> |
| 3 | 3 | ||
| 4 | - <application | ||
| 5 | - android:allowBackup="true" | ||
| 6 | - android:icon="@mipmap/ic_launcher" | ||
| 7 | - android:label="@string/app_name" | ||
| 8 | - android:roundIcon="@mipmap/ic_launcher_round" | ||
| 9 | - android:supportsRtl="true" | ||
| 10 | - android:theme="@style/AppTheme" /> | ||
| 11 | </manifest> | 4 | </manifest> |
| 1 | +package com.lewin.qrcode; | ||
| 2 | + | ||
| 3 | +import com.facebook.react.ReactPackage; | ||
| 4 | +import com.facebook.react.bridge.NativeModule; | ||
| 5 | +import com.facebook.react.bridge.ReactApplicationContext; | ||
| 6 | +import com.facebook.react.uimanager.ViewManager; | ||
| 7 | + | ||
| 8 | +import java.util.ArrayList; | ||
| 9 | +import java.util.Collections; | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * Created by lewin on 2018/3/14. | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +public class QRScanReaderPackage implements ReactPackage { | ||
| 17 | + @Override | ||
| 18 | + public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { | ||
| 19 | + List<NativeModule> modules = new ArrayList<>(); | ||
| 20 | + | ||
| 21 | + modules.add(new QRScanReader(reactContext)); | ||
| 22 | + | ||
| 23 | + return modules; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + @Override | ||
| 27 | + public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | ||
| 28 | + return Collections.emptyList(); | ||
| 29 | + } | ||
| 30 | +} |
| 1 | -<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | - xmlns:aapt="http://schemas.android.com/aapt" | ||
| 3 | - android:width="108dp" | ||
| 4 | - android:height="108dp" | ||
| 5 | - android:viewportHeight="108" | ||
| 6 | - android:viewportWidth="108"> | ||
| 7 | - <path | ||
| 8 | - android:fillType="evenOdd" | ||
| 9 | - android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z" | ||
| 10 | - android:strokeColor="#00000000" | ||
| 11 | - android:strokeWidth="1"> | ||
| 12 | - <aapt:attr name="android:fillColor"> | ||
| 13 | - <gradient | ||
| 14 | - android:endX="78.5885" | ||
| 15 | - android:endY="90.9159" | ||
| 16 | - android:startX="48.7653" | ||
| 17 | - android:startY="61.0927" | ||
| 18 | - android:type="linear"> | ||
| 19 | - <item | ||
| 20 | - android:color="#44000000" | ||
| 21 | - android:offset="0.0" /> | ||
| 22 | - <item | ||
| 23 | - android:color="#00000000" | ||
| 24 | - android:offset="1.0" /> | ||
| 25 | - </gradient> | ||
| 26 | - </aapt:attr> | ||
| 27 | - </path> | ||
| 28 | - <path | ||
| 29 | - android:fillColor="#FFFFFF" | ||
| 30 | - android:fillType="nonZero" | ||
| 31 | - android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z" | ||
| 32 | - android:strokeColor="#00000000" | ||
| 33 | - android:strokeWidth="1" /> | ||
| 34 | -</vector> |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | -<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | - android:width="108dp" | ||
| 4 | - android:height="108dp" | ||
| 5 | - android:viewportHeight="108" | ||
| 6 | - android:viewportWidth="108"> | ||
| 7 | - <path | ||
| 8 | - android:fillColor="#26A69A" | ||
| 9 | - android:pathData="M0,0h108v108h-108z" /> | ||
| 10 | - <path | ||
| 11 | - android:fillColor="#00000000" | ||
| 12 | - android:pathData="M9,0L9,108" | ||
| 13 | - android:strokeColor="#33FFFFFF" | ||
| 14 | - android:strokeWidth="0.8" /> | ||
| 15 | - <path | ||
| 16 | - android:fillColor="#00000000" | ||
| 17 | - android:pathData="M19,0L19,108" | ||
| 18 | - android:strokeColor="#33FFFFFF" | ||
| 19 | - android:strokeWidth="0.8" /> | ||
| 20 | - <path | ||
| 21 | - android:fillColor="#00000000" | ||
| 22 | - android:pathData="M29,0L29,108" | ||
| 23 | - android:strokeColor="#33FFFFFF" | ||
| 24 | - android:strokeWidth="0.8" /> | ||
| 25 | - <path | ||
| 26 | - android:fillColor="#00000000" | ||
| 27 | - android:pathData="M39,0L39,108" | ||
| 28 | - android:strokeColor="#33FFFFFF" | ||
| 29 | - android:strokeWidth="0.8" /> | ||
| 30 | - <path | ||
| 31 | - android:fillColor="#00000000" | ||
| 32 | - android:pathData="M49,0L49,108" | ||
| 33 | - android:strokeColor="#33FFFFFF" | ||
| 34 | - android:strokeWidth="0.8" /> | ||
| 35 | - <path | ||
| 36 | - android:fillColor="#00000000" | ||
| 37 | - android:pathData="M59,0L59,108" | ||
| 38 | - android:strokeColor="#33FFFFFF" | ||
| 39 | - android:strokeWidth="0.8" /> | ||
| 40 | - <path | ||
| 41 | - android:fillColor="#00000000" | ||
| 42 | - android:pathData="M69,0L69,108" | ||
| 43 | - android:strokeColor="#33FFFFFF" | ||
| 44 | - android:strokeWidth="0.8" /> | ||
| 45 | - <path | ||
| 46 | - android:fillColor="#00000000" | ||
| 47 | - android:pathData="M79,0L79,108" | ||
| 48 | - android:strokeColor="#33FFFFFF" | ||
| 49 | - android:strokeWidth="0.8" /> | ||
| 50 | - <path | ||
| 51 | - android:fillColor="#00000000" | ||
| 52 | - android:pathData="M89,0L89,108" | ||
| 53 | - android:strokeColor="#33FFFFFF" | ||
| 54 | - android:strokeWidth="0.8" /> | ||
| 55 | - <path | ||
| 56 | - android:fillColor="#00000000" | ||
| 57 | - android:pathData="M99,0L99,108" | ||
| 58 | - android:strokeColor="#33FFFFFF" | ||
| 59 | - android:strokeWidth="0.8" /> | ||
| 60 | - <path | ||
| 61 | - android:fillColor="#00000000" | ||
| 62 | - android:pathData="M0,9L108,9" | ||
| 63 | - android:strokeColor="#33FFFFFF" | ||
| 64 | - android:strokeWidth="0.8" /> | ||
| 65 | - <path | ||
| 66 | - android:fillColor="#00000000" | ||
| 67 | - android:pathData="M0,19L108,19" | ||
| 68 | - android:strokeColor="#33FFFFFF" | ||
| 69 | - android:strokeWidth="0.8" /> | ||
| 70 | - <path | ||
| 71 | - android:fillColor="#00000000" | ||
| 72 | - android:pathData="M0,29L108,29" | ||
| 73 | - android:strokeColor="#33FFFFFF" | ||
| 74 | - android:strokeWidth="0.8" /> | ||
| 75 | - <path | ||
| 76 | - android:fillColor="#00000000" | ||
| 77 | - android:pathData="M0,39L108,39" | ||
| 78 | - android:strokeColor="#33FFFFFF" | ||
| 79 | - android:strokeWidth="0.8" /> | ||
| 80 | - <path | ||
| 81 | - android:fillColor="#00000000" | ||
| 82 | - android:pathData="M0,49L108,49" | ||
| 83 | - android:strokeColor="#33FFFFFF" | ||
| 84 | - android:strokeWidth="0.8" /> | ||
| 85 | - <path | ||
| 86 | - android:fillColor="#00000000" | ||
| 87 | - android:pathData="M0,59L108,59" | ||
| 88 | - android:strokeColor="#33FFFFFF" | ||
| 89 | - android:strokeWidth="0.8" /> | ||
| 90 | - <path | ||
| 91 | - android:fillColor="#00000000" | ||
| 92 | - android:pathData="M0,69L108,69" | ||
| 93 | - android:strokeColor="#33FFFFFF" | ||
| 94 | - android:strokeWidth="0.8" /> | ||
| 95 | - <path | ||
| 96 | - android:fillColor="#00000000" | ||
| 97 | - android:pathData="M0,79L108,79" | ||
| 98 | - android:strokeColor="#33FFFFFF" | ||
| 99 | - android:strokeWidth="0.8" /> | ||
| 100 | - <path | ||
| 101 | - android:fillColor="#00000000" | ||
| 102 | - android:pathData="M0,89L108,89" | ||
| 103 | - android:strokeColor="#33FFFFFF" | ||
| 104 | - android:strokeWidth="0.8" /> | ||
| 105 | - <path | ||
| 106 | - android:fillColor="#00000000" | ||
| 107 | - android:pathData="M0,99L108,99" | ||
| 108 | - android:strokeColor="#33FFFFFF" | ||
| 109 | - android:strokeWidth="0.8" /> | ||
| 110 | - <path | ||
| 111 | - android:fillColor="#00000000" | ||
| 112 | - android:pathData="M19,29L89,29" | ||
| 113 | - android:strokeColor="#33FFFFFF" | ||
| 114 | - android:strokeWidth="0.8" /> | ||
| 115 | - <path | ||
| 116 | - android:fillColor="#00000000" | ||
| 117 | - android:pathData="M19,39L89,39" | ||
| 118 | - android:strokeColor="#33FFFFFF" | ||
| 119 | - android:strokeWidth="0.8" /> | ||
| 120 | - <path | ||
| 121 | - android:fillColor="#00000000" | ||
| 122 | - android:pathData="M19,49L89,49" | ||
| 123 | - android:strokeColor="#33FFFFFF" | ||
| 124 | - android:strokeWidth="0.8" /> | ||
| 125 | - <path | ||
| 126 | - android:fillColor="#00000000" | ||
| 127 | - android:pathData="M19,59L89,59" | ||
| 128 | - android:strokeColor="#33FFFFFF" | ||
| 129 | - android:strokeWidth="0.8" /> | ||
| 130 | - <path | ||
| 131 | - android:fillColor="#00000000" | ||
| 132 | - android:pathData="M19,69L89,69" | ||
| 133 | - android:strokeColor="#33FFFFFF" | ||
| 134 | - android:strokeWidth="0.8" /> | ||
| 135 | - <path | ||
| 136 | - android:fillColor="#00000000" | ||
| 137 | - android:pathData="M19,79L89,79" | ||
| 138 | - android:strokeColor="#33FFFFFF" | ||
| 139 | - android:strokeWidth="0.8" /> | ||
| 140 | - <path | ||
| 141 | - android:fillColor="#00000000" | ||
| 142 | - android:pathData="M29,19L29,89" | ||
| 143 | - android:strokeColor="#33FFFFFF" | ||
| 144 | - android:strokeWidth="0.8" /> | ||
| 145 | - <path | ||
| 146 | - android:fillColor="#00000000" | ||
| 147 | - android:pathData="M39,19L39,89" | ||
| 148 | - android:strokeColor="#33FFFFFF" | ||
| 149 | - android:strokeWidth="0.8" /> | ||
| 150 | - <path | ||
| 151 | - android:fillColor="#00000000" | ||
| 152 | - android:pathData="M49,19L49,89" | ||
| 153 | - android:strokeColor="#33FFFFFF" | ||
| 154 | - android:strokeWidth="0.8" /> | ||
| 155 | - <path | ||
| 156 | - android:fillColor="#00000000" | ||
| 157 | - android:pathData="M59,19L59,89" | ||
| 158 | - android:strokeColor="#33FFFFFF" | ||
| 159 | - android:strokeWidth="0.8" /> | ||
| 160 | - <path | ||
| 161 | - android:fillColor="#00000000" | ||
| 162 | - android:pathData="M69,19L69,89" | ||
| 163 | - android:strokeColor="#33FFFFFF" | ||
| 164 | - android:strokeWidth="0.8" /> | ||
| 165 | - <path | ||
| 166 | - android:fillColor="#00000000" | ||
| 167 | - android:pathData="M79,19L79,89" | ||
| 168 | - android:strokeColor="#33FFFFFF" | ||
| 169 | - android:strokeWidth="0.8" /> | ||
| 170 | -</vector> |
2.98 KB
4.91 KB
2.05 KB
2.79 KB
4.46 KB
6.93 KB
6.31 KB
10.4 KB
9.03 KB
15.2 KB
| 1 | -import { | 1 | + |
| 2 | - NativeModules, | 2 | +'use strict' |
| 3 | - } from 'react-native'; | 3 | + |
| 4 | +const { NativeModules } = require('react-native'); | ||
| 4 | export const readerQR= (fileUrl)=>{ | 5 | export const readerQR= (fileUrl)=>{ |
| 5 | var QRScanReader = NativeModules.QRScanReader; | 6 | var QRScanReader = NativeModules.QRScanReader; |
| 6 | 7 |
| @@ -7,21 +7,29 @@ | @@ -7,21 +7,29 @@ | ||
| 7 | objects = { | 7 | objects = { |
| 8 | 8 | ||
| 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
| 10 | - 078A9483208738FB00EC805D /* QrCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 078A9481208738FB00EC805D /* QrCode.h */; settings = {ATTRIBUTES = (Public, ); }; }; | 10 | + 07FD4BEE20874AD2002FBD31 /* QRScanReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 078A94AA20873A0700EC805D /* QRScanReader.m */; }; |
| 11 | - 078A94AB20873A0700EC805D /* QRScanReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 078A94A920873A0700EC805D /* QRScanReader.h */; settings = {ATTRIBUTES = (Public, ); }; }; | ||
| 12 | - 078A94AC20873A0700EC805D /* QRScanReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 078A94AA20873A0700EC805D /* QRScanReader.m */; }; | ||
| 13 | /* End PBXBuildFile section */ | 11 | /* End PBXBuildFile section */ |
| 14 | 12 | ||
| 13 | +/* Begin PBXCopyFilesBuildPhase section */ | ||
| 14 | + 07FD4BE320874AB3002FBD31 /* CopyFiles */ = { | ||
| 15 | + isa = PBXCopyFilesBuildPhase; | ||
| 16 | + buildActionMask = 2147483647; | ||
| 17 | + dstPath = "include/$(PRODUCT_NAME)"; | ||
| 18 | + dstSubfolderSpec = 16; | ||
| 19 | + files = ( | ||
| 20 | + ); | ||
| 21 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 22 | + }; | ||
| 23 | +/* End PBXCopyFilesBuildPhase section */ | ||
| 24 | + | ||
| 15 | /* Begin PBXFileReference section */ | 25 | /* Begin PBXFileReference section */ |
| 16 | - 078A947E208738FB00EC805D /* QrCode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = QrCode.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 17 | - 078A9481208738FB00EC805D /* QrCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QrCode.h; sourceTree = "<group>"; }; | ||
| 18 | - 078A9482208738FB00EC805D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
| 19 | 078A94A920873A0700EC805D /* QRScanReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QRScanReader.h; sourceTree = "<group>"; }; | 26 | 078A94A920873A0700EC805D /* QRScanReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QRScanReader.h; sourceTree = "<group>"; }; |
| 20 | 078A94AA20873A0700EC805D /* QRScanReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QRScanReader.m; sourceTree = "<group>"; }; | 27 | 078A94AA20873A0700EC805D /* QRScanReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QRScanReader.m; sourceTree = "<group>"; }; |
| 28 | + 07FD4BE520874AB3002FBD31 /* libQRCode.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libQRCode.a; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 21 | /* End PBXFileReference section */ | 29 | /* End PBXFileReference section */ |
| 22 | 30 | ||
| 23 | /* Begin PBXFrameworksBuildPhase section */ | 31 | /* Begin PBXFrameworksBuildPhase section */ |
| 24 | - 078A947A208738FB00EC805D /* Frameworks */ = { | 32 | + 07FD4BE220874AB3002FBD31 /* Frameworks */ = { |
| 25 | isa = PBXFrameworksBuildPhase; | 33 | isa = PBXFrameworksBuildPhase; |
| 26 | buildActionMask = 2147483647; | 34 | buildActionMask = 2147483647; |
| 27 | files = ( | 35 | files = ( |
| @@ -34,7 +42,7 @@ | @@ -34,7 +42,7 @@ | ||
| 34 | 078A9474208738FB00EC805D = { | 42 | 078A9474208738FB00EC805D = { |
| 35 | isa = PBXGroup; | 43 | isa = PBXGroup; |
| 36 | children = ( | 44 | children = ( |
| 37 | - 078A9480208738FB00EC805D /* QrCode */, | 45 | + 07FD4BE620874AB3002FBD31 /* QRCode */, |
| 38 | 078A947F208738FB00EC805D /* Products */, | 46 | 078A947F208738FB00EC805D /* Products */, |
| 39 | ); | 47 | ); |
| 40 | sourceTree = "<group>"; | 48 | sourceTree = "<group>"; |
| @@ -42,54 +50,39 @@ | @@ -42,54 +50,39 @@ | ||
| 42 | 078A947F208738FB00EC805D /* Products */ = { | 50 | 078A947F208738FB00EC805D /* Products */ = { |
| 43 | isa = PBXGroup; | 51 | isa = PBXGroup; |
| 44 | children = ( | 52 | children = ( |
| 45 | - 078A947E208738FB00EC805D /* QrCode.framework */, | 53 | + 07FD4BE520874AB3002FBD31 /* libQRCode.a */, |
| 46 | ); | 54 | ); |
| 47 | name = Products; | 55 | name = Products; |
| 48 | sourceTree = "<group>"; | 56 | sourceTree = "<group>"; |
| 49 | }; | 57 | }; |
| 50 | - 078A9480208738FB00EC805D /* QrCode */ = { | 58 | + 07FD4BE620874AB3002FBD31 /* QRCode */ = { |
| 51 | isa = PBXGroup; | 59 | isa = PBXGroup; |
| 52 | children = ( | 60 | children = ( |
| 53 | 078A94A920873A0700EC805D /* QRScanReader.h */, | 61 | 078A94A920873A0700EC805D /* QRScanReader.h */, |
| 54 | 078A94AA20873A0700EC805D /* QRScanReader.m */, | 62 | 078A94AA20873A0700EC805D /* QRScanReader.m */, |
| 55 | - 078A9481208738FB00EC805D /* QrCode.h */, | ||
| 56 | - 078A9482208738FB00EC805D /* Info.plist */, | ||
| 57 | ); | 63 | ); |
| 58 | - path = QrCode; | 64 | + path = QRCode; |
| 59 | sourceTree = "<group>"; | 65 | sourceTree = "<group>"; |
| 60 | }; | 66 | }; |
| 61 | /* End PBXGroup section */ | 67 | /* End PBXGroup section */ |
| 62 | 68 | ||
| 63 | -/* Begin PBXHeadersBuildPhase section */ | ||
| 64 | - 078A947B208738FB00EC805D /* Headers */ = { | ||
| 65 | - isa = PBXHeadersBuildPhase; | ||
| 66 | - buildActionMask = 2147483647; | ||
| 67 | - files = ( | ||
| 68 | - 078A9483208738FB00EC805D /* QrCode.h in Headers */, | ||
| 69 | - 078A94AB20873A0700EC805D /* QRScanReader.h in Headers */, | ||
| 70 | - ); | ||
| 71 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 72 | - }; | ||
| 73 | -/* End PBXHeadersBuildPhase section */ | ||
| 74 | - | ||
| 75 | /* Begin PBXNativeTarget section */ | 69 | /* Begin PBXNativeTarget section */ |
| 76 | - 078A947D208738FB00EC805D /* QrCode */ = { | 70 | + 07FD4BE420874AB3002FBD31 /* QRCode */ = { |
| 77 | isa = PBXNativeTarget; | 71 | isa = PBXNativeTarget; |
| 78 | - buildConfigurationList = 078A9486208738FB00EC805D /* Build configuration list for PBXNativeTarget "QrCode" */; | 72 | + buildConfigurationList = 07FD4BEB20874AB3002FBD31 /* Build configuration list for PBXNativeTarget "QRCode" */; |
| 79 | buildPhases = ( | 73 | buildPhases = ( |
| 80 | - 078A9479208738FB00EC805D /* Sources */, | 74 | + 07FD4BE120874AB3002FBD31 /* Sources */, |
| 81 | - 078A947A208738FB00EC805D /* Frameworks */, | 75 | + 07FD4BE220874AB3002FBD31 /* Frameworks */, |
| 82 | - 078A947B208738FB00EC805D /* Headers */, | 76 | + 07FD4BE320874AB3002FBD31 /* CopyFiles */, |
| 83 | - 078A947C208738FB00EC805D /* Resources */, | ||
| 84 | ); | 77 | ); |
| 85 | buildRules = ( | 78 | buildRules = ( |
| 86 | ); | 79 | ); |
| 87 | dependencies = ( | 80 | dependencies = ( |
| 88 | ); | 81 | ); |
| 89 | - name = QrCode; | 82 | + name = QRCode; |
| 90 | - productName = QrCode; | 83 | + productName = QRCode; |
| 91 | - productReference = 078A947E208738FB00EC805D /* QrCode.framework */; | 84 | + productReference = 07FD4BE520874AB3002FBD31 /* libQRCode.a */; |
| 92 | - productType = "com.apple.product-type.framework"; | 85 | + productType = "com.apple.product-type.library.static"; |
| 93 | }; | 86 | }; |
| 94 | /* End PBXNativeTarget section */ | 87 | /* End PBXNativeTarget section */ |
| 95 | 88 | ||
| @@ -100,7 +93,7 @@ | @@ -100,7 +93,7 @@ | ||
| 100 | LastUpgradeCheck = 0920; | 93 | LastUpgradeCheck = 0920; |
| 101 | ORGANIZATIONNAME = lewin; | 94 | ORGANIZATIONNAME = lewin; |
| 102 | TargetAttributes = { | 95 | TargetAttributes = { |
| 103 | - 078A947D208738FB00EC805D = { | 96 | + 07FD4BE420874AB3002FBD31 = { |
| 104 | CreatedOnToolsVersion = 9.2; | 97 | CreatedOnToolsVersion = 9.2; |
| 105 | ProvisioningStyle = Automatic; | 98 | ProvisioningStyle = Automatic; |
| 106 | }; | 99 | }; |
| @@ -118,27 +111,17 @@ | @@ -118,27 +111,17 @@ | ||
| 118 | projectDirPath = ""; | 111 | projectDirPath = ""; |
| 119 | projectRoot = ""; | 112 | projectRoot = ""; |
| 120 | targets = ( | 113 | targets = ( |
| 121 | - 078A947D208738FB00EC805D /* QrCode */, | 114 | + 07FD4BE420874AB3002FBD31 /* QRCode */, |
| 122 | ); | 115 | ); |
| 123 | }; | 116 | }; |
| 124 | /* End PBXProject section */ | 117 | /* End PBXProject section */ |
| 125 | 118 | ||
| 126 | -/* Begin PBXResourcesBuildPhase section */ | ||
| 127 | - 078A947C208738FB00EC805D /* Resources */ = { | ||
| 128 | - isa = PBXResourcesBuildPhase; | ||
| 129 | - buildActionMask = 2147483647; | ||
| 130 | - files = ( | ||
| 131 | - ); | ||
| 132 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 133 | - }; | ||
| 134 | -/* End PBXResourcesBuildPhase section */ | ||
| 135 | - | ||
| 136 | /* Begin PBXSourcesBuildPhase section */ | 119 | /* Begin PBXSourcesBuildPhase section */ |
| 137 | - 078A9479208738FB00EC805D /* Sources */ = { | 120 | + 07FD4BE120874AB3002FBD31 /* Sources */ = { |
| 138 | isa = PBXSourcesBuildPhase; | 121 | isa = PBXSourcesBuildPhase; |
| 139 | buildActionMask = 2147483647; | 122 | buildActionMask = 2147483647; |
| 140 | files = ( | 123 | files = ( |
| 141 | - 078A94AC20873A0700EC805D /* QRScanReader.m in Sources */, | 124 | + 07FD4BEE20874AD2002FBD31 /* QRScanReader.m in Sources */, |
| 142 | ); | 125 | ); |
| 143 | runOnlyForDeploymentPostprocessing = 0; | 126 | runOnlyForDeploymentPostprocessing = 0; |
| 144 | }; | 127 | }; |
| @@ -255,39 +238,23 @@ | @@ -255,39 +238,23 @@ | ||
| 255 | }; | 238 | }; |
| 256 | name = Release; | 239 | name = Release; |
| 257 | }; | 240 | }; |
| 258 | - 078A9487208738FB00EC805D /* Debug */ = { | 241 | + 07FD4BEC20874AB3002FBD31 /* Debug */ = { |
| 259 | isa = XCBuildConfiguration; | 242 | isa = XCBuildConfiguration; |
| 260 | buildSettings = { | 243 | buildSettings = { |
| 261 | - CODE_SIGN_IDENTITY = ""; | ||
| 262 | CODE_SIGN_STYLE = Automatic; | 244 | CODE_SIGN_STYLE = Automatic; |
| 263 | - DEFINES_MODULE = YES; | 245 | + OTHER_LDFLAGS = "-ObjC"; |
| 264 | - DYLIB_COMPATIBILITY_VERSION = 1; | 246 | + PRODUCT_NAME = "$(TARGET_NAME)"; |
| 265 | - DYLIB_CURRENT_VERSION = 1; | ||
| 266 | - DYLIB_INSTALL_NAME_BASE = "@rpath"; | ||
| 267 | - INFOPLIST_FILE = QrCode/Info.plist; | ||
| 268 | - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; | ||
| 269 | - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | ||
| 270 | - PRODUCT_BUNDLE_IDENTIFIER = com.lewin.QrCode; | ||
| 271 | - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; | ||
| 272 | SKIP_INSTALL = YES; | 247 | SKIP_INSTALL = YES; |
| 273 | TARGETED_DEVICE_FAMILY = "1,2"; | 248 | TARGETED_DEVICE_FAMILY = "1,2"; |
| 274 | }; | 249 | }; |
| 275 | name = Debug; | 250 | name = Debug; |
| 276 | }; | 251 | }; |
| 277 | - 078A9488208738FB00EC805D /* Release */ = { | 252 | + 07FD4BED20874AB3002FBD31 /* Release */ = { |
| 278 | isa = XCBuildConfiguration; | 253 | isa = XCBuildConfiguration; |
| 279 | buildSettings = { | 254 | buildSettings = { |
| 280 | - CODE_SIGN_IDENTITY = ""; | ||
| 281 | CODE_SIGN_STYLE = Automatic; | 255 | CODE_SIGN_STYLE = Automatic; |
| 282 | - DEFINES_MODULE = YES; | 256 | + OTHER_LDFLAGS = "-ObjC"; |
| 283 | - DYLIB_COMPATIBILITY_VERSION = 1; | 257 | + PRODUCT_NAME = "$(TARGET_NAME)"; |
| 284 | - DYLIB_CURRENT_VERSION = 1; | ||
| 285 | - DYLIB_INSTALL_NAME_BASE = "@rpath"; | ||
| 286 | - INFOPLIST_FILE = QrCode/Info.plist; | ||
| 287 | - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; | ||
| 288 | - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | ||
| 289 | - PRODUCT_BUNDLE_IDENTIFIER = com.lewin.QrCode; | ||
| 290 | - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; | ||
| 291 | SKIP_INSTALL = YES; | 258 | SKIP_INSTALL = YES; |
| 292 | TARGETED_DEVICE_FAMILY = "1,2"; | 259 | TARGETED_DEVICE_FAMILY = "1,2"; |
| 293 | }; | 260 | }; |
| @@ -305,11 +272,11 @@ | @@ -305,11 +272,11 @@ | ||
| 305 | defaultConfigurationIsVisible = 0; | 272 | defaultConfigurationIsVisible = 0; |
| 306 | defaultConfigurationName = Release; | 273 | defaultConfigurationName = Release; |
| 307 | }; | 274 | }; |
| 308 | - 078A9486208738FB00EC805D /* Build configuration list for PBXNativeTarget "QrCode" */ = { | 275 | + 07FD4BEB20874AB3002FBD31 /* Build configuration list for PBXNativeTarget "QRCode" */ = { |
| 309 | isa = XCConfigurationList; | 276 | isa = XCConfigurationList; |
| 310 | buildConfigurations = ( | 277 | buildConfigurations = ( |
| 311 | - 078A9487208738FB00EC805D /* Debug */, | 278 | + 07FD4BEC20874AB3002FBD31 /* Debug */, |
| 312 | - 078A9488208738FB00EC805D /* Release */, | 279 | + 07FD4BED20874AB3002FBD31 /* Release */, |
| 313 | ); | 280 | ); |
| 314 | defaultConfigurationIsVisible = 0; | 281 | defaultConfigurationIsVisible = 0; |
| 315 | defaultConfigurationName = Release; | 282 | defaultConfigurationName = Release; |
ios/QrCode/QrCode.h
deleted
100644 → 0
| 1 | -// | ||
| 2 | -// QrCode.h | ||
| 3 | -// QrCode | ||
| 4 | -// | ||
| 5 | -// Created by lewin on 2018/4/18. | ||
| 6 | -// Copyright © 2018年 lewin. All rights reserved. | ||
| 7 | -// | ||
| 8 | - | ||
| 9 | -#import <UIKit/UIKit.h> | ||
| 10 | - | ||
| 11 | -//! Project version number for QrCode. | ||
| 12 | -FOUNDATION_EXPORT double QrCodeVersionNumber; | ||
| 13 | - | ||
| 14 | -//! Project version string for QrCode. | ||
| 15 | -FOUNDATION_EXPORT const unsigned char QrCodeVersionString[]; | ||
| 16 | - | ||
| 17 | -// In this header, you should import all the public headers of your framework using statements like #import <QrCode/PublicHeader.h> | ||
| 18 | - | ||
| 19 | - |
| @@ -3,8 +3,9 @@ | @@ -3,8 +3,9 @@ | ||
| 3 | "version": "1.0.0", | 3 | "version": "1.0.0", |
| 4 | "description": "二维码识别", | 4 | "description": "二维码识别", |
| 5 | "main": "index.js", | 5 | "main": "index.js", |
| 6 | + "nativePackage": true, | ||
| 6 | "scripts": { | 7 | "scripts": { |
| 7 | - "test": "echo \"Error: no test specified\" && exit 1" | 8 | + "prepare": "rm -rf android/build Example/android/build Example/android/app/build node_modules" |
| 8 | }, | 9 | }, |
| 9 | "repository": { | 10 | "repository": { |
| 10 | "type": "git", | 11 | "type": "git", |
| @@ -18,8 +19,5 @@ | @@ -18,8 +19,5 @@ | ||
| 18 | "bugs": { | 19 | "bugs": { |
| 19 | "url": "https://github.com/LewinJun/react-native-lewin-qrcode/issues" | 20 | "url": "https://github.com/LewinJun/react-native-lewin-qrcode/issues" |
| 20 | }, | 21 | }, |
| 21 | - "homepage": "https://github.com/LewinJun/react-native-lewin-qrcode#readme", | 22 | + "homepage": "https://github.com/LewinJun/react-native-lewin-qrcode#readme" |
| 22 | - "peerDependencies": { | ||
| 23 | - "react-native": "latest" | ||
| 24 | - } | ||
| 25 | } | 23 | } |
-
Please register or login to post a comment