From c59f2c72e07ae98afbf2ef98d290625632ce4f20 Mon Sep 17 00:00:00 2001 From: baiyun Date: Thu, 7 Jan 2021 08:56:01 +0800 Subject: [PATCH] 项目初始化 --- .DS_Store | Bin 0 -> 6148 bytes .gitattributes | 1 + .gitignore | 14 ++++++++++++++ README.md | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ android/build.gradle | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 58695 bytes android/gradle/wrapper/gradle-wrapper.properties | 5 +++++ android/gradlew | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ android/gradlew.bat | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ android/src/main/AndroidManifest.xml | 5 +++++ android/src/main/java/com/feewee/aliface/RNFwRnAlifaceModule.java | 22 ++++++++++++++++++++++ android/src/main/java/com/feewee/aliface/RNFwRnAlifacePackage.java | 28 ++++++++++++++++++++++++++++ index.js | 6 ++++++ ios/RNFwRnAliface.h | 11 +++++++++++ ios/RNFwRnAliface.m | 13 +++++++++++++ ios/RNFwRnAliface.podspec | 24 ++++++++++++++++++++++++ ios/RNFwRnAliface.xcodeproj/project.pbxproj | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 31 +++++++++++++++++++++++++++++++ 18 files changed, 916 insertions(+), 0 deletions(-) create mode 100644 .DS_Store create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 android/build.gradle create mode 100644 android/gradle/wrapper/gradle-wrapper.jar create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100755 android/gradlew create mode 100644 android/gradlew.bat create mode 100644 android/src/main/AndroidManifest.xml create mode 100644 android/src/main/java/com/feewee/aliface/RNFwRnAlifaceModule.java create mode 100644 android/src/main/java/com/feewee/aliface/RNFwRnAlifacePackage.java create mode 100644 index.js create mode 100644 ios/RNFwRnAliface.h create mode 100644 ios/RNFwRnAliface.m create mode 100644 ios/RNFwRnAliface.podspec create mode 100644 ios/RNFwRnAliface.xcodeproj/project.pbxproj create mode 100644 package.json diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ec0a443 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eb39591 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.pbxproj -text \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68f0056 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +.idea/ +.gradle/ +node_modules/ +build/ +xcuserdata/ +*.xcworkspace/ +Pods/ +lib/js/ + +*.iml +local.properties +Podfile.lock +yarn.lock +package-lock.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..fbcdb73 --- /dev/null +++ b/README.md @@ -0,0 +1,152 @@ + +# react-native-fw-rn-aliface + +## Getting started + +`$ npm install react-native-fw-rn-aliface --save` + +### Mostly automatic installation + +`$ react-native link react-native-fw-rn-aliface` + +### Manual installation + + +#### iOS + +1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` +2. Go to `node_modules` ➜ `fw-rn-aliface` and add `RNFwRnAliface.xcodeproj` +3. In XCode, in the project navigator, select your project. Add `libRNFwRnAliface.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` +4. Run your project (`Cmd+R`)< + +#### Android + +1. Open up `android/app/src/main/java/[...]/MainActivity.java` + - Add `import com.feewee.aliface.RNFwRnAlifacePackage;` to the imports at the top of the file + - Add `new RNFwRnAlifacePackage()` to the list returned by the `getPackages()` method +2. Append the following lines to `android/settings.gradle`: + ``` + include ':react-native-fw-rn-aliface' + project(':react-native-fw-rn-aliface').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fw-rn-aliface/android') + ``` +3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: + ``` + compile project(':react-native-fw-rn-aliface') + ``` + + +## Usage +```javascript +import RNFwRnAliface from 'react-native-fw-rn-aliface'; + +// TODO: What to do with the module? +RNFwRnAliface; +``` +## 构建文档 +#### 1.构建项目 +``` +https://www.jianshu.com/p/091a68ea1ca7/ +https://youngjuning.js.org/2019/06/react-native-create-library%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3/ +``` +#### 2.修改package.json +``` + +{ + "name": "fw-rn-aliface", + "version": "1.0.0", + "description": "阿里人脸活体检测", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "npm:publish": "npm --registry https://registry.npmjs.org/ publish", + "npm:sync": "curl -i https://npm.taobao.org/sync/fw-rn-aliface", + "pod:lint": "export LANG=en_US.UTF-8 && pod lib lint TXIm.podspec", + "pod:install": "cd ios && export LANG=en_US.UTF-8 && pod install" + }, + "keywords": [ + "aliface" + ], + "repository": { + "type": "git", + "url": "git@gitlab.feewee.cn:FEV2/fw-rn-aliface.git" + }, + "homepage": "http://gitlab.feewee.cn/FEV2/fw-rn-aliface", + "author": "baiyun", + "license": "MIT", + "dependencies": { + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "16.9.0", + "react-native": "0.61.5" + } +} + +``` +####3.修改build.gradle文件 +``` +apply plugin: 'com.android.library' +apply plugin: 'maven' +apply plugin: 'signing' + +buildscript { + repositories { + mavenLocal() + google() + jcenter() + maven() { + url '/usr/local/node/lib/node_modules/react-native/android' + } + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.4.0' + } +} + +repositories { + mavenLocal() + google() + jcenter() + maven { + url '/usr/local/node/lib/node_modules/react-native/android' + } +} + + +apply plugin: 'com.android.library' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + + buildTypes { + release { + minifyEnabled false + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +signing { + sign configurations.archives +} + +dependencies { + compileOnly 'com.facebook.react:react-native:+' + compileOnly files('src/main/assets') +} + +``` + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..6791296 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,62 @@ +apply plugin: 'com.android.library' +apply plugin: 'maven' +apply plugin: 'signing' + +buildscript { + repositories { + mavenLocal() + google() + jcenter() + maven() { + url '/usr/local/node/lib/node_modules/react-native/android' + } + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.4.0' + } +} + +repositories { + mavenLocal() + google() + jcenter() + maven { + url '/usr/local/node/lib/node_modules/react-native/android' + } +} + + +apply plugin: 'com.android.library' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + + buildTypes { + release { + minifyEnabled false + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +signing { + sign configurations.archives +} + +dependencies { + compileOnly 'com.facebook.react:react-native:+' + compileOnly files('src/main/assets') +} diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f3d88b1 Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..1b16c34 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew new file mode 100755 index 0000000..2fe81a7 --- /dev/null +++ b/android/gradlew @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 0000000..9618d8d --- /dev/null +++ b/android/gradlew.bat @@ -0,0 +1,100 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml new file mode 100644 index 0000000..82d16d5 --- /dev/null +++ b/android/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + diff --git a/android/src/main/java/com/feewee/aliface/RNFwRnAlifaceModule.java b/android/src/main/java/com/feewee/aliface/RNFwRnAlifaceModule.java new file mode 100644 index 0000000..4712b1b --- /dev/null +++ b/android/src/main/java/com/feewee/aliface/RNFwRnAlifaceModule.java @@ -0,0 +1,22 @@ + +package com.feewee.aliface; + +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.Callback; + +public class RNFwRnAlifaceModule extends ReactContextBaseJavaModule { + + private final ReactApplicationContext reactContext; + + public RNFwRnAlifaceModule(ReactApplicationContext reactContext) { + super(reactContext); + this.reactContext = reactContext; + } + + @Override + public String getName() { + return "RNFwRnAliface"; + } +} diff --git a/android/src/main/java/com/feewee/aliface/RNFwRnAlifacePackage.java b/android/src/main/java/com/feewee/aliface/RNFwRnAlifacePackage.java new file mode 100644 index 0000000..d200464 --- /dev/null +++ b/android/src/main/java/com/feewee/aliface/RNFwRnAlifacePackage.java @@ -0,0 +1,28 @@ + +package com.feewee.aliface; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.uimanager.ViewManager; +import com.facebook.react.bridge.JavaScriptModule; +public class RNFwRnAlifacePackage implements ReactPackage { + @Override + public List createNativeModules(ReactApplicationContext reactContext) { + return Arrays.asList(new RNFwRnAlifaceModule(reactContext)); + } + + // Deprecated from RN 0.47 + public List> createJSModules() { + return Collections.emptyList(); + } + + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } +} diff --git a/index.js b/index.js new file mode 100644 index 0000000..bf86cbe --- /dev/null +++ b/index.js @@ -0,0 +1,6 @@ + +import { NativeModules } from 'react-native'; + +const { RNFwRnAliface } = NativeModules; + +export default RNFwRnAliface; diff --git a/ios/RNFwRnAliface.h b/ios/RNFwRnAliface.h new file mode 100644 index 0000000..4811474 --- /dev/null +++ b/ios/RNFwRnAliface.h @@ -0,0 +1,11 @@ + +#if __has_include("RCTBridgeModule.h") +#import "RCTBridgeModule.h" +#else +#import +#endif + +@interface RNFwRnAliface : NSObject + +@end + \ No newline at end of file diff --git a/ios/RNFwRnAliface.m b/ios/RNFwRnAliface.m new file mode 100644 index 0000000..09a184c --- /dev/null +++ b/ios/RNFwRnAliface.m @@ -0,0 +1,13 @@ + +#import "RNFwRnAliface.h" + +@implementation RNFwRnAliface + +- (dispatch_queue_t)methodQueue +{ + return dispatch_get_main_queue(); +} +RCT_EXPORT_MODULE() + +@end + \ No newline at end of file diff --git a/ios/RNFwRnAliface.podspec b/ios/RNFwRnAliface.podspec new file mode 100644 index 0000000..e938e27 --- /dev/null +++ b/ios/RNFwRnAliface.podspec @@ -0,0 +1,24 @@ + +Pod::Spec.new do |s| + s.name = "RNFwRnAliface" + s.version = "1.0.0" + s.summary = "RNFwRnAliface" + s.description = <<-DESC + RNFwRnAliface + DESC + s.homepage = "" + s.license = "MIT" + # s.license = { :type => "MIT", :file => "FILE_LICENSE" } + s.author = { "author" => "author@domain.cn" } + s.platform = :ios, "7.0" + s.source = { :git => "https://github.com/author/RNFwRnAliface.git", :tag => "master" } + s.source_files = "RNFwRnAliface/**/*.{h,m}" + s.requires_arc = true + + + s.dependency "React" + #s.dependency "others" + +end + + \ No newline at end of file diff --git a/ios/RNFwRnAliface.xcodeproj/project.pbxproj b/ios/RNFwRnAliface.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3e7ef30 --- /dev/null +++ b/ios/RNFwRnAliface.xcodeproj/project.pbxproj @@ -0,0 +1,259 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B3E7B58A1CC2AC0600A0062D /* RNFwRnAliface.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNFwRnAliface.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 58B511D91A9E6C8500147676 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 134814201AA4EA6300B7C361 /* libRNFwRnAliface.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFwRnAliface.a; sourceTree = BUILT_PRODUCTS_DIR; }; + B3E7B5881CC2AC0600A0062D /* RNFwRnAliface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNFwRnAliface.h; sourceTree = ""; }; + B3E7B5891CC2AC0600A0062D /* RNFwRnAliface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNFwRnAliface.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 58B511D81A9E6C8500147676 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 134814211AA4EA7D00B7C361 /* Products */ = { + isa = PBXGroup; + children = ( + 134814201AA4EA6300B7C361 /* libRNFwRnAliface.a */, + ); + name = Products; + sourceTree = ""; + }; + 58B511D21A9E6C8500147676 = { + isa = PBXGroup; + children = ( + B3E7B5881CC2AC0600A0062D /* RNFwRnAliface.h */, + B3E7B5891CC2AC0600A0062D /* RNFwRnAliface.m */, + 134814211AA4EA7D00B7C361 /* Products */, + ); + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 58B511DA1A9E6C8500147676 /* RNFwRnAliface */ = { + isa = PBXNativeTarget; + buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNFwRnAliface" */; + buildPhases = ( + 58B511D71A9E6C8500147676 /* Sources */, + 58B511D81A9E6C8500147676 /* Frameworks */, + 58B511D91A9E6C8500147676 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RNFwRnAliface; + productName = RCTDataManager; + productReference = 134814201AA4EA6300B7C361 /* libRNFwRnAliface.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 58B511D31A9E6C8500147676 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 58B511DA1A9E6C8500147676 = { + CreatedOnToolsVersion = 6.1.1; + }; + }; + }; + buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNFwRnAliface" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 58B511D21A9E6C8500147676; + productRefGroup = 58B511D21A9E6C8500147676; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 58B511DA1A9E6C8500147676 /* RNFwRnAliface */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 58B511D71A9E6C8500147676 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3E7B58A1CC2AC0600A0062D /* RNFwRnAliface.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 58B511ED1A9E6C8500147676 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 58B511EE1A9E6C8500147676 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 58B511F01A9E6C8500147676 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = RNFwRnAliface; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 58B511F11A9E6C8500147676 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = RNFwRnAliface; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNFwRnAliface" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 58B511ED1A9E6C8500147676 /* Debug */, + 58B511EE1A9E6C8500147676 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNFwRnAliface" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 58B511F01A9E6C8500147676 /* Debug */, + 58B511F11A9E6C8500147676 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 58B511D31A9E6C8500147676 /* Project object */; +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..2ac2e0b --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ + +{ + "name": "fw-rn-aliface", + "version": "1.0.0", + "description": "阿里人脸活体检测", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "npm:publish": "npm --registry https://registry.npmjs.org/ publish", + "npm:sync": "curl -i https://npm.taobao.org/sync/fw-rn-aliface", + "pod:lint": "export LANG=en_US.UTF-8 && pod lib lint TXIm.podspec", + "pod:install": "cd ios && export LANG=en_US.UTF-8 && pod install" + }, + "keywords": [ + "aliface" + ], + "repository": { + "type": "git", + "url": "git@gitlab.feewee.cn:FEV2/fw-rn-aliface.git" + }, + "homepage": "http://gitlab.feewee.cn/FEV2/fw-rn-aliface", + "author": "baiyun", + "license": "MIT", + "dependencies": { + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "16.9.0", + "react-native": "0.61.5" + } +} -- libgit2 0.22.2