diff --git a/.gitignore b/.gitignore
index 56814c7..47ccf0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@ node_modules/
coverage/
dist/
scratch/
+mobile/android/.idea/
+mobile/ios/**/xcuserdata/
.DS_Store
npm-debug.log*
yarn-debug.log*
diff --git a/mobile/App.js b/mobile/App.js
deleted file mode 100644
index 1274caa..0000000
--- a/mobile/App.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import React from 'react';
-import { StyleSheet, Text, View } from 'react-native';
-
-export default class App extends React.Component {
- render() {
- return (
-
- Hello John
- Changes you make will automatically reload.
- Shake your phone to open the developer menu.
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: '#fff',
- alignItems: 'center',
- justifyContent: 'center',
- },
-});
diff --git a/mobile/android/DeightonAR.iml b/mobile/android/DeightonAR.iml
new file mode 100644
index 0000000..d6795cd
--- /dev/null
+++ b/mobile/android/DeightonAR.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mobile/android/app/app.iml b/mobile/android/app/app.iml
new file mode 100644
index 0000000..ebb4e00
--- /dev/null
+++ b/mobile/android/app/app.iml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
index 79ae5d3..a5ecf8f 100644
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -94,8 +94,8 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
- compileSdkVersion 23
- buildToolsVersion "23.0.1"
+ compileSdkVersion 27
+ buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.deightonar"
@@ -140,6 +140,7 @@ dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
+ compile project(':react-native-navigation')
}
// Run this once to be able to run the application with BUCK
diff --git a/mobile/android/app/src/main/java/com/deightonar/MainActivity.java b/mobile/android/app/src/main/java/com/deightonar/MainActivity.java
index b26ec21..f61a566 100644
--- a/mobile/android/app/src/main/java/com/deightonar/MainActivity.java
+++ b/mobile/android/app/src/main/java/com/deightonar/MainActivity.java
@@ -1,15 +1,11 @@
package com.deightonar;
-import com.facebook.react.ReactActivity;
+// import com.facebook.react.ReactActivity;
+import com.reactnativenavigation.controllers.SplashActivity;
-public class MainActivity extends ReactActivity {
-
- /**
- * Returns the name of the main component registered from JavaScript.
- * This is used to schedule rendering of the component.
- */
- @Override
- protected String getMainComponentName() {
- return "DeightonAR";
- }
+public class MainActivity extends SplashActivity {
+ // @Override
+ // protected String getMainComponentName() {
+ // return "DeightonAR";
+ // }
}
diff --git a/mobile/android/app/src/main/java/com/deightonar/MainApplication.java b/mobile/android/app/src/main/java/com/deightonar/MainApplication.java
index 3cf69f1..4b6fc07 100644
--- a/mobile/android/app/src/main/java/com/deightonar/MainApplication.java
+++ b/mobile/android/app/src/main/java/com/deightonar/MainApplication.java
@@ -11,35 +11,63 @@ import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
-public class MainApplication extends Application implements ReactApplication {
+import com.reactnativenavigation.NavigationApplication;
- private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
+public class MainApplication extends NavigationApplication {
@Override
- public boolean getUseDeveloperSupport() {
+ public boolean isDebug() {
+ // Make sure you are using BuildConfig from your own application
return BuildConfig.DEBUG;
}
- @Override
protected List getPackages() {
+ // Add additional packages you require here
+ // No need to add RnnPackage and MainReactPackage
return Arrays.asList(
- new MainReactPackage()
+ // eg. new VectorIconsPackage()
);
}
@Override
- protected String getJSMainModuleName() {
+ public List createAdditionalReactPackages() {
+ return getPackages();
+ }
+
+ @Override
+ public String getJSMainModuleName() {
return "index";
}
- };
-
- @Override
- public ReactNativeHost getReactNativeHost() {
- return mReactNativeHost;
- }
-
- @Override
- public void onCreate() {
- super.onCreate();
- SoLoader.init(this, /* native exopackage */ false);
- }
}
+
+// public class MainApplication extends Application implements ReactApplication {
+//
+// private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
+// @Override
+// public boolean getUseDeveloperSupport() {
+// return BuildConfig.DEBUG;
+// }
+//
+// @Override
+// protected List getPackages() {
+// return Arrays.asList(
+// new MainReactPackage()
+// );
+// }
+//
+// @Override
+// protected String getJSMainModuleName() {
+// return "index";
+// }
+// };
+//
+// @Override
+// public ReactNativeHost getReactNativeHost() {
+// return mReactNativeHost;
+// }
+//
+// @Override
+// public void onCreate() {
+// super.onCreate();
+// SoLoader.init(this, /* native exopackage */ false);
+// }
+// }
diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle
index eed9972..c5fecab 100644
--- a/mobile/android/build.gradle
+++ b/mobile/android/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.3'
+ classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/mobile/android/gradle/wrapper/gradle-wrapper.properties b/mobile/android/gradle/wrapper/gradle-wrapper.properties
index dbdc05d..d8ac6a7 100644
--- a/mobile/android/gradle/wrapper/gradle-wrapper.properties
+++ b/mobile/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Wed Mar 07 13:09:40 PST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
diff --git a/mobile/android/local.properties b/mobile/android/local.properties
new file mode 100644
index 0000000..f6ccdad
--- /dev/null
+++ b/mobile/android/local.properties
@@ -0,0 +1,11 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Wed Mar 07 13:03:42 PST 2018
+sdk.dir=/Users/john/Library/Android/sdk
diff --git a/mobile/android/settings.gradle b/mobile/android/settings.gradle
index f499f84..aa6028a 100644
--- a/mobile/android/settings.gradle
+++ b/mobile/android/settings.gradle
@@ -1,3 +1,6 @@
rootProject.name = 'DeightonAR'
include ':app'
+include ':react-native-navigation'
+
+project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app/')
diff --git a/mobile/index.js b/mobile/index.js
index 54309b9..54b46ea 100644
--- a/mobile/index.js
+++ b/mobile/index.js
@@ -1,4 +1 @@
-import App from './src/App'
-import App from './App';
-import { AppRegistry } from 'react-native'
-AppRegistry.registerComponent('DeightonAR', () => App);
+import './src/app'
diff --git a/mobile/ios/DeightonAR.xcodeproj/project.xcworkspace/xcuserdata/john.xcuserdatad/UserInterfaceState.xcuserstate b/mobile/ios/DeightonAR.xcodeproj/project.xcworkspace/xcuserdata/john.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 2c45d21..0000000
Binary files a/mobile/ios/DeightonAR.xcodeproj/project.xcworkspace/xcuserdata/john.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/mobile/ios/DeightonAR/Images.xcassets/AppIcon.appiconset/Contents.json b/mobile/ios/DeightonAR/Images.xcassets/AppIcon.appiconset/Contents.json
index 118c98f..19882d5 100644
--- a/mobile/ios/DeightonAR/Images.xcassets/AppIcon.appiconset/Contents.json
+++ b/mobile/ios/DeightonAR/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -1,5 +1,15 @@
{
"images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
{
"idiom" : "iphone",
"size" : "29x29",
@@ -29,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "size" : "1024x1024",
+ "scale" : "1x"
}
],
"info" : {
diff --git a/mobile/src/app.js b/mobile/src/app.js
new file mode 100644
index 0000000..1f2c09c
--- /dev/null
+++ b/mobile/src/app.js
@@ -0,0 +1,12 @@
+import { Platform } from 'react-native'
+import { Navigation } from 'react-native-navigation'
+import { registerScreens } from './screens'
+
+registerScreens()
+
+Navigation.startSingleScreenApp({
+ screen: {
+ screen: 'app.Home',
+ title: 'Home',
+ }
+})
diff --git a/mobile/src/screens/Home.js b/mobile/src/screens/Home.js
new file mode 100644
index 0000000..f760515
--- /dev/null
+++ b/mobile/src/screens/Home.js
@@ -0,0 +1,44 @@
+import React from 'react';
+import { StyleSheet, Text, View } from 'react-native';
+
+export class Home extends React.Component {
+ constructor(props) {
+ super(props);
+ this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));
+ }
+
+ onNavigatorEvent(event) {
+ switch(event.id) {
+ case 'willAppear':
+ break;
+ case 'didAppear':
+ this.props.navigator.showModal({ screen: 'app.Login' })
+ break;
+ case 'willDisappear':
+ break;
+ case 'didDisappear':
+ break;
+ case 'willCommitPreview':
+ break;
+ }
+ }
+
+ render() {
+ return (
+
+ Hello John
+ Changes you make will automatically reload.
+ Shake your phone to open the developer menu.
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: '#fff',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+});
diff --git a/mobile/src/screens/Login.js b/mobile/src/screens/Login.js
new file mode 100644
index 0000000..60beb4d
--- /dev/null
+++ b/mobile/src/screens/Login.js
@@ -0,0 +1,36 @@
+import React from 'react';
+import { StyleSheet, Text, Image, Switch, TextInput, View, Button } from 'react-native';
+import logoImage from './images/deighton.png'
+
+export class Login extends React.Component {
+ constructor(props) {
+ super(props)
+ }
+
+ handleLogin() {
+ this.props.navigator.dismissModal()
+ }
+
+ render() {
+ return (
+
+
+ Email:
+
+ Password:
+
+ Remember Me
+
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: '#00ff00',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+});
diff --git a/mobile/src/screens/images/deighton.png b/mobile/src/screens/images/deighton.png
new file mode 100644
index 0000000..c9e8a79
Binary files /dev/null and b/mobile/src/screens/images/deighton.png differ
diff --git a/mobile/src/screens/index.js b/mobile/src/screens/index.js
new file mode 100644
index 0000000..fb4d58b
--- /dev/null
+++ b/mobile/src/screens/index.js
@@ -0,0 +1,8 @@
+import { Home } from './Home'
+import { Login } from './Login'
+import { Navigation } from 'react-native-navigation'
+
+export function registerScreens() {
+ Navigation.registerComponent('app.Home', () => Home)
+ Navigation.registerComponent('app.Login', () => Login)
+}
diff --git a/website/config/webpack.config.dev.js b/website/config/webpack.config.dev.js
index 17915e8..ebb7aea 100644
--- a/website/config/webpack.config.dev.js
+++ b/website/config/webpack.config.dev.js
@@ -117,16 +117,14 @@ module.exports = {
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
- use: [
- {
- options: {
- formatter: eslintFormatter,
- eslintPath: require.resolve('eslint'),
+ use: [{
+ options: {
+ formatter: eslintFormatter,
+ eslintPath: require.resolve('eslint'),
- },
- loader: require.resolve('eslint-loader'),
},
- ],
+ loader: require.resolve('eslint-loader'),
+ }, ],
include: paths.appSrc,
},
{
@@ -134,67 +132,66 @@ module.exports = {
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
- // "url" loader works like "file" loader except that it embeds assets
- // smaller than specified limit in bytes as data URLs to avoid requests.
- // A missing `test` is equivalent to a match.
- {
- test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.svg$/],
- loader: require.resolve('url-loader'),
- options: {
- limit: 10000,
- name: 'static/media/[name].[hash:8].[ext]',
- },
- },
- // Process JS with Babel.
- {
- test: /\.(js|jsx|mjs)$/,
- include: paths.appSrc,
- loader: require.resolve('babel-loader'),
- options: {
-
- // This is a feature of `babel-loader` for webpack (not Babel itself).
- // It enables caching results in ./node_modules/.cache/babel-loader/
- // directory for faster rebuilds.
- cacheDirectory: true,
- },
- },
- // "postcss" loader applies autoprefixer to our CSS.
- // "css" loader resolves paths in CSS and adds assets as dependencies.
- // "style" loader turns CSS into JS modules that inject