Commit 83e8c4bb authored by Marek Kotewicz's avatar Marek Kotewicz
Browse files

xcode run cargo in prebuild phaes

parent b2337b1c
......@@ -27,6 +27,19 @@
### usage
- iOS
```
react-native run-ios
```
- Android
```
make -C rust/signer android
react-native run-android
```
#### Create new account
seed: `this is sparta`
......
......@@ -150,6 +150,13 @@ dependencies {
compile "com.facebook.react:react-native:+" // From node_modules
}
// TODO: set env variables
//task compileRust(type: Exec) {
// commandLine "make", '-C', '../../rust/signer', 'android'
//}
//
//preBuild.dependsOn compileRust
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
......
......@@ -58,4 +58,4 @@ public class EthkeyBridge extends ReactContextBaseJavaModule {
private static native String ethkeyBrainwalletSign(String seed, String message);
private static native String ethkeyRlpItem(String data, int position);
private static native String ethkeyKeccak(String data);
}
}
\ No newline at end of file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libsigner
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libsigner.so
include $(PREBUILT_SHARED_LIBRARY)
include $(PREBUILT_SHARED_LIBRARY)
\ No newline at end of file
......@@ -532,6 +532,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "NativeSigner" */;
buildPhases = (
EA0AC6791E6EF0C70032B995 /* ShellScript */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
......@@ -870,6 +871,19 @@
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
};
EA0AC6791E6EF0C70032B995 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "make -C ../rust/signer ios";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
......
Supports Markdown
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