Skip to content

Commit

Permalink
Merge pull request #3 from nyanofthemoon/devel
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
nyanofthemoon authored Sep 19, 2016
2 parents b91f21d + e7d8308 commit 98367fd
Show file tree
Hide file tree
Showing 381 changed files with 15,140 additions and 1,479 deletions.
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

41 changes: 41 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[ignore]

# We fork some components by platform.
.*/*.android.js

# Ignore templates with `@flow` in header
.*/local-cli/generator.*

# Ignore malformed json
.*/node_modules/y18n/test/.*\.json

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/

[options]
module.system=haste

esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable

experimental.strict_type_args=true

munge_underscores=true

module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
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'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
^0.27.0
33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# CamRoulette-APP

## Installation

* [React](https://github.com/facebook/react) & [React Native](https://github.com/facebook/react-native) v0.30
* [Redux](https://github.com/reactjs/redux) & [Remote Redux DevTools](https://github.com/zalmoxisus/remote-redux-devtools) & [On Debugger](https://github.com/jhen0409/remote-redux-devtools-on-debugger)
* [Immutable](https://github.com/facebook/immutable-js) & [Immutable DevTools](https://github.com/andrewdavey/immutable-devtools)
* [Babel](https://github.com/babel/babel) & Plugins: [transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy)
# Installation

See [Getting Started](https://facebook.github.io/react-native/docs/getting-started.html) to install requirement tools.
[React-Native-Vector-Icons Installation](https://github.com/oblador/react-native-vector-icons)
[React-Native-WebRTC iOS Installation](https://github.com/oney/react-native-webrtc/blob/master/Documentation/iOSInstallation.md)
[iOS Device Achitecture Compatibility Chart](https://developer.apple.com/library/ios/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html)
[FBSDK](https://developers.facebook.com/docs/ios/downloads)
[Google AdMob Framework](https://github.com/sbugert/react-native-admob)


```bash
$ npm install -g react-native-cli
$ npm install
```

## Development
### Development

#### Start local server
##### Start local server

```bash
$ npm start
$ npm run dev
```

#### iOS
##### iOS

Run command to open iOS simulator and run app:

Expand All @@ -36,7 +37,7 @@ Or open `ios/RNBoilerplate.xcodeproj` file with XCode:
$ npm run ios-open
```

#### Android (5.0+)
##### Android (5.0+)

Open Android emulator (recommented [Genymotion](https://www.genymotion.com)) and run command: (Or connect real device via USB)

Expand All @@ -47,12 +48,4 @@ $ npm run android

## DevTools

In development mode, you can install [React Native Debugger](https://github.com/jhen0409/react-native-debugger) as default debugger. If not installed, it will use [Remote Redux DevTools](https://github.com/zalmoxisus/remote-redux-devtools) and [On Debugger](https://github.com/jhen0409/remote-redux-devtools-on-debugger).

## Test

Use [react-native-mock](https://github.com/lelandrichardson/react-native-mock), and test with [Mocha](https://github.com/mochajs/mocha), [Enzyme](https://github.com/airbnb/enzyme).

```bash
$ npm test
```
In development mode, you can install [React Native Debugger](https://github.com/jhen0409/react-native-debugger) as default debugger. If not installed, it will use [Remote Redux DevTools](https://github.com/zalmoxisus/remote-redux-devtools) and [On Debugger](https://github.com/jhen0409/remote-redux-devtools-on-debugger).
8 changes: 8 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ android {
}

dependencies {
compile project(':react-native-device-info')
compile project(':react-native-geocoder')
compile project(':react-native-sound')
compile project(':react-native-admob')
compile project(':react-native-webrtc')
compile project(':react-native-vector-icons')
compile project(':react-native-fbsdk')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
Expand Down
13 changes: 12 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
package="com.rnboilerplate">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name=".MainApplication"
Expand All @@ -18,7 +20,16 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.FacebookActivity" android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name" />
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
</application>

</manifest>
<provider android:authorities="com.facebook.app.FacebookContentProvider1569774163325188"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />

</manifest>
Binary file added android/app/src/main/assets/Entypo.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/EvilIcons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/FontAwesome.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/Foundation.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/Ionicons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/MaterialIcons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/Octicons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/Zocial.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Arial.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Entypo.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/EvilIcons.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Foundation.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Georgia.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/IndieFlower.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Octicons.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Roboto.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Skia.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Zocial.ttf
Binary file not shown.
25 changes: 25 additions & 0 deletions android/app/src/main/java/com/rnboilerplate/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
// Using https://github.com/facebook/react-native-fbsdk
// https://developers.facebook.com/docs/android/getting-started/

package com.rnboilerplate;

import com.facebook.react.ReactActivity;
import com.devfd.RNGeocoder.RNGeocoderPackage;
import com.zmxv.RNSound.RNSoundPackage;
import com.sbugert.rnadmob.RNAdMobPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.reactnative.androidsdk.FBSDKPackage;

import android.content.Intent;

public class MainActivity extends ReactActivity {

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
MainApplication.getCallbackManager().onActivityResult(requestCode, resultCode, data);
}

/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
Expand All @@ -12,4 +28,13 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "RNBoilerplate";
}

@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNSoundPackage(),
new RNGeocoderPackage()
);
}
}
34 changes: 33 additions & 1 deletion android/app/src/main/java/com/rnboilerplate/MainApplication.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,46 @@
// Using https://github.com/facebook/react-native-fbsdk
// https://developers.facebook.com/docs/android/getting-started/

package com.rnboilerplate;

import android.app.Application;
import android.util.Log;

import com.facebook.react.ReactApplication;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.oney.ReactNativeWebRTC.WebRTCModulePackage;
import com.gcrabtree.rctsocketio.SocketIoPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;

// For Facebook Login : react-native-fbsdk
import com.facebook.CallbackManager;
import com.facebook.FacebookSdk;
import com.facebook.reactnative.androidsdk.FBSDKPackage;

import java.util.Arrays;
import java.util.List;

import com.oblador.vectoricons.VectorIconsPackage;

public class MainApplication extends Application implements ReactApplication {

private static CallbackManager mCallbackManager = CallbackManager.Factory.create();

protected static CallbackManager getCallbackManager() {
return mCallbackManager;
}

@Override
public void onCreate() {
super.onCreate();
FacebookSdk.sdkInitialize(getApplicationContext());
// If you want to use AppEventsLogger to log events.
AppEventsLogger.activateApp(this);
}

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
Expand All @@ -23,7 +50,11 @@ protected boolean getUseDeveloperSupport() {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
new MainReactPackage(),
new RNDeviceInfo(),
new WebRTCModulePackage(),
new FBSDKPackage(mCallbackManager),
new VectorIconsPackage()
);
}
};
Expand All @@ -32,4 +63,5 @@ protected List<ReactPackage> getPackages() {
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

}
11 changes: 10 additions & 1 deletion android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<resources>
<string name="app_name">RNBoilerplate</string>








<string name="app_name">CamRoulette-APP</string>
<string name="facebook_app_id">1569774163325188</string>
</resources>
14 changes: 14 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
rootProject.name = 'RNBoilerplate'

include ':app'
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':react-native-geocoder'
project(':react-native-geocoder').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-geocoder/android')
include ':react-native-sound'
project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
include ':react-native-admob'
project(':react-native-admob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-admob/android')
include ':react-native-webrtc'
project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
include ':react-native-fbsdk'
project(':react-native-fbsdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fbsdk/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
4 changes: 3 additions & 1 deletion index.android.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import './src';
'use strict'

import './src'
4 changes: 3 additions & 1 deletion index.ios.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import './src';
'use strict'

import './src'
Binary file added ios/Comfortaa.ttf
Binary file not shown.
Binary file added ios/Condiment.ttf
Binary file not shown.
Binary file added ios/GoogleMobileAds.framework/GoogleMobileAds
Binary file not shown.
Loading

0 comments on commit 98367fd

Please sign in to comment.