Commit e698ab04 authored by 刘阳's avatar 刘阳

Initial commit

parents
*.pbxproj -text
\ No newline at end of file
# OSX
#
.DS_Store
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# BUCK
buck-out/
\.buckd/
*.keystore
\ No newline at end of file
# react-native-protogenesis
## Getting started
`$ npm install react-native-protogenesis --save`
### Mostly automatic installation
`$ react-native link react-native-protogenesis`
### 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` ➜ `react-native-protogenesis` and add `RNProtogenesis.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNProtogenesis.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.geek.protogenesis.RNProtogenesisPackage;` to the imports at the top of the file
- Add `new RNProtogenesisPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-protogenesis'
project(':react-native-protogenesis').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-protogenesis/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-protogenesis')
```
#### Windows
[Read it! :D](https://github.com/ReactWindows/react-native)
1. In Visual Studio add the `RNProtogenesis.sln` in `node_modules/react-native-protogenesis/windows/RNProtogenesis.sln` folder to their solution, reference from their app.
2. Open up your `MainPage.cs` app
- Add `using Protogenesis.RNProtogenesis;` to the usings at the top of the file
- Add `new RNProtogenesisPackage()` to the `List<IReactPackage>` returned by the `Packages` method
## Usage
```javascript
import RNProtogenesis from 'react-native-protogenesis';
// TODO: What to do with the module?
RNProtogenesis;
```
\ No newline at end of file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.facebook.react:react-native:+'
implementation 'com.tencent.qcloud:cosxml:5.6.0'
implementation "androidx.exifinterface:exifinterface:1.3.1"
}
\ No newline at end of file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.geek.protogenesis">
<application>
<provider
android:name=".imageHelper.ImagePickerProvider"
android:authorities="${applicationId}.imagepickerprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/imagepicker_provider_paths" />
</provider>
</application>
</manifest>
\ No newline at end of file
package com.geek.protogenesis;
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 RNProtogenesisPackage implements ReactPackage {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
return Arrays.<NativeModule>asList(new RNProtogenesisModule(reactContext));
}
// Deprecated from RN 0.47
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
\ No newline at end of file
package com.geek.protogenesis.fileHelper;
import android.net.Uri;
import com.facebook.react.bridge.ReactApplicationContext;
import com.tencent.qcloud.core.auth.BasicLifecycleCredentialProvider;
import com.tencent.qcloud.core.auth.QCloudCredentialProvider;
import com.tencent.qcloud.core.auth.QCloudLifecycleCredentials;
import com.tencent.qcloud.core.auth.SessionQCloudCredentials;
import com.tencent.qcloud.core.common.QCloudClientException;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class fileUploadUtils {
public static boolean deleteSaveFile(File file) {
if (file.exists() && file.isFile()) {
if (file.delete()) {
System.out.println("删除成功!");
return true;
} else {
System.out.println("删除失败!");
return false;
}
} else {
System.out.println("文件不存在!");
return false;
}
}
public static void copyFile(ReactApplicationContext reactContext, Uri srcUri, File dstFile) {
try {
InputStream inputStream = reactContext.getContentResolver().openInputStream(srcUri);
if (inputStream == null) return;
OutputStream outputStream = new FileOutputStream(dstFile);
copyStream(inputStream, outputStream);
inputStream.close();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static int copyStream(InputStream input, OutputStream output) throws IOException {
final int BUFFER_SIZE = 1024 * 2;
byte[] buffer = new byte[BUFFER_SIZE];
BufferedInputStream in = new BufferedInputStream(input, BUFFER_SIZE);
BufferedOutputStream out = new BufferedOutputStream(output, BUFFER_SIZE);
int count = 0, n = 0;
try {
while ((n = in.read(buffer, 0, BUFFER_SIZE)) != -1) {
out.write(buffer, 0, n);
count += n;
}
out.flush();
} finally {
try {
out.close();
} catch (IOException e) {
}
try {
in.close();
} catch (IOException e) {
}
}
return count;
}
public static String getFileName(Uri uri) {
if (uri == null) return null;
String fileName = null;
String path = uri.getPath();
int cut = path.lastIndexOf('/');
if (cut != -1) {
fileName = path.substring(cut + 1);
}
return fileName;
}
public static class MySessionCredentialProvider
extends BasicLifecycleCredentialProvider {
String tmpSecretId = "COS_SECRETID"; // 临时密钥 SecretId
String tmpSecretKey = "COS_SECRETKEY"; // 临时密钥 SecretKey
String sessionToken = "COS_SESSIONTOKEN"; // 临时密钥 Token
long expiredTime = 1556183496L;//临时密钥有效截止时间戳,单位是秒
//建议返回服务器时间作为签名的开始时间,避免由于用户手机本地时间偏差过大导致请求过期
// 返回服务器时间作为签名的起始时间
long startTime = 1556182000L; //临时密钥有效起始时间,单位是秒
public MySessionCredentialProvider(String tmpSecretId, String tmpSecretKey, String sessionToken, long expiredTime, long startTime) {
this.tmpSecretId = tmpSecretId;
this.tmpSecretKey = tmpSecretKey;
this.sessionToken = sessionToken;
this.expiredTime = expiredTime;
this.startTime = startTime;
}
@Override
protected QCloudLifecycleCredentials fetchNewCredentials()
throws QCloudClientException {
// 最后返回临时密钥信息对象
return new SessionQCloudCredentials(tmpSecretId, tmpSecretKey,
sessionToken, startTime, expiredTime);
}
}
}
package com.geek.protogenesis.imageHelper;
import androidx.core.content.FileProvider;
// Two FileProvider class with same name will conflict during manifest merger, so we create a class which inherits from FileProvider with different name.
// This prevents conflict if library users already have used the default FileProvider class.
public class ImagePickerProvider extends FileProvider {
}
package com.geek.protogenesis.imageHelper;
import android.text.TextUtils;
import com.facebook.react.bridge.ReadableMap;
public class Options {
Boolean includeBase64;
public int videoQuality = 1;
int quality;
int maxWidth;
int maxHeight;
public Boolean saveToPhotos;
public int durationLimit;
public Boolean useFrontCamera = false;
public String mediaType;
public Options(ReadableMap options) {
mediaType = options.getString("mediaType");
includeBase64 = options.getBoolean("includeBase64");
String videoQualityString = options.getString("videoQuality");
if(!TextUtils.isEmpty(videoQualityString) && !videoQualityString.toLowerCase().equals("high")) {
videoQuality = 0;
}
if (options.getString("cameraType").equals("front")) {
useFrontCamera = true;
}
quality = (int) (options.getDouble("quality") * 100);
maxHeight = options.getInt("maxHeight");
maxWidth = options.getInt("maxWidth");
saveToPhotos = options.getBoolean("saveToPhotos");
durationLimit = options.getInt("durationLimit");
}
}
<?xml version="1.0" encoding="utf-8"?>
<paths>
<cache-path name="cacheDir" path="." />
</paths>
\ No newline at end of file
import { NativeModules } from 'react-native';
import { httpUtil, Toast } from 'geekbase';
const { RNProtogenesis } = NativeModules;
// 屏幕方向
let currentOritention = ''
// 拍照默认参数
const DEFAULT_OPTIONS = {
mediaType: 'photo',
videoQuality: 'high',
quality: 1,
maxWidth: 0,
maxHeight: 0,
includeBase64: false,
saveToPhotos: false,
durationLimit: 0,
cameraType: 'back'
};
/**
* 横竖屏切换
* @param {*} oritentation
* @returns
*/
export const changeOritention = (oritentation) => {
currentOritention = oritentation
RNProtogenesis.changeOritention(oritentation)
return currentOritention
}
/**
* 自动切换横竖屏
* @returns
*/
export const useLandscapeOritention = () => {
useEffect(() => {
changeOritention('landscape')
currentOritention = 'landscape'
return () => {
changeOritention('protrait')
currentOritention = 'protrait'
}
}, [])
return currentOritention
}
/**
* 拍照
* @param {*} options
* @param {*} callback
* @returns
*/
export const launchCamera = (options, callback) => {
if (typeof callback !== 'function') {
console.error("Send proper callback function, check API");
return;
}
RNProtogenesis.launchCamera(
{ ...DEFAULT_OPTIONS, ...options },
callback,
);
}
/**
* 选择图片
* @param {*} options
* @param {*} callback
* @returns
*/
export const launchImageLibrary = (
options,
callback
) => {
if (typeof callback !== 'function') {
console.error("Send proper callback function, check API");
return;
}
RNProtogenesis.launchImageLibrary(
{ ...DEFAULT_OPTIONS, ...options },
callback,
);
}
/**
*
* @param {*} file 文件uri
* @param {*} name 文件名
* @param {*} credent 临时签名
* @param {*} bucketName 存储桶名称
* @param {*} regionName 地区
* @param {*} processCb 进度回调
* @param {*} resultCb 上传结果回调
*/
export const uploadFile = async (file, name, credent, bucketName, regionName, progressCb, resultCb) => {
const { GeekUploadEmitter } = NativeModules
try {
const emitter = new NativeEventEmitter(GeekUploadEmitter)
emitter.addListener('uploadProgress', (progressData) => {
const progress = Platform.OS === 'ios' ? progressData : JSON.parse(progressData)
progressCb && progressCb({
progress
})
})
const { credentials, startTime, expiredTime, dir } = credent || {}
const { tmpSecretId, tmpSecretKey, sessionToken } = credentials || {}
let dirName = name
if (Platform.OS === 'ios') {
const config = {
tmpSecretId,
tmpSecretKey,
sessionToken,
startTime,
expiredTime,
bucketName: bucketName,
dir,
regionName: regionName
}
dirName = name
RNProtogenesis.config(config)
RNProtogenesis.uploadFile(file, dirName, (res, err) => {
if (resultCb) {
resultCb({
res,
error: err
})
}
})
} else {
dirName = dir + name
RNProtogenesis.config(tmpSecretId, tmpSecretKey, sessionToken, startTime, expiredTime, regionName)
RNProtogenesis.uploadFile(file, dirName, bucketName, (res, err) => {
if (resultCb) {
resultCb({
res,
error: err
})
}
})
}
} catch (error) {
console.log(error)
resultCb && resultCb({
error
})
}
}
// 获取签名数据
export const getCredential = async () => {
if (httpUtil) {
const [credent, error] = await httpUtil.get('/service-public/cos/getCredential', {
params: {
code: 'HOMEWORK_IMAGE'
}
});
if (error) {
throw new Error('获取签名失败')
}
return JSON.parse(credent)
}
}
/**
*
* @param {*} file 文件uri
* @param {*} name 文件名
* @param {*} processCb 进度回调
* @param {*} resultCb 上传结果
*/
export const uploadFileWithoutCredent = async (file, name, processCb, resultCb) => {
const credent = await getCredential()
console.log('uploadFileWithoutCredent')
const { bucket, regionName } = credent
if (bucket) {
const localRegionName = regionName || 'ap-chengdu'
uploadFile(file, name, credent, bucket, localRegionName, processCb, resultCb)
} else {
resultCb(null)
Toast.msg('获取签名失败!')
}
}
export default RNProtogenesis;
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
@interface RNProtogenesis : NSObject <RCTBridgeModule>
@end
\ No newline at end of file
#import "RNProtogenesis.h"
@implementation RNProtogenesis
- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();
}
RCT_EXPORT_MODULE()
@end
\ No newline at end of file
Pod::Spec.new do |s|
s.name = "RNProtogenesis"
s.version = "1.0.0"
s.summary = "RNProtogenesis"
s.description = <<-DESC
RNProtogenesis
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/RNProtogenesis.git", :tag => "master" }
s.source_files = "RNProtogenesis/**/*.{h,m}"
s.requires_arc = true
s.dependency "React"
#s.dependency "others"
end
\ No newline at end of file
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B3E7B58A1CC2AC0600A0062D /* RNProtogenesis.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNProtogenesis.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 /* libRNProtogenesis.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNProtogenesis.a; sourceTree = BUILT_PRODUCTS_DIR; };
B3E7B5881CC2AC0600A0062D /* RNProtogenesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNProtogenesis.h; sourceTree = "<group>"; };
B3E7B5891CC2AC0600A0062D /* RNProtogenesis.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNProtogenesis.m; sourceTree = "<group>"; };
/* 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 /* libRNProtogenesis.a */,
);
name = Products;
sourceTree = "<group>";
};
58B511D21A9E6C8500147676 = {
isa = PBXGroup;
children = (
B3E7B5881CC2AC0600A0062D /* RNProtogenesis.h */,
B3E7B5891CC2AC0600A0062D /* RNProtogenesis.m */,
134814211AA4EA7D00B7C361 /* Products */,
);
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
58B511DA1A9E6C8500147676 /* RNProtogenesis */ = {
isa = PBXNativeTarget;
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNProtogenesis" */;
buildPhases = (
58B511D71A9E6C8500147676 /* Sources */,
58B511D81A9E6C8500147676 /* Frameworks */,
58B511D91A9E6C8500147676 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = RNProtogenesis;
productName = RCTDataManager;
productReference = 134814201AA4EA6300B7C361 /* libRNProtogenesis.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 "RNProtogenesis" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 58B511D21A9E6C8500147676;
productRefGroup = 58B511D21A9E6C8500147676;
projectDirPath = "";
projectRoot = "";
targets = (
58B511DA1A9E6C8500147676 /* RNProtogenesis */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
58B511D71A9E6C8500147676 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B3E7B58A1CC2AC0600A0062D /* RNProtogenesis.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 = RNProtogenesis;
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 = RNProtogenesis;
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNProtogenesis" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58B511ED1A9E6C8500147676 /* Debug */,
58B511EE1A9E6C8500147676 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNProtogenesis" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58B511F01A9E6C8500147676 /* Debug */,
58B511F11A9E6C8500147676 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
}
// !$*UTF8*$!
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:RNProtogenesis.xcodeproj">
</FileRef>
</Workspace>
\ No newline at end of file
{
"name": "react-native-protogenesis",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"react-native"
],
"author": "",
"license": "",
"peerDependencies": {
"react-native": "^0.41.2",
"react-native-windows": "0.41.0-rc.1"
}
}
*AppPackages*
*BundleArtifacts*
*ReactAssets*
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.opensdf
*.opendb
*.unsuccessfulbuild
ipch/
[Oo]bj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/
Ankh.NoLoad
#MonoDevelop
*.pidb
*.userprefs
#Tooling
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*
*.sass-cache
#Project files
[Bb]uild/
#Subversion files
.svn
# Office Temp Files
~$*
# vim Temp Files
*~
#NuGet
packages/
*.nupkg
#ncrunch
*ncrunch*
*crunch*.local.xml
# visual studio database projects
*.dbmdl
#Test files
*.testsettings
#Other files
*.DotSettings
.vs/
*project.lock.json
# Make sure we don't publish build artifacts to NPM
ARM/
Debug/
x64/
x86/
bin/
obj/
.vs/
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RNProtogenesis", "RNProtogenesis\RNProtogenesis.csproj", "{64C20860-D580-11EB-B721-01DF429A4FDF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative", "..\node_modules\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj", "{C7673AD5-E3AA-468C-A5FD-FA38154E205C}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ReactNative.Shared", "..\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\ReactNative.Shared.shproj", "{EEA8B852-4D07-48E1-8294-A21AB5909FE5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChakraBridge", "..\node_modules\react-native-windows\ReactWindows\ChakraBridge\ChakraBridge.vcxproj", "{4B72C796-16D5-4E3A-81C0-3E36F531E578}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\ReactNative.Shared.projitems*{c7673ad5-e3aa-468c-a5fd-fa38154e205c}*SharedItemsImports = 4
..\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\ReactNative.Shared.projitems*{eea8b852-4d07-48e1-8294-a21ab5909fe5}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Development|ARM = Development|ARM
Development|x64 = Development|x64
Development|x86 = Development|x86
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{64C20860-D580-11EB-B721-01DF429A4FDF}.Debug|ARM.ActiveCfg = Debug|ARM
{64C20860-D580-11EB-B721-01DF429A4FDF}.Debug|ARM.Build.0 = Debug|ARM
{64C20860-D580-11EB-B721-01DF429A4FDF}.Debug|x64.ActiveCfg = Debug|x64
{64C20860-D580-11EB-B721-01DF429A4FDF}.Debug|x64.Build.0 = Debug|x64
{64C20860-D580-11EB-B721-01DF429A4FDF}.Debug|x86.ActiveCfg = Debug|x86
{64C20860-D580-11EB-B721-01DF429A4FDF}.Debug|x86.Build.0 = Debug|x86
{64C20860-D580-11EB-B721-01DF429A4FDF}.Development|ARM.ActiveCfg = Development|ARM
{64C20860-D580-11EB-B721-01DF429A4FDF}.Development|ARM.Build.0 = Development|ARM
{64C20860-D580-11EB-B721-01DF429A4FDF}.Development|x64.ActiveCfg = Development|x64
{64C20860-D580-11EB-B721-01DF429A4FDF}.Development|x64.Build.0 = Development|x64
{64C20860-D580-11EB-B721-01DF429A4FDF}.Development|x86.ActiveCfg = Development|x86
{64C20860-D580-11EB-B721-01DF429A4FDF}.Development|x86.Build.0 = Development|x86
{64C20860-D580-11EB-B721-01DF429A4FDF}.Release|ARM.ActiveCfg = Release|ARM
{64C20860-D580-11EB-B721-01DF429A4FDF}.Release|ARM.Build.0 = Release|ARM
{64C20860-D580-11EB-B721-01DF429A4FDF}.Release|x64.ActiveCfg = Release|x64
{64C20860-D580-11EB-B721-01DF429A4FDF}.Release|x64.Build.0 = Release|x64
{64C20860-D580-11EB-B721-01DF429A4FDF}.Release|x86.ActiveCfg = Release|x86
{64C20860-D580-11EB-B721-01DF429A4FDF}.Release|x86.Build.0 = Release|x86
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|ARM.ActiveCfg = Debug|ARM
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|ARM.Build.0 = Debug|ARM
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x64.ActiveCfg = Debug|x64
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x64.Build.0 = Debug|x64
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x86.ActiveCfg = Debug|x86
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x86.Build.0 = Debug|x86
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|ARM.ActiveCfg = Debug|ARM
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|ARM.Build.0 = Debug|ARM
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x64.ActiveCfg = Debug|x64
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x64.Build.0 = Debug|x64
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x86.ActiveCfg = Debug|x86
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x86.Build.0 = Debug|x86
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|ARM.ActiveCfg = Release|ARM
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|ARM.Build.0 = Release|ARM
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x64.ActiveCfg = Release|x64
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x64.Build.0 = Release|x64
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x86.ActiveCfg = Release|x86
{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x86.Build.0 = Release|x86
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|ARM.ActiveCfg = Debug|ARM
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|ARM.Build.0 = Debug|ARM
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x64.ActiveCfg = Debug|x64
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x64.Build.0 = Debug|x64
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x86.ActiveCfg = Debug|Win32
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x86.Build.0 = Debug|Win32
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|ARM.ActiveCfg = Debug|ARM
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|ARM.Build.0 = Debug|ARM
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x64.ActiveCfg = Debug|x64
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x64.Build.0 = Debug|x64
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x86.ActiveCfg = Debug|Win32
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x86.Build.0 = Debug|Win32
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|ARM.ActiveCfg = Release|ARM
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|ARM.Build.0 = Release|ARM
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x64.ActiveCfg = Release|x64
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x64.Build.0 = Release|x64
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x86.ActiveCfg = Release|Win32
{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RNProtogenesis")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RNProtogenesis")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains Runtime Directives, specifications about types your application accesses
through reflection and other dynamic code patterns. Runtime Directives are used to control the
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
library does not do any reflection, then you generally do not need to edit this file. However,
if your library reflects over types, especially types passed to it or derived from its types,
then you should write Runtime Directives.
The most common use of reflection in libraries is to discover information about types passed
to the library. Runtime Directives have three ways to express requirements on types passed to
your library.
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
Use these directives to reflect over types passed as a parameter.
2. SubTypes
Use a SubTypes directive to reflect over types derived from another type.
3. AttributeImplies
Use an AttributeImplies directive to indicate that your library needs to reflect over
types or methods decorated with an attribute.
For more information on writing Runtime Directives for libraries, please visit
http://go.microsoft.com/fwlink/?LinkID=391919
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="RNProtogenesis">
<!-- add directives for your library here -->
</Library>
</Directives>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{64C20860-D580-11EB-B721-01DF429A4FDF}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Protogenesis</RootNamespace>
<AssemblyName>Protogenesis</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ReactWindowsRoot>..\..\node_modules</ReactWindowsRoot>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' != 'Development'">
<ReactWindowsRoot>..\..</ReactWindowsRoot>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Development|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Development\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Development|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Development\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Development|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Development\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RNProtogenesisModule.cs" />
<Compile Include="RNProtogenesisPackage.cs" />
<EmbeddedResource Include="Properties\RNProtogenesis.rd.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(ReactWindowsRoot)\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj">
<Project>{c7673ad5-e3aa-468c-a5fd-fa38154e205c}</Project>
<Name>ReactNative</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
using ReactNative.Bridge;
using System;
using System.Collections.Generic;
using Windows.ApplicationModel.Core;
using Windows.UI.Core;
namespace Protogenesis.RNProtogenesis
{
/// <summary>
/// A module that allows JS to share data.
/// </summary>
class RNProtogenesisModule : NativeModuleBase
{
/// <summary>
/// Instantiates the <see cref="RNProtogenesisModule"/>.
/// </summary>
internal RNProtogenesisModule()
{
}
/// <summary>
/// The name of the native module.
/// </summary>
public override string Name
{
get
{
return "RNProtogenesis";
}
}
}
}
using ReactNative.Bridge;
using ReactNative.Modules.Core;
using ReactNative.UIManager;
using System;
using System.Collections.Generic;
namespace Protogenesis.RNProtogenesis
{
/// <summary>
/// Package defining core framework modules (e.g., <see cref="UIManagerModule"/>).
/// It should be used for modules that require special integration with
/// other framework parts (e.g., with the list of packages to load view
/// managers from).
/// </summary>
public class RNProtogenesisPackage : IReactPackage
{
/// <summary>
/// Creates the list of native modules to register with the react
/// instance.
/// </summary>
/// <param name="reactContext">The react application context.</param>
/// <returns>The list of native modules.</returns>
public IReadOnlyList<INativeModule> CreateNativeModules(ReactContext reactContext)
{
return new List<INativeModule>
{
new RNProtogenesisModule(),
};
}
/// <summary>
/// Creates the list of JavaScript modules to register with the
/// react instance.
/// </summary>
/// <returns>The list of JavaScript modules.</returns>
public IReadOnlyList<Type> CreateJavaScriptModulesConfig()
{
return new List<Type>(0);
}
/// <summary>
/// Creates the list of view managers that should be registered with
/// the <see cref="UIManagerModule"/>.
/// </summary>
/// <param name="reactContext">The react application context.</param>
/// <returns>The list of view managers.</returns>
public IReadOnlyList<IViewManager> CreateViewManagers(
ReactContext reactContext)
{
return new List<IViewManager>(0);
}
}
}
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment