Remove old code
16
.babelrc
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
"react-native",
|
||||
"react-native-stage-0/decorator-support"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-es2015-parameters"
|
||||
],
|
||||
"env": {
|
||||
"production": {
|
||||
"plugins": [
|
||||
"transform-remove-console"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
69
.eslintrc
@@ -1,69 +0,0 @@
|
||||
{
|
||||
"parser": "babel-eslint",
|
||||
"extends": [
|
||||
"airbnb",
|
||||
"plugin:flowtype/recommended",
|
||||
"plugin:react/recommended",
|
||||
"prettier",
|
||||
"prettier/flowtype",
|
||||
"prettier/react"
|
||||
],
|
||||
"env": {
|
||||
"es6": true,
|
||||
"jest": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": {
|
||||
"__DEV__": true
|
||||
},
|
||||
"plugins": ["babel", "flowtype", "import", "react", "react-native", "prettier"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"sourceType": "module"
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [".js", ".jsx", ".android.js", ".ios.js"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"react/jsx-filename-extension": 0,
|
||||
"react/prefer-stateless-function": [
|
||||
"error",
|
||||
{
|
||||
"ignorePureComponents": true
|
||||
}
|
||||
],
|
||||
"react/require-default-props": 0,
|
||||
"no-case-declarations": 0,
|
||||
"no-confusing-arrow": 0,
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": ["debug", "error", "warn"]
|
||||
}
|
||||
],
|
||||
"no-underscore-dangle": 0,
|
||||
"no-nested-ternary": 0,
|
||||
"react/default-props-match-prop-types": 0,
|
||||
"react/prop-types": 0,
|
||||
"react/no-unused-prop-types": 0,
|
||||
"react-native/no-unused-styles": 2,
|
||||
"react-native/split-platform-components": 2,
|
||||
"react-native/no-color-literals": 2,
|
||||
"no-plusplus": 0,
|
||||
"prettier/prettier": [
|
||||
"error",
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
48
.flowconfig
@@ -1,48 +0,0 @@
|
||||
[ignore]
|
||||
; We fork some components by platform
|
||||
.*/*[.]android.js
|
||||
|
||||
; Ignore "BUCK" generated dirs
|
||||
<PROJECT_ROOT>/\.buckd/
|
||||
|
||||
; Ignore unexpected extra "@providesModule"
|
||||
.*/node_modules/.*/node_modules/fbjs/.*
|
||||
|
||||
; Ignore duplicate module providers
|
||||
; For RN Apps installed via npm, "Libraries" folder is inside
|
||||
; "node_modules/react-native" but in the source repo it is in the root
|
||||
.*/Libraries/react-native/React.js
|
||||
|
||||
; Ignore polyfills
|
||||
.*/Libraries/polyfills/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||
node_modules/react-native/flow/
|
||||
|
||||
[options]
|
||||
emoji=true
|
||||
|
||||
module.system=haste
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
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=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
unsafe.enable_getters_and_setters=true
|
||||
|
||||
[version]
|
||||
^0.60.1
|
||||
66
.gitignore
vendored
@@ -1,66 +0,0 @@
|
||||
# OSX
|
||||
#
|
||||
.DS_Store
|
||||
|
||||
# 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
|
||||
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
\.buckd/
|
||||
*.keystore
|
||||
|
||||
# fastlane
|
||||
#
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/
|
||||
|
||||
*/fastlane/report.xml
|
||||
*/fastlane/Preview.html
|
||||
*/fastlane/screenshots
|
||||
|
||||
# Pods
|
||||
ios/pods/
|
||||
|
||||
# Bundle and source maps
|
||||
build
|
||||
*.jsbundle*
|
||||
|
||||
.history
|
||||
.vscode
|
||||
|
||||
# Use yarn instead of npm
|
||||
.package-lock.json
|
||||
@@ -1,66 +0,0 @@
|
||||
import re
|
||||
|
||||
# To learn about Buck see [Docs](https://buckbuild.com/).
|
||||
# To run your application with Buck:
|
||||
# - install Buck
|
||||
# - `npm start` - to start the packager
|
||||
# - `cd android`
|
||||
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
|
||||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
|
||||
# - `buck install -r android/app` - compile, install and run application
|
||||
#
|
||||
|
||||
lib_deps = []
|
||||
for jarfile in glob(['libs/*.jar']):
|
||||
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
|
||||
lib_deps.append(':' + name)
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
binary_jar = jarfile,
|
||||
)
|
||||
|
||||
for aarfile in glob(['libs/*.aar']):
|
||||
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
|
||||
lib_deps.append(':' + name)
|
||||
android_prebuilt_aar(
|
||||
name = name,
|
||||
aar = aarfile,
|
||||
)
|
||||
|
||||
android_library(
|
||||
name = 'all-libs',
|
||||
exported_deps = lib_deps
|
||||
)
|
||||
|
||||
android_library(
|
||||
name = 'app-code',
|
||||
srcs = glob([
|
||||
'src/main/java/**/*.java',
|
||||
]),
|
||||
deps = [
|
||||
':all-libs',
|
||||
':build_config',
|
||||
':res',
|
||||
],
|
||||
)
|
||||
|
||||
android_build_config(
|
||||
name = 'build_config',
|
||||
package = 'org.brunolemos.devhub',
|
||||
)
|
||||
|
||||
android_resource(
|
||||
name = 'res',
|
||||
res = 'src/main/res',
|
||||
package = 'org.brunolemos.devhub',
|
||||
)
|
||||
|
||||
android_binary(
|
||||
name = 'app',
|
||||
package_type = 'debug',
|
||||
manifest = 'src/main/AndroidManifest.xml',
|
||||
keystore = '//android/keystores:debug',
|
||||
deps = [
|
||||
':app-code',
|
||||
],
|
||||
)
|
||||
@@ -1,159 +0,0 @@
|
||||
apply plugin: "com.android.application"
|
||||
|
||||
import com.android.build.OutputFile
|
||||
|
||||
/**
|
||||
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
||||
* and bundleReleaseJsAndAssets).
|
||||
* These basically call `react-native bundle` with the correct arguments during the Android build
|
||||
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||
* bundle directly from the development server. Below you can see all the possible configurations
|
||||
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
||||
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
||||
*
|
||||
* project.ext.react = [
|
||||
* // the name of the generated asset file containing your JS bundle
|
||||
* bundleAssetName: "index.android.bundle",
|
||||
*
|
||||
* // the entry file for bundle generation
|
||||
* entryFile: "index.android.js",
|
||||
*
|
||||
* // whether to bundle JS and assets in debug mode
|
||||
* bundleInDebug: false,
|
||||
*
|
||||
* // whether to bundle JS and assets in release mode
|
||||
* bundleInRelease: true,
|
||||
*
|
||||
* // whether to bundle JS and assets in another build variant (if configured).
|
||||
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
|
||||
* // The configuration property can be in the following formats
|
||||
* // 'bundleIn${productFlavor}${buildType}'
|
||||
* // 'bundleIn${buildType}'
|
||||
* // bundleInFreeDebug: true,
|
||||
* // bundleInPaidRelease: true,
|
||||
* // bundleInBeta: true,
|
||||
*
|
||||
* // the root of your project, i.e. where "package.json" lives
|
||||
* root: "../../",
|
||||
*
|
||||
* // where to put the JS bundle asset in debug mode
|
||||
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
|
||||
*
|
||||
* // where to put the JS bundle asset in release mode
|
||||
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
|
||||
*
|
||||
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||
* // require('./image.png')), in debug mode
|
||||
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
|
||||
*
|
||||
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||
* // require('./image.png')), in release mode
|
||||
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
|
||||
*
|
||||
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
|
||||
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
|
||||
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
||||
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
||||
* // for example, you might want to remove it from here.
|
||||
* inputExcludes: ["android/**", "ios/**"],
|
||||
*
|
||||
* // override which node gets called and with what additional arguments
|
||||
* nodeExecutableAndArgs: ["node"],
|
||||
*
|
||||
* // supply additional arguments to the packager
|
||||
* extraPackagerArgs: []
|
||||
* ]
|
||||
*/
|
||||
project.ext.react = [
|
||||
entryFile : "index.js",
|
||||
nodeExecutableAndArgs: ["/usr/local/bin/node"]
|
||||
];
|
||||
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
||||
|
||||
/**
|
||||
* Set this to true to create two separate APKs instead of one:
|
||||
* - An APK that only works on ARM devices
|
||||
* - An APK that only works on x86 devices
|
||||
* The advantage is the size of the APK is reduced by about 4MB.
|
||||
* Upload all the APKs to the Play Store and people will download
|
||||
* the correct one based on the CPU architecture of their device.
|
||||
*/
|
||||
def enableSeparateBuildPerCPUArchitecture = false
|
||||
|
||||
/**
|
||||
* Run Proguard to shrink the Java bytecode in release builds.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "26.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.brunolemos.devhub"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 22
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
}
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
reset()
|
||||
enable enableSeparateBuildPerCPUArchitecture
|
||||
universalApk false // If true, also generate a universal APK
|
||||
include "armeabi-v7a", "x86"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled enableProguardInReleaseBuilds
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
// applicationVariants are e.g. debug, release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
// For each separate APK per architecture, set a unique version code as described here:
|
||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
|
||||
def abi = output.getFilter(OutputFile.ABI)
|
||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||
output.versionCodeOverride =
|
||||
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.google.android.gms:play-services-base:11.6.2"
|
||||
|
||||
implementation 'com.google.firebase:firebase-auth:11.6.2'
|
||||
implementation 'com.google.firebase:firebase-core:11.6.2'
|
||||
implementation 'com.google.firebase:firebase-database:11.6.2'
|
||||
compile(project(':react-native-firebase')) {
|
||||
transitive = false
|
||||
}
|
||||
compile project(':react-native-code-push')
|
||||
compile project(':react-native-vector-icons')
|
||||
compile project(':react-native-prompt-android')
|
||||
compile project(':react-native-linear-gradient')
|
||||
compile project(':bugsnag-react-native')
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
compile "com.android.support:appcompat-v7:23.0.1"
|
||||
compile "com.facebook.react:react-native:+" // From node_modules
|
||||
}
|
||||
|
||||
// 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) {
|
||||
from configurations.compile
|
||||
into 'libs'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
@@ -1,62 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "589579854600",
|
||||
"firebase_url": "https://devhub-65899.firebaseio.com",
|
||||
"project_id": "devhub-65899",
|
||||
"storage_bucket": "devhub-65899.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:589579854600:android:9e47b631a5be6ed3",
|
||||
"android_client_info": {
|
||||
"package_name": "org.brunolemos.devhub"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "589579854600-6aqpf7hs07lgmu50vvqer3cr7ebbcci9.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "org.brunolemos.devhub",
|
||||
"certificate_hash": "de90c81a791b4f6c17ab170051683e9ebc99eebe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "589579854600-vcf6q5kovufi6jmf905k3hh76754jgdv.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBhCQmv6cXRxu9bUQcvsVBlP4cwJvLwo0U"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 2,
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "589579854600-nd8bv6fcdjvfg0ke6j4cu44brnqdhs55.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "org.brunolemos.devhub"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "589579854600-vcf6q5kovufi6jmf905k3hh76754jgdv.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
70
android/app/proguard-rules.pro
vendored
@@ -1,70 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Disabling obfuscation is useful if you collect stack traces from production crashes
|
||||
# (unless you are using a system that supports de-obfuscate the stack traces).
|
||||
-dontobfuscate
|
||||
|
||||
# React Native
|
||||
|
||||
# Keep our interfaces so they can be used by other ProGuard rules.
|
||||
# See http://sourceforge.net/p/proguard/bugs/466/
|
||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
|
||||
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
||||
|
||||
# Do not strip any method/class that is annotated with @DoNotStrip
|
||||
-keep @com.facebook.proguard.annotations.DoNotStrip class *
|
||||
-keep @com.facebook.common.internal.DoNotStrip class *
|
||||
-keepclassmembers class * {
|
||||
@com.facebook.proguard.annotations.DoNotStrip *;
|
||||
@com.facebook.common.internal.DoNotStrip *;
|
||||
}
|
||||
|
||||
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
|
||||
void set*(***);
|
||||
*** get*();
|
||||
}
|
||||
|
||||
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
|
||||
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
||||
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
|
||||
|
||||
-dontwarn com.facebook.react.**
|
||||
|
||||
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
|
||||
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
|
||||
-dontwarn android.text.StaticLayout
|
||||
|
||||
# okhttp
|
||||
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class okhttp3.** { *; }
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
# okio
|
||||
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
-dontwarn java.nio.file.*
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||
-dontwarn okio.**
|
||||
@@ -1,46 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.brunolemos.devhub"
|
||||
android:versionCode="1"
|
||||
android:versionName="0.9.4">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="16"
|
||||
android:targetSdkVersion="22" />
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<!-- Accepts URIs that begin with "http://github.com/” -->
|
||||
<!-- note that the leading "/" is required for pathPrefix-->
|
||||
<!--<data android:scheme="http" android:host="github.com" android:pathPrefix="/" />-->
|
||||
<!--<data android:scheme="https" android:host="github.com" android:pathPrefix="/" />-->
|
||||
<!--<data android:scheme="http" android:host="api.github.com" android:pathPrefix="/" />-->
|
||||
<!--<data android:scheme="https" android:host="api.github.com" android:pathPrefix="/" />-->
|
||||
|
||||
<!-- Accepts URIs that begin with "devhub://” -->
|
||||
<data android:scheme="devhub" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,15 +0,0 @@
|
||||
package org.brunolemos.devhub;
|
||||
|
||||
import com.facebook.react.ReactActivity;
|
||||
|
||||
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 "devhub";
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package org.brunolemos.devhub;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import io.invertase.firebase.RNFirebasePackage;
|
||||
import io.invertase.firebase.auth.RNFirebaseAuthPackage;
|
||||
import io.invertase.firebase.database.RNFirebaseDatabasePackage;
|
||||
import com.microsoft.codepush.react.CodePush;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import im.shimo.react.prompt.RNPromptPackage;
|
||||
import com.BV.LinearGradient.LinearGradientPackage;
|
||||
import com.bugsnag.BugsnagReactNative;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MainApplication extends Application implements ReactApplication {
|
||||
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
||||
|
||||
@Override
|
||||
protected String getJSMainModuleName() {
|
||||
return "index";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getJSBundleFile() {
|
||||
return CodePush.getJSBundleFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(),
|
||||
new RNFirebasePackage(),
|
||||
new RNFirebaseAuthPackage(),
|
||||
new RNFirebaseDatabasePackage(),
|
||||
new CodePush(getResources().getString(R.string.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
|
||||
new VectorIconsPackage(),
|
||||
new RNPromptPackage(),
|
||||
new LinearGradientPackage(),
|
||||
BugsnagReactNative.getPackage()
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 23 KiB |
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!--
|
||||
This file is automatically generated by Crashlytics to uniquely
|
||||
identify individual builds of your Android application.
|
||||
|
||||
Do NOT modify, delete, or commit to source control!
|
||||
-->
|
||||
<string tools:ignore="UnusedResources,TypographyDashes" name="com.crashlytics.android.build_id" translatable="false">309cddbb-0947-43f8-a1cf-d509bd411c3e</string>
|
||||
</resources>
|
||||
@@ -1,4 +0,0 @@
|
||||
<resources>
|
||||
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">LXBkfEO3V7hf7cshbVSbCQ__26d-4ktVoINcb</string>
|
||||
<string name="app_name">devhub</string>
|
||||
</resources>
|
||||
@@ -1,8 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -1,39 +0,0 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
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
|
||||
classpath 'com.google.gms:google-services:3.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
afterEvaluate {project ->
|
||||
if (project.hasProperty("android")) {
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "26.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
url "$rootDir/../node_modules/react-native/android"
|
||||
}
|
||||
maven { url 'https://maven.google.com' }
|
||||
google()
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
|
||||
android.useDeprecatedNdk=true
|
||||
BIN
android/gradle/wrapper/gradle-wrapper.jar
vendored
@@ -1,6 +0,0 @@
|
||||
#Wed Oct 25 20:59:21 BRST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
164
android/gradlew
vendored
@@ -1,164 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# 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
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# 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\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
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" ] ; 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, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# 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=$((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
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
90
android/gradlew.bat
vendored
@@ -1,90 +0,0 @@
|
||||
@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
|
||||
|
||||
@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=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@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 Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_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=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
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
|
||||
@@ -1,8 +0,0 @@
|
||||
keystore(
|
||||
name = 'debug',
|
||||
store = 'debug.keystore',
|
||||
properties = 'debug.keystore.properties',
|
||||
visibility = [
|
||||
'PUBLIC',
|
||||
],
|
||||
)
|
||||
@@ -1,4 +0,0 @@
|
||||
key.store=debug.keystore
|
||||
key.alias=androiddebugkey
|
||||
key.store.password=android
|
||||
key.alias.password=android
|
||||
@@ -1,15 +0,0 @@
|
||||
rootProject.name = 'devhub'
|
||||
include ':react-native-firebase'
|
||||
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
|
||||
include ':react-native-code-push'
|
||||
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
|
||||
include ':react-native-vector-icons'
|
||||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
|
||||
include ':react-native-prompt-android'
|
||||
project(':react-native-prompt-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-prompt-android/android')
|
||||
include ':react-native-linear-gradient'
|
||||
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
|
||||
include ':bugsnag-react-native'
|
||||
project(':bugsnag-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/bugsnag-react-native/android')
|
||||
|
||||
include ':app'
|
||||
BIN
assets/logo.png
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
assets/logo.psd
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 21 KiB |
15
index.js
@@ -1,15 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import codePush from 'react-native-code-push'
|
||||
import { AppRegistry } from 'react-native'
|
||||
|
||||
import { name as appName } from './package.json'
|
||||
|
||||
import App from './src/'
|
||||
|
||||
const codePushOptions = {
|
||||
checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
|
||||
installMode: codePush.InstallMode.IMMEDIATE,
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent(appName, () => codePush(codePushOptions)(App))
|
||||
18
index.web.js
@@ -1,18 +0,0 @@
|
||||
/* eslint-env browser */
|
||||
|
||||
import 'babel-polyfill'
|
||||
import { AppRegistry } from 'react-native'
|
||||
|
||||
import './web/src/index.css'
|
||||
import './web/src/reset.css'
|
||||
|
||||
import App from './src/'
|
||||
// import registerServiceWorker from './web/src/registerServiceWorker'
|
||||
import { name as appName } from './package.json'
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App)
|
||||
AppRegistry.runApplication(appName, {
|
||||
rootTag: document.getElementById('root'),
|
||||
})
|
||||
|
||||
// registerServiceWorker()
|
||||
@@ -1,8 +0,0 @@
|
||||
platform :ios, '9.0'
|
||||
|
||||
target 'devhub' do
|
||||
pod 'Firebase/Auth'
|
||||
pod 'Firebase/Core'
|
||||
pod 'Firebase/Database'
|
||||
pod 'Firebase/Performance'
|
||||
end
|
||||
@@ -1,80 +0,0 @@
|
||||
PODS:
|
||||
- Firebase/Auth (4.6.0):
|
||||
- Firebase/Core
|
||||
- FirebaseAuth (= 4.3.2)
|
||||
- Firebase/Core (4.6.0):
|
||||
- FirebaseAnalytics (= 4.0.5)
|
||||
- FirebaseCore (= 4.0.11)
|
||||
- Firebase/Database (4.6.0):
|
||||
- Firebase/Core
|
||||
- FirebaseDatabase (= 4.1.1)
|
||||
- Firebase/Performance (4.6.0):
|
||||
- Firebase/Core
|
||||
- FirebasePerformance (= 1.0.6)
|
||||
- FirebaseAnalytics (4.0.5):
|
||||
- FirebaseCore (~> 4.0)
|
||||
- FirebaseInstanceID (~> 2.0)
|
||||
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
|
||||
- nanopb (~> 0.3)
|
||||
- FirebaseAuth (4.3.2):
|
||||
- FirebaseAnalytics (~> 4.0)
|
||||
- GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
|
||||
- GTMSessionFetcher/Core (~> 1.1)
|
||||
- FirebaseCore (4.0.11):
|
||||
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
|
||||
- FirebaseDatabase (4.1.1):
|
||||
- FirebaseAnalytics (~> 4.0)
|
||||
- FirebaseCore (~> 4.0)
|
||||
- leveldb-library (~> 1.18)
|
||||
- FirebaseInstanceID (2.0.6)
|
||||
- FirebasePerformance (1.0.6):
|
||||
- FirebaseAnalytics (~> 4.0)
|
||||
- FirebaseInstanceID (~> 2.0)
|
||||
- GoogleToolboxForMac/Logger (~> 2.1)
|
||||
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
|
||||
- GTMSessionFetcher/Core (~> 1.1)
|
||||
- Protobuf (~> 3.1)
|
||||
- GoogleToolboxForMac/DebugUtils (2.1.3):
|
||||
- GoogleToolboxForMac/Defines (= 2.1.3)
|
||||
- GoogleToolboxForMac/Defines (2.1.3)
|
||||
- GoogleToolboxForMac/Logger (2.1.3):
|
||||
- GoogleToolboxForMac/Defines (= 2.1.3)
|
||||
- GoogleToolboxForMac/NSData+zlib (2.1.3):
|
||||
- GoogleToolboxForMac/Defines (= 2.1.3)
|
||||
- GoogleToolboxForMac/NSDictionary+URLArguments (2.1.3):
|
||||
- GoogleToolboxForMac/DebugUtils (= 2.1.3)
|
||||
- GoogleToolboxForMac/Defines (= 2.1.3)
|
||||
- GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
|
||||
- GoogleToolboxForMac/NSString+URLArguments (2.1.3)
|
||||
- GTMSessionFetcher/Core (1.1.12)
|
||||
- leveldb-library (1.20)
|
||||
- nanopb (0.3.8):
|
||||
- nanopb/decode (= 0.3.8)
|
||||
- nanopb/encode (= 0.3.8)
|
||||
- nanopb/decode (0.3.8)
|
||||
- nanopb/encode (0.3.8)
|
||||
- Protobuf (3.5.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Firebase/Auth
|
||||
- Firebase/Core
|
||||
- Firebase/Database
|
||||
- Firebase/Performance
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Firebase: 27321a925aa85520618255a7c630859e0502ccbd
|
||||
FirebaseAnalytics: 5b02a63ead2c3f0259cfc7f15e053e440587ecf8
|
||||
FirebaseAuth: e58563adb207a43910a2ed87fecb9fa7d556df5a
|
||||
FirebaseCore: 2a946ece8fbe3ce1fdeeb55324f273caade22df9
|
||||
FirebaseDatabase: 2e6e8e110b93b9a6e7aac71774c769a363035cb1
|
||||
FirebaseInstanceID: 24958382a1011bba5aaff37e334e7a650b9118f5
|
||||
FirebasePerformance: fa032c27e229eb8c1a8638918793fe2e47465205
|
||||
GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
|
||||
GTMSessionFetcher: ebaa1f79a5366922c1735f1566901f50beba23b7
|
||||
leveldb-library: 4f9eedf84ab46b4fa3b7893bf30714b2a1a74022
|
||||
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
|
||||
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
|
||||
|
||||
PODFILE CHECKSUM: de5a8b56a80f3b33b0171e76066e1dff90fdae29
|
||||
|
||||
COCOAPODS: 1.3.1
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.brunolemos.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
|
||||
<dict>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.brunolemos.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React-tvOS"
|
||||
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||
BuildableName = "devhub-tvOS.app"
|
||||
BlueprintName = "devhub-tvOS"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
||||
BuildableName = "devhub-tvOSTests.xctest"
|
||||
BlueprintName = "devhub-tvOSTests"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
||||
BuildableName = "devhub-tvOSTests.xctest"
|
||||
BlueprintName = "devhub-tvOSTests"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||
BuildableName = "devhub-tvOS.app"
|
||||
BlueprintName = "devhub-tvOS"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||
BuildableName = "devhub-tvOS.app"
|
||||
BlueprintName = "devhub-tvOS"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||
BuildableName = "devhub-tvOS.app"
|
||||
BlueprintName = "devhub-tvOS"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0620"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React"
|
||||
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "devhub.app"
|
||||
BlueprintName = "devhub"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||
BuildableName = "devhubTests.xctest"
|
||||
BlueprintName = "devhubTests"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||
BuildableName = "devhubTests.xctest"
|
||||
BlueprintName = "devhubTests"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "devhub.app"
|
||||
BlueprintName = "devhub"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "devhub.app"
|
||||
BlueprintName = "devhub"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "devhub.app"
|
||||
BlueprintName = "devhub"
|
||||
ReferencedContainer = "container:devhub.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
10
ios/devhub.xcworkspace/contents.xcworkspacedata
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:devhub.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIWindow *window;
|
||||
|
||||
@end
|
||||
@@ -1,56 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import <CodePush/CodePush.h>
|
||||
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
#import <React/RCTRootView.h>
|
||||
#import <React/RCTLinkingManager.h>
|
||||
|
||||
@import Firebase;
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
[FIRApp configure];
|
||||
|
||||
NSURL *jsCodeLocation;
|
||||
|
||||
#ifdef DEBUG
|
||||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||
#else
|
||||
jsCodeLocation = [CodePush bundleURL];
|
||||
#endif
|
||||
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
||||
moduleName:@"devhub"
|
||||
initialProperties:nil
|
||||
launchOptions:launchOptions];
|
||||
|
||||
// hex to uicolor: http://uicolor.xyz/
|
||||
rootView.backgroundColor = [UIColor colorWithRed:0.29 green:0.83 blue:0.71 alpha:1.0];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
UIViewController *rootViewController = [UIViewController new];
|
||||
rootViewController.view = rootView;
|
||||
self.window.rootViewController = rootViewController;
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
||||
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||
{
|
||||
return [RCTLinkingManager application:application openURL:url
|
||||
sourceApplication:sourceApplication annotation:annotation];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D12b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="21Z-xA-lgJ">
|
||||
<rect key="frame" x="180" y="180" width="120" height="120"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="120" id="0Yo-Up-a9f"/>
|
||||
<constraint firstAttribute="height" constant="120" id="Hd5-Rv-Xao"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.28627450980392155" green="0.82745098039215681" blue="0.70588235294117641" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="21Z-xA-lgJ" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Hdf-lH-3rJ"/>
|
||||
<constraint firstItem="21Z-xA-lgJ" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="P4B-Rq-6Cl"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="logo" width="300" height="300"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
|
||||
<string>ca-app-pub-3940256099942544/2934735716</string>
|
||||
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
|
||||
<string>ca-app-pub-3940256099942544/4411468910</string>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>589579854600-nd8bv6fcdjvfg0ke6j4cu44brnqdhs55.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.589579854600-nd8bv6fcdjvfg0ke6j4cu44brnqdhs55</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyCnx-9QEsBb1Hu7VhW8nTtbMN7B-CLML4Q</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>589579854600</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>org.brunolemos.devhub</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>devhub-65899</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>devhub-65899.appspot.com</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<true/>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false/>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<false/>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true/>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true/>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:589579854600:ios:9e47b631a5be6ed3</string>
|
||||
<key>DATABASE_URL</key>
|
||||
<string>https://devhub-65899.firebaseio.com</string>
|
||||
<key>CodePushDeploymentKey</key>
|
||||
<string>deployment-key-here</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,181 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-57x57@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-57x57@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "50x50",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-Small-50x50@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "50x50",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-Small-50x50@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "72x72",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-72x72@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "72x72",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-72x72@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 45 KiB |
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "logo.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
ios/devhub/Images.xcassets/logo.imageset/logo.png
vendored
|
Before Width: | Height: | Size: 9.9 KiB |
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>DevHub</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>devhub</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.9.4</string>
|
||||
<key>CodePushDeploymentKey</key>
|
||||
<string>LXBkfEO3V7hf7cshbVSbCQ__26d-4ktVoINcb</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Octicons.ttf</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import <React/RCTLog.h>
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
#define TIMEOUT_SECONDS 600
|
||||
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
|
||||
|
||||
@interface devhubTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation devhubTests
|
||||
|
||||
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
||||
{
|
||||
if (test(view)) {
|
||||
return YES;
|
||||
}
|
||||
for (UIView *subview in [view subviews]) {
|
||||
if ([self findSubviewInView:subview matching:test]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)testRendersWelcomeScreen
|
||||
{
|
||||
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
||||
BOOL foundElement = NO;
|
||||
|
||||
__block NSString *redboxError = nil;
|
||||
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
||||
if (level >= RCTLogLevelError) {
|
||||
redboxError = message;
|
||||
}
|
||||
});
|
||||
|
||||
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
||||
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
||||
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
||||
|
||||
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
|
||||
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}];
|
||||
}
|
||||
|
||||
RCTSetLogFunction(RCTDefaultLogFunction);
|
||||
|
||||
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
|
||||
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,7 +0,0 @@
|
||||
jest.mock('Linking', () => ({
|
||||
addEventListener: jest.fn(),
|
||||
removeEventListener: jest.fn(),
|
||||
openURL: jest.fn(),
|
||||
canOpenURL: jest.fn(),
|
||||
getInitialURL: jest.fn(),
|
||||
}))
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"exclude": [
|
||||
"android",
|
||||
"ios",
|
||||
"node_modules",
|
||||
"web"
|
||||
]
|
||||
}
|
||||
116
package.json
@@ -1,116 +0,0 @@
|
||||
{
|
||||
"name": "devhub",
|
||||
"displayName": "DevHub",
|
||||
"version": "0.9.5",
|
||||
"codeBundleId": "0.9.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"flow": "flow '{.,src/**,web/{config,scripts,src}/**,jest/**}/*.js'",
|
||||
"format": "npm run format_options -- --write '{.,src/**,web/{config,scripts,src}/**,jest/**}/*.js'",
|
||||
"format_options": "prettier --no-semi --trailing-comma all --single-quote",
|
||||
"lint": "eslint '{.,src/**,web/{config,scripts,src},jest/**}/*.js'",
|
||||
"lint-fix": "npm run lint -- --fix",
|
||||
"postinstall": "remotedev-debugger --hostname localhost --port 8805 --injectdebugger --injectserver",
|
||||
"precommit": "lint-staged",
|
||||
"prepare": "patch-package",
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"studio": "open -a /Applications/Android\\ Studio.app ./android/",
|
||||
"test": "jest --verbose",
|
||||
"web": "npm run web:start",
|
||||
"web:build": "pushd web; npm run build; popd;",
|
||||
"web:build:serve": "pushd web; npm run serve; popd;",
|
||||
"web:deploy": "pushd web; npm run deploy; popd;",
|
||||
"web:start": "pushd web; npm run start; popd;",
|
||||
"web:test": "pushd web; npm run test; popd;",
|
||||
"xcode": "open ios/devhub.xcworkspace"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"bugsnag-react-native": "^2.9.2",
|
||||
"denormalizr": "^0.6.0",
|
||||
"github": "git+https://github.com/brunolemos/react-native-github-api.git",
|
||||
"gravatar": "^1.6.0",
|
||||
"immutable": "^3.8.2",
|
||||
"lodash": "^4.17.5",
|
||||
"moment": "^2.21.0",
|
||||
"normalizr": "^3.2.4",
|
||||
"prop-types": "^15.6.1",
|
||||
"qs": "^6.5.1",
|
||||
"react": "^16.2.0",
|
||||
"react-native": "^0.54.2",
|
||||
"react-native-code-push": "^5.3.2",
|
||||
"react-native-firebase": "^3.3.1",
|
||||
"react-native-immutable-list-view": "^0.7.2",
|
||||
"react-native-linear-gradient": "^2.4.0",
|
||||
"react-native-prompt-android": "^0.3.3",
|
||||
"react-native-safari-view": "^2.1.0",
|
||||
"react-native-vector-icons": "4.4.2",
|
||||
"react-native-wkwebview-reborn": "^1.16.0",
|
||||
"react-navigation": "1.0.0-beta.21",
|
||||
"react-redux": "^5.0.7",
|
||||
"redux": "^3.7.2",
|
||||
"redux-immutable": "^4.0.0",
|
||||
"redux-persist": "4.10.2",
|
||||
"redux-persist-immutable": "^4.3.1",
|
||||
"redux-saga": "^0.16.0",
|
||||
"remote-redux-devtools": "^0.5.12",
|
||||
"reselect": "^3.0.1",
|
||||
"styled-components": "^3.2.3",
|
||||
"warna": "^0.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^8.2.2",
|
||||
"babel-jest": "^22.4.1",
|
||||
"babel-plugin-transform-es2015-parameters": "^6.24.1",
|
||||
"babel-plugin-transform-remove-console": "^6.9.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react-native": "^4.0.0",
|
||||
"babel-preset-react-native-stage-0": "^1.0.1",
|
||||
"eslint": "^4.18.2",
|
||||
"eslint-config-airbnb": "^16.1.0",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-config-react-app": "^2.1.0",
|
||||
"eslint-plugin-babel": "^4.1.2",
|
||||
"eslint-plugin-flowtype": "^2.46.1",
|
||||
"eslint-plugin-import": "^2.9.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.3",
|
||||
"eslint-plugin-prettier": "^2.6.0",
|
||||
"eslint-plugin-react": "^7.7.0",
|
||||
"eslint-plugin-react-native": "^3.2.1",
|
||||
"flow-bin": "^0.68.0",
|
||||
"husky": "^0.14.3",
|
||||
"jest": "^22.4.2",
|
||||
"lint-staged": "^7.0.0",
|
||||
"patch-package": "^5.1.1",
|
||||
"prettier": "^1.11.1",
|
||||
"react-test-renderer": "^16.2.0",
|
||||
"remote-redux-devtools-on-debugger": "^0.8.3",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native",
|
||||
"moduleFileExtensions": [
|
||||
"js"
|
||||
],
|
||||
"moduleDirectories": [
|
||||
"node_modules",
|
||||
"web/node_modules"
|
||||
],
|
||||
"setupFiles": [
|
||||
"./jest/setup.js"
|
||||
],
|
||||
"testRegex": "(src/|web/(config|scripts|src)/|jest/|).*\\.test\\.js$",
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!react*)/",
|
||||
"web/node_modules/(?!react*)/"
|
||||
]
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"npm run format_options -- --write",
|
||||
"eslint --fix",
|
||||
"git add",
|
||||
"jest --bail --findRelatedTests"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
|
||||
import {
|
||||
LOGIN_REQUEST,
|
||||
LOGIN_SUCCESS,
|
||||
LOGIN_FAILURE,
|
||||
LOGOUT,
|
||||
UPDATE_CURRENT_USER,
|
||||
} from '../utils/constants/actions'
|
||||
|
||||
import { action, errorAction } from '../utils/helpers/actions'
|
||||
import type { LoginRequestPayload, LoginResponsePayload } from '../utils/types'
|
||||
|
||||
export const loginRequest = (params: LoginRequestPayload, other?: Object) =>
|
||||
action(LOGIN_REQUEST, params, other)
|
||||
|
||||
export const loginSuccess = (
|
||||
request: LoginRequestPayload,
|
||||
data: Object,
|
||||
other?: Object,
|
||||
) => action(LOGIN_SUCCESS, ({ request, data }: LoginResponsePayload), other)
|
||||
|
||||
export const loginFailure = (
|
||||
request: LoginRequestPayload,
|
||||
error: any,
|
||||
other?: Object,
|
||||
) => errorAction(LOGIN_FAILURE, { request }, error, other)
|
||||
|
||||
export const logout = (other?: Object) => action(LOGOUT, null, other)
|
||||
|
||||
export const updateCurrentUser = (user: Object, other?: Object) =>
|
||||
action(UPDATE_CURRENT_USER, user, other)
|
||||
@@ -1,65 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
|
||||
import { List } from 'immutable'
|
||||
|
||||
import { requestTypes } from '../api/github'
|
||||
import { loadSubscriptionDataRequest } from './subscriptions'
|
||||
|
||||
import {
|
||||
ARCHIVE_EVENTS,
|
||||
DELETE_EVENTS,
|
||||
MARK_EVENTS_AS_READ,
|
||||
MARK_EVENTS_AS_UNREAD,
|
||||
} from '../utils/constants/actions'
|
||||
|
||||
import { action } from '../utils/helpers/actions'
|
||||
|
||||
export const loadUserReceivedEvents = (username: string, other?: Object) =>
|
||||
loadSubscriptionDataRequest(
|
||||
requestTypes.USER_RECEIVED_EVENTS,
|
||||
{ username },
|
||||
other,
|
||||
)
|
||||
|
||||
export const loadUserEvents = (username: string, other?: Object) =>
|
||||
loadSubscriptionDataRequest(requestTypes.USER_EVENTS, { username }, other)
|
||||
|
||||
export const loadUserOrgEvents = (
|
||||
username: string,
|
||||
org: string,
|
||||
other?: Object,
|
||||
) =>
|
||||
loadSubscriptionDataRequest(
|
||||
requestTypes.USER_ORG_EVENTS,
|
||||
{ username, org },
|
||||
other,
|
||||
)
|
||||
|
||||
export const loadRepoEvents = (owner: string, repo: string, other?: Object) =>
|
||||
loadSubscriptionDataRequest(requestTypes.REPO_EVENTS, { owner, repo }, other)
|
||||
|
||||
export const loadOrgEvents = (org: string, other?: Object) =>
|
||||
loadSubscriptionDataRequest(requestTypes.ORG_PUBLIC_EVENTS, { org }, other)
|
||||
|
||||
export type ReadEvents = { columnId: string, eventIds: Array<string> }
|
||||
export const archiveEvents = (
|
||||
{ columnId, eventIds }: ReadEvents,
|
||||
other?: Object,
|
||||
) => action(ARCHIVE_EVENTS, { columnId, eventIds: List(eventIds) }, other)
|
||||
|
||||
export const deleteEvents = (
|
||||
{ columnId, eventIds }: ReadEvents,
|
||||
other?: Object,
|
||||
) => action(DELETE_EVENTS, { columnId, eventIds: List(eventIds) }, other)
|
||||
|
||||
export const markEventsAsRead = (
|
||||
{ columnId, eventIds }: ReadEvents,
|
||||
other?: Object,
|
||||
) => action(MARK_EVENTS_AS_READ, { columnId, eventIds: List(eventIds) }, other)
|
||||
|
||||
export const markEventsAsUnread = (
|
||||
{ columnId, eventIds }: ReadEvents,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(MARK_EVENTS_AS_UNREAD, { columnId, eventIds: List(eventIds) }, other)
|
||||
@@ -1,82 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
|
||||
import {
|
||||
APP_CLEANUP,
|
||||
APP_READY,
|
||||
CREATE_COLUMN,
|
||||
DELETE_COLUMN,
|
||||
FIREBASE_AUTH_STATE_CHANGED,
|
||||
FIREBASE_RECEIVED_EVENT,
|
||||
RESET_APP_DATA,
|
||||
RESET_APP_DATA_REQUEST,
|
||||
RESET_ACCOUNT_DATA,
|
||||
RESET_ACCOUNT_DATA_REQUEST,
|
||||
SET_THEME,
|
||||
STAR_REPO,
|
||||
UNSTAR_REPO,
|
||||
} from '../utils/constants/actions'
|
||||
|
||||
import { action } from '../utils/helpers/actions'
|
||||
|
||||
import type { Column, Theme } from '../utils/types'
|
||||
|
||||
export * from './auth'
|
||||
export * from './events'
|
||||
export * from './notifications'
|
||||
export * from './subscriptions'
|
||||
|
||||
export const cleanupApp = (other?: Object) =>
|
||||
action(APP_CLEANUP, undefined, other)
|
||||
|
||||
export const appReady = (other?: Object) => action(APP_READY, undefined, other)
|
||||
|
||||
export const resetAccountData = (other?: Object) =>
|
||||
action(RESET_ACCOUNT_DATA, undefined, other)
|
||||
|
||||
export const resetAccountDataRequest = (other?: Object) =>
|
||||
action(RESET_ACCOUNT_DATA_REQUEST, undefined, other)
|
||||
|
||||
export const resetAppData = (other?: Object) =>
|
||||
action(RESET_APP_DATA, undefined, other)
|
||||
|
||||
export const resetAppDataRequest = (other?: Object) =>
|
||||
action(RESET_APP_DATA_REQUEST, undefined, other)
|
||||
|
||||
// COLUMN
|
||||
type CreateColumnParams = { title: string, subscriptionIds: Array<string> }
|
||||
export const createColumn = (
|
||||
{ order, subscriptionIds, title }: CreateColumnParams,
|
||||
other?: Object,
|
||||
) => action(CREATE_COLUMN, ({ order, subscriptionIds, title }: Column), other)
|
||||
|
||||
export const deleteColumn = (id: string, other?: Object) =>
|
||||
action(DELETE_COLUMN, ({ id }: Column), other)
|
||||
|
||||
// THEME
|
||||
|
||||
export const setTheme = (theme: Theme, other?: Object) =>
|
||||
action(SET_THEME, theme, other)
|
||||
|
||||
// STAR
|
||||
|
||||
export const starRepo = ({ repoId, repoFullName }, other?: Object) =>
|
||||
action(STAR_REPO, { repoId: `${repoId}`, repoFullName }, other)
|
||||
|
||||
export const unstarRepo = ({ repoId, repoFullName }, other?: Object) =>
|
||||
action(UNSTAR_REPO, { repoId: `${repoId}`, repoFullName }, other)
|
||||
|
||||
// FIREBASE
|
||||
|
||||
export const firebaseAuthStateChanged = (user, other?: Object) =>
|
||||
action(FIREBASE_AUTH_STATE_CHANGED, { user }, other)
|
||||
|
||||
export const firebaseReceivedEvent = (
|
||||
{ eventName, firebasePathArr, statePathArr, value },
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
FIREBASE_RECEIVED_EVENT,
|
||||
{ eventName, firebasePathArr, statePathArr, value },
|
||||
other,
|
||||
)
|
||||
@@ -1,130 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
|
||||
import moment from 'moment'
|
||||
|
||||
import {
|
||||
ARCHIVE_NOTIFICATIONS,
|
||||
DELETE_NOTIFICATIONS,
|
||||
LOAD_NOTIFICATIONS_REQUEST,
|
||||
LOAD_NOTIFICATIONS_SUCCESS,
|
||||
LOAD_NOTIFICATIONS_FAILURE,
|
||||
MARK_NOTIFICATIONS_AS_READ_REQUEST,
|
||||
MARK_NOTIFICATIONS_AS_READ_FAILURE,
|
||||
MARK_NOTIFICATIONS_AS_READ_SUCCESS,
|
||||
MARK_NOTIFICATIONS_AS_UNREAD,
|
||||
UPDATE_NOTIFICATIONS,
|
||||
} from '../utils/constants/actions'
|
||||
|
||||
import { requestTypes } from '../api/github'
|
||||
import { action, errorAction } from '../utils/helpers/actions'
|
||||
import type {
|
||||
ApiRequestPayload,
|
||||
ApiResponsePayload,
|
||||
NotificationsOptions,
|
||||
} from '../utils/types'
|
||||
|
||||
export const loadNotificationsRequest = (
|
||||
params: NotificationsOptions,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
LOAD_NOTIFICATIONS_REQUEST,
|
||||
({
|
||||
params: params || {},
|
||||
requestType: requestTypes.NOTIFICATIONS,
|
||||
}: ApiRequestPayload),
|
||||
other,
|
||||
)
|
||||
|
||||
export const updateNotifications = (params?: Object, other?: Object) =>
|
||||
action(UPDATE_NOTIFICATIONS, { params: params || undefined }, other)
|
||||
|
||||
export const loadNotificationsSuccess = (
|
||||
request: ApiRequestPayload,
|
||||
data: Object,
|
||||
meta: Object,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
LOAD_NOTIFICATIONS_SUCCESS,
|
||||
({ request, data, meta }: ApiResponsePayload),
|
||||
other,
|
||||
)
|
||||
|
||||
export const loadNotificationsFailure = (
|
||||
request: ApiRequestPayload,
|
||||
error: any,
|
||||
other?: Object,
|
||||
) => errorAction(LOAD_NOTIFICATIONS_FAILURE, { request }, error, other)
|
||||
|
||||
type NotificationIdsParams = { notificationIds: Array<string> }
|
||||
export const archiveNotifications = (
|
||||
{ notificationIds }: NotificationIdsParams,
|
||||
other?: Object,
|
||||
) => action(ARCHIVE_NOTIFICATIONS, { notificationIds }, other)
|
||||
|
||||
export const deleteNotifications = (
|
||||
{ notificationIds }: NotificationIdsParams,
|
||||
other?: Object,
|
||||
) => action(DELETE_NOTIFICATIONS, { notificationIds }, other)
|
||||
|
||||
export type MarkNotificationsParams = {
|
||||
notificationIds: Array<string>,
|
||||
all?: boolean,
|
||||
repoId?: string,
|
||||
}
|
||||
|
||||
export const markNotificationsAsReadRequest = (
|
||||
{
|
||||
all,
|
||||
lastReadAt = moment().toISOString(),
|
||||
notificationIds,
|
||||
repoId,
|
||||
}: MarkNotificationsParams,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
MARK_NOTIFICATIONS_AS_READ_REQUEST,
|
||||
{ all, lastReadAt, notificationIds, repoId },
|
||||
other,
|
||||
)
|
||||
|
||||
export const markNotificationsAsReadFailure = (
|
||||
{ notificationIds }: MarkNotificationsParams,
|
||||
error: any,
|
||||
other?: Object,
|
||||
) =>
|
||||
errorAction(
|
||||
MARK_NOTIFICATIONS_AS_READ_FAILURE,
|
||||
{ notificationIds },
|
||||
error,
|
||||
other,
|
||||
)
|
||||
|
||||
export const markNotificationsAsReadSuccess = (
|
||||
{ notificationIds }: MarkNotificationsParams,
|
||||
data: Object,
|
||||
meta: Object,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
MARK_NOTIFICATIONS_AS_READ_SUCCESS,
|
||||
{ data, meta, notificationIds },
|
||||
other,
|
||||
)
|
||||
|
||||
export const markNotificationsAsUnread = (
|
||||
{
|
||||
all,
|
||||
lastUnreadAt = moment().toISOString(),
|
||||
notificationIds,
|
||||
repoId,
|
||||
}: MarkNotificationsParams,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
MARK_NOTIFICATIONS_AS_UNREAD,
|
||||
{ all, lastUnreadAt, notificationIds, repoId },
|
||||
other,
|
||||
)
|
||||
@@ -1,78 +0,0 @@
|
||||
// @flow
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
|
||||
import {
|
||||
UPDATE_ALL_COLUMNS_SUBSCRIPTIONS,
|
||||
UPDATE_COLUMN_SUBSCRIPTIONS,
|
||||
CREATE_SUBSCRIPTION,
|
||||
DELETE_SUBSCRIPTION,
|
||||
LOAD_SUBSCRIPTION_DATA_REQUEST,
|
||||
LOAD_SUBSCRIPTION_DATA_SUCCESS,
|
||||
LOAD_SUBSCRIPTION_DATA_FAILURE,
|
||||
} from '../utils/constants/actions'
|
||||
|
||||
import { ApiRequestType } from '../api/github'
|
||||
import { generateSubscriptionId } from '../reducers/entities/subscriptions'
|
||||
import { action, errorAction } from '../utils/helpers/actions'
|
||||
import type {
|
||||
ApiRequestPayload,
|
||||
ApiResponsePayload,
|
||||
Subscription,
|
||||
} from '../utils/types'
|
||||
|
||||
export const createSubscription = (
|
||||
id: string,
|
||||
requestType: ApiRequestType,
|
||||
params: Object,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
CREATE_SUBSCRIPTION,
|
||||
({ id, requestType, params }: Subscription),
|
||||
other,
|
||||
)
|
||||
|
||||
export const deleteSubscription = (id: string, other?: Object) =>
|
||||
action(DELETE_SUBSCRIPTION, ({ id }: Subscription), other)
|
||||
|
||||
export const updateAllColumnsSubscriptions = (other?: Object) =>
|
||||
action(UPDATE_ALL_COLUMNS_SUBSCRIPTIONS, undefined, other)
|
||||
|
||||
export const updateColumnSubscriptions = (columnId: string, other?: Object) =>
|
||||
action(UPDATE_COLUMN_SUBSCRIPTIONS, ({ columnId }: Subscription), other)
|
||||
|
||||
export const loadSubscriptionDataRequest = (
|
||||
requestType: ApiRequestType,
|
||||
params: Object,
|
||||
other?: Object,
|
||||
) => {
|
||||
const subscriptionId = generateSubscriptionId(requestType, params)
|
||||
|
||||
return action(
|
||||
LOAD_SUBSCRIPTION_DATA_REQUEST,
|
||||
({
|
||||
params,
|
||||
requestType,
|
||||
subscriptionId,
|
||||
}: ApiRequestPayload),
|
||||
other,
|
||||
)
|
||||
}
|
||||
|
||||
export const loadSubscriptionDataSuccess = (
|
||||
request: ApiRequestPayload,
|
||||
data: Object,
|
||||
meta: Object,
|
||||
other?: Object,
|
||||
) =>
|
||||
action(
|
||||
LOAD_SUBSCRIPTION_DATA_SUCCESS,
|
||||
({ request, data, meta }: ApiResponsePayload),
|
||||
other,
|
||||
)
|
||||
|
||||
export const loadSubscriptionDataFailure = (
|
||||
request: ApiRequestPayload,
|
||||
error: any,
|
||||
other?: Object,
|
||||
) => errorAction(LOAD_SUBSCRIPTION_DATA_FAILURE, { request }, error, other)
|
||||
@@ -1,220 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import GitHubAPI from 'github'
|
||||
|
||||
import { name as appName } from '../../package.json'
|
||||
|
||||
const PUBLIC_EVENTS: 'PUBLIC_EVENTS' = 'PUBLIC_EVENTS'
|
||||
const REPO_EVENTS: 'REPO_EVENTS' = 'REPO_EVENTS'
|
||||
const REPO_ISSUE_EVENTS: 'REPO_ISSUE_EVENTS' = 'REPO_ISSUE_EVENTS'
|
||||
const REPO_NETWORK_PUBLIC_EVENTS: 'REPO_NETWORK_PUBLIC_EVENTS' =
|
||||
'REPO_NETWORK_PUBLIC_EVENTS'
|
||||
const ORG_PUBLIC_EVENTS: 'ORG_PUBLIC_EVENTS' = 'ORG_PUBLIC_EVENTS'
|
||||
const USER_RECEIVED_EVENTS: 'USER_RECEIVED_EVENTS' = 'USER_RECEIVED_EVENTS'
|
||||
const USER_RECEIVED_PUBLIC_EVENTS: 'USER_RECEIVED_PUBLIC_EVENTS' =
|
||||
'USER_RECEIVED_PUBLIC_EVENTS'
|
||||
const USER_EVENTS: 'USER_EVENTS' = 'USER_EVENTS'
|
||||
const USER_PUBLIC_EVENTS: 'USER_PUBLIC_EVENTS' = 'USER_PUBLIC_EVENTS'
|
||||
const USER_ORG_EVENTS: 'USER_ORG_EVENTS' = 'USER_ORG_EVENTS'
|
||||
const NOTIFICATIONS: 'NOTIFICATIONS' = 'NOTIFICATIONS'
|
||||
const MARK_ALL_NOTIFICATIONS_AS_READ: 'MARK_ALL_NOTIFICATIONS_AS_READ' =
|
||||
'MARK_ALL_NOTIFICATIONS_AS_READ'
|
||||
const MARK_NOTIFICATION_THREAD_AS_READ: 'MARK_NOTIFICATION_THREAD_AS_READ' =
|
||||
'MARK_NOTIFICATION_THREAD_AS_READ'
|
||||
const MARK_ALL_NOTIFICATIONS_AS_READ_FOR_REPO: 'MARK_ALL_NOTIFICATIONS_AS_READ_FOR_REPO' =
|
||||
'MARK_ALL_NOTIFICATIONS_AS_READ_FOR_REPO'
|
||||
|
||||
const github = new GitHubAPI({
|
||||
agent: appName,
|
||||
// debug: process.env.NODE_ENV !== 'production',
|
||||
})
|
||||
|
||||
export const requestTypes = {
|
||||
PUBLIC_EVENTS,
|
||||
REPO_EVENTS,
|
||||
REPO_ISSUE_EVENTS,
|
||||
REPO_NETWORK_PUBLIC_EVENTS,
|
||||
ORG_PUBLIC_EVENTS,
|
||||
USER_RECEIVED_EVENTS,
|
||||
USER_RECEIVED_PUBLIC_EVENTS,
|
||||
USER_EVENTS,
|
||||
USER_PUBLIC_EVENTS,
|
||||
USER_ORG_EVENTS,
|
||||
NOTIFICATIONS,
|
||||
MARK_ALL_NOTIFICATIONS_AS_READ,
|
||||
MARK_NOTIFICATION_THREAD_AS_READ,
|
||||
MARK_ALL_NOTIFICATIONS_AS_READ_FOR_REPO,
|
||||
}
|
||||
|
||||
export type ApiRequestType =
|
||||
| typeof PUBLIC_EVENTS
|
||||
| typeof REPO_EVENTS
|
||||
| typeof REPO_ISSUE_EVENTS
|
||||
| typeof REPO_NETWORK_PUBLIC_EVENTS
|
||||
| typeof ORG_PUBLIC_EVENTS
|
||||
| typeof USER_RECEIVED_EVENTS
|
||||
| typeof USER_RECEIVED_PUBLIC_EVENTS
|
||||
| typeof USER_EVENTS
|
||||
| typeof USER_PUBLIC_EVENTS
|
||||
| typeof USER_ORG_EVENTS
|
||||
| typeof NOTIFICATIONS
|
||||
| typeof MARK_ALL_NOTIFICATIONS_AS_READ
|
||||
| typeof MARK_NOTIFICATION_THREAD_AS_READ
|
||||
| typeof MARK_ALL_NOTIFICATIONS_AS_READ_FOR_REPO
|
||||
|
||||
export function authenticate(token: string) {
|
||||
try {
|
||||
if (!token) {
|
||||
github.authenticate(null)
|
||||
return false
|
||||
}
|
||||
|
||||
github.authenticate({
|
||||
type: 'oauth',
|
||||
token,
|
||||
})
|
||||
|
||||
return true
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export function getRequestTypeIcon(type: ApiRequestType) {
|
||||
switch (type) {
|
||||
case requestTypes.PUBLIC_EVENTS:
|
||||
return 'home'
|
||||
case requestTypes.REPO_EVENTS:
|
||||
return 'repo'
|
||||
case requestTypes.REPO_ISSUE_EVENTS:
|
||||
return 'issue-opened'
|
||||
case requestTypes.REPO_NETWORK_PUBLIC_EVENTS:
|
||||
return 'repo'
|
||||
case requestTypes.ORG_PUBLIC_EVENTS:
|
||||
return 'organization'
|
||||
case requestTypes.USER_RECEIVED_EVENTS:
|
||||
return 'home'
|
||||
case requestTypes.USER_RECEIVED_PUBLIC_EVENTS:
|
||||
return 'home'
|
||||
case requestTypes.USER_EVENTS:
|
||||
return 'person'
|
||||
case requestTypes.USER_PUBLIC_EVENTS:
|
||||
return 'person'
|
||||
case requestTypes.USER_ORG_EVENTS:
|
||||
return 'organization'
|
||||
default:
|
||||
if (__DEV__) console.error(`No api method configured for type '${type}'`)
|
||||
return 'mark-github'
|
||||
}
|
||||
}
|
||||
|
||||
export function getUniquePath(
|
||||
type: ApiRequestType,
|
||||
{ org, owner, repo, username }: Object = {},
|
||||
) {
|
||||
return (() => {
|
||||
switch (type) {
|
||||
case requestTypes.PUBLIC_EVENTS:
|
||||
return '/events'
|
||||
|
||||
case requestTypes.REPO_EVENTS:
|
||||
if (!(owner && repo)) throw new Error('Required params: owner, repo')
|
||||
return `/repos/${owner}/${repo}/events`
|
||||
|
||||
case requestTypes.REPO_ISSUE_EVENTS:
|
||||
if (!(owner && repo)) throw new Error('Required params: owner, repo')
|
||||
return `/repos/${owner}/${repo}/issues/events`
|
||||
|
||||
case requestTypes.REPO_NETWORK_PUBLIC_EVENTS:
|
||||
if (!(owner && repo)) throw new Error('Required params: owner, repo')
|
||||
return `/networks/${owner}/${repo}/events`
|
||||
|
||||
case requestTypes.ORG_PUBLIC_EVENTS:
|
||||
if (!org) throw new Error('Required params: org')
|
||||
return `/orgs/${org}/events`
|
||||
|
||||
case requestTypes.USER_RECEIVED_EVENTS:
|
||||
if (!username) throw new Error('Required params: username')
|
||||
return `/users/${username}/received_events`
|
||||
|
||||
case requestTypes.USER_RECEIVED_PUBLIC_EVENTS:
|
||||
if (!username) throw new Error('Required params: username')
|
||||
return `/users/${username}/received_events/public`
|
||||
|
||||
case requestTypes.USER_EVENTS:
|
||||
if (!username) throw new Error('Required params: username')
|
||||
return `/users/${username}/events`
|
||||
|
||||
case requestTypes.USER_PUBLIC_EVENTS:
|
||||
if (!username) throw new Error('Required params: username')
|
||||
return `/users/${username}/events/public`
|
||||
|
||||
case requestTypes.USER_ORG_EVENTS:
|
||||
if (!(username && org))
|
||||
throw new Error('Required params: username, org')
|
||||
return `/users/${username}/events/orgs/${org}`
|
||||
|
||||
case requestTypes.NOTIFICATIONS:
|
||||
return '/notifications'
|
||||
|
||||
default:
|
||||
throw new Error(`No path configured for type '${type}'`)
|
||||
}
|
||||
})().toLowerCase()
|
||||
}
|
||||
|
||||
export function getApiMethod(type: ApiRequestType) {
|
||||
switch (type) {
|
||||
case requestTypes.PUBLIC_EVENTS:
|
||||
return github.activity.getEvents
|
||||
|
||||
case requestTypes.REPO_EVENTS:
|
||||
return github.activity.getEventsForRepo
|
||||
|
||||
case requestTypes.REPO_ISSUE_EVENTS:
|
||||
return github.activity.getEventsForRepoIssues
|
||||
|
||||
case requestTypes.REPO_NETWORK_PUBLIC_EVENTS:
|
||||
return github.activity.getEventsForRepoNetwork
|
||||
|
||||
case requestTypes.ORG_PUBLIC_EVENTS:
|
||||
return github.activity.getEventsForOrg
|
||||
|
||||
case requestTypes.USER_RECEIVED_EVENTS:
|
||||
return github.activity.getEventsReceived
|
||||
|
||||
case requestTypes.USER_RECEIVED_PUBLIC_EVENTS:
|
||||
return github.activity.getEventsReceivedPublic
|
||||
|
||||
case requestTypes.USER_EVENTS:
|
||||
return github.activity.getEventsForUser
|
||||
|
||||
case requestTypes.USER_PUBLIC_EVENTS:
|
||||
return github.activity.getEventsForUserPublic
|
||||
|
||||
case requestTypes.USER_ORG_EVENTS:
|
||||
return github.activity.getEventsForUserOrg
|
||||
|
||||
case requestTypes.NOTIFICATIONS:
|
||||
return github.activity.getNotifications
|
||||
|
||||
case requestTypes.MARK_ALL_NOTIFICATIONS_AS_READ:
|
||||
return github.activity.markNotificationsAsRead
|
||||
|
||||
case requestTypes.MARK_NOTIFICATION_THREAD_AS_READ:
|
||||
return github.activity.markNotificationThreadAsRead
|
||||
|
||||
case requestTypes.MARK_ALL_NOTIFICATIONS_AS_READ_FOR_REPO:
|
||||
return github.activity.markNotificationsAsReadForRepo
|
||||
|
||||
default:
|
||||
throw new Error(`No api method configured for type '${type}'`)
|
||||
}
|
||||
}
|
||||
|
||||
export function fetch(type: ApiRequestType) {
|
||||
const method = getApiMethod(type)
|
||||
return method()
|
||||
}
|
||||
|
||||
export default github
|
||||
@@ -1,36 +0,0 @@
|
||||
import React from 'react'
|
||||
import { Platform } from 'react-native'
|
||||
import { withTheme } from 'styled-components/native'
|
||||
|
||||
import ActionSheet from '../libs/actionsheet'
|
||||
import { columnMargin } from './columns/_Column'
|
||||
|
||||
import { radius } from '../styles/variables'
|
||||
|
||||
const StyledActionSheet = withTheme(
|
||||
({ actionSheetRef, buttonContainerStyle, theme, ...props }) => (
|
||||
<ActionSheet
|
||||
ref={actionSheetRef}
|
||||
containerPadding={columnMargin}
|
||||
buttonContainerStyle={[
|
||||
{ backgroundColor: theme.base02 },
|
||||
buttonContainerStyle,
|
||||
]}
|
||||
buttonsContainerStyle={[
|
||||
{ backgroundColor: theme.base01 },
|
||||
buttonContainerStyle,
|
||||
]}
|
||||
radius={radius}
|
||||
tintColor={
|
||||
!theme.isDark && Platform.OS === 'ios' ? undefined : theme.base04
|
||||
}
|
||||
titleTextStyle={{ color: theme.brand }}
|
||||
subtitleText={{ color: theme.base05 }}
|
||||
{...props}
|
||||
/>
|
||||
),
|
||||
)
|
||||
|
||||
StyledActionSheet.propTypes = ActionSheet.propTypes
|
||||
|
||||
export default StyledActionSheet
|
||||
@@ -1,83 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react'
|
||||
import codePush from 'react-native-code-push'
|
||||
import styled from 'styled-components/native'
|
||||
|
||||
import { contentPadding } from '../styles/variables'
|
||||
import {
|
||||
appDisplayName,
|
||||
appVersionText,
|
||||
getStatusText,
|
||||
isCodePushRunningSomeTask,
|
||||
} from '../utils/helpers/code-push'
|
||||
|
||||
const Button = styled.TouchableOpacity`
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: row;
|
||||
padding-horizontal: ${contentPadding}px;
|
||||
`
|
||||
|
||||
const Text = styled.Text`
|
||||
color: ${({ theme }) => theme.base05};
|
||||
text-align: center;
|
||||
`
|
||||
|
||||
export default class AppVersion extends React.PureComponent {
|
||||
static defaultProps = {
|
||||
buttonProps: {},
|
||||
containerStyle: undefined,
|
||||
showAppName: false,
|
||||
}
|
||||
|
||||
state = { status: -1 }
|
||||
timeout = null
|
||||
|
||||
checkForAppUpdate = () => {
|
||||
codePush.sync(
|
||||
{
|
||||
updateDialog: true,
|
||||
installMode: codePush.InstallMode.IMMEDIATE,
|
||||
},
|
||||
status => {
|
||||
clearTimeout(this.timeout)
|
||||
|
||||
this.setState({ status }, () => {
|
||||
if (isCodePushRunningSomeTask(status)) return
|
||||
|
||||
this.timeout = setTimeout(() => {
|
||||
this.setState({ status: -1 })
|
||||
}, 2000)
|
||||
})
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
props: {
|
||||
showAppName?: ?boolean,
|
||||
containerStyle?: ?Object,
|
||||
buttonProps?: Object,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { status } = this.state
|
||||
const { containerStyle, buttonProps, showAppName, ...props } = this.props
|
||||
|
||||
const statusText = getStatusText(status)
|
||||
|
||||
return (
|
||||
<Button
|
||||
onPress={this.checkForAppUpdate}
|
||||
style={containerStyle}
|
||||
{...buttonProps}
|
||||
>
|
||||
{showAppName &&
|
||||
statusText === appVersionText && (
|
||||
<Text {...props}>{appDisplayName} </Text>
|
||||
)}
|
||||
<Text {...props}>{statusText}</Text>
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { appVersionText } from '../utils/helpers/code-push'
|
||||
|
||||
const Text = styled.p`
|
||||
color: ${({ theme }) => theme.base05};
|
||||
text-align: center;
|
||||
`
|
||||
|
||||
export default class AppVersion extends React.PureComponent {
|
||||
render() {
|
||||
const { ...props } = this.props
|
||||
delete props.containerStyle
|
||||
delete props.buttonProps
|
||||
|
||||
return <Text {...props}>{appVersionText}</Text>
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react'
|
||||
import styled from 'styled-components/native'
|
||||
import { Platform } from 'react-native'
|
||||
import type ImageSourcePropType from 'react-native/Libraries/Image/ImageSourcePropType'
|
||||
|
||||
import { radius as defaultRadius, mutedOpacity } from '../styles/variables'
|
||||
|
||||
const bgColorAfterLog = Platform.select({
|
||||
android: 'transparent',
|
||||
default: '#ffffff',
|
||||
})
|
||||
|
||||
const AvatarImage = styled.Image`
|
||||
width: ${({ size }) => size}px;
|
||||
height: ${({ size }) => size}px;
|
||||
background-color: ${({ error, loading, theme }) =>
|
||||
!loading && !error ? bgColorAfterLog : theme.base03};
|
||||
border-radius: ${({ radius }) => radius}px;
|
||||
opacity: ${({ muted }) => (muted ? mutedOpacity : 1)};
|
||||
`
|
||||
|
||||
export default class Avatar extends React.PureComponent {
|
||||
static defaultProps = {
|
||||
onLoad: undefined,
|
||||
onLoadStart: undefined,
|
||||
onLoadEnd: undefined,
|
||||
onError: undefined,
|
||||
radius: defaultRadius,
|
||||
size: 50,
|
||||
}
|
||||
|
||||
state = {
|
||||
error: false,
|
||||
loading: true,
|
||||
}
|
||||
|
||||
onLoad = next => () => {
|
||||
this.setState({ loading: false, error: false })
|
||||
if (typeof next === 'function') next()
|
||||
}
|
||||
|
||||
onLoadStart = next => () => {
|
||||
this.setState({ loading: true })
|
||||
if (typeof next === 'function') next()
|
||||
}
|
||||
|
||||
onLoadEnd = next => () => {
|
||||
this.setState({ loading: false })
|
||||
if (typeof next === 'function') next()
|
||||
}
|
||||
|
||||
onError = next => () => {
|
||||
this.setState({ loading: false, error: true })
|
||||
if (typeof next === 'function') next()
|
||||
}
|
||||
|
||||
props: {
|
||||
onLoad?: Function,
|
||||
onLoadStart?: Function,
|
||||
onLoadEnd?: Function,
|
||||
onError?: Function,
|
||||
size?: number,
|
||||
radius?: number,
|
||||
source: ImageSourcePropType,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { error, loading } = this.state
|
||||
|
||||
const {
|
||||
size,
|
||||
radius,
|
||||
onLoad,
|
||||
onLoadStart,
|
||||
onLoadEnd,
|
||||
onError,
|
||||
...props
|
||||
} = this.props
|
||||
|
||||
delete props.error
|
||||
delete props.loading
|
||||
|
||||
return (
|
||||
<AvatarImage
|
||||
size={size}
|
||||
radius={radius}
|
||||
error={error}
|
||||
loading={loading}
|
||||
resizeMode="cover"
|
||||
onLoad={this.onLoad(onLoad)}
|
||||
onLoadStart={this.onLoadStart(onLoadStart)}
|
||||
onLoadEnd={this.onLoadEnd(onLoadEnd)}
|
||||
onError={this.onError(onError)}
|
||||
alt="Avatar"
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react'
|
||||
import moment from 'moment'
|
||||
|
||||
export default class IntervalRefresh extends React.Component {
|
||||
static defaultProps = {
|
||||
interval: 1000,
|
||||
}
|
||||
|
||||
state = {
|
||||
currentInterval: 1000,
|
||||
updatedTimes: 0,
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.start()
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps) {
|
||||
const interval = this.getIntervalValue(newProps)
|
||||
|
||||
if (interval !== this.state.currentInterval) {
|
||||
this.start(newProps)
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.stop()
|
||||
}
|
||||
|
||||
getIntervalValue({ date, interval: _interval } = {}) {
|
||||
let interval
|
||||
|
||||
if (date) {
|
||||
const secondsDiff = moment().diff(date, 's')
|
||||
|
||||
// if (secondsDiff >= 3600) {
|
||||
// // each hour
|
||||
// interval = 3600000
|
||||
// } else
|
||||
if (secondsDiff >= 60) {
|
||||
// each minute
|
||||
interval = 60000
|
||||
} else {
|
||||
// each second
|
||||
interval = 1000
|
||||
}
|
||||
} else if (typeof _interval === 'number') interval = _interval
|
||||
else if (typeof _interval === 'function')
|
||||
interval = _interval(this.state.updatedTimes)
|
||||
|
||||
return interval
|
||||
}
|
||||
|
||||
start = props => {
|
||||
this.stop()
|
||||
|
||||
const interval = this.getIntervalValue(props || this.props)
|
||||
if (!(interval > 100)) {
|
||||
console.error(
|
||||
`Invalid interval: ${interval}. Expected a number bigger than 100ms.`,
|
||||
{ props: this.props },
|
||||
)
|
||||
}
|
||||
|
||||
this.setState({ currentInterval: interval }, () => {
|
||||
this.intervalInstance = setInterval(
|
||||
this.tickAndUpdateIntervalIfNecessary,
|
||||
this.state.currentInterval,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
stop = () => {
|
||||
clearInterval(this.intervalInstance)
|
||||
}
|
||||
|
||||
tick = callback => {
|
||||
this.setState(
|
||||
({ updatedTimes }) => ({
|
||||
updatedTimes: updatedTimes + 1,
|
||||
}),
|
||||
() => {
|
||||
if (callback) {
|
||||
const { updatedTimes } = this.state
|
||||
callback({ updatedTimes })
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
tickAndUpdateIntervalIfNecessary = () =>
|
||||
this.tick(this.updateIntervalIfNecessary)
|
||||
|
||||
updateIntervalIfNecessary = () => {
|
||||
// interval only change dynamically when date prop is passed
|
||||
if (!this.props.date) return
|
||||
|
||||
const newInterval = this.getIntervalValue(this.props)
|
||||
if (newInterval === this.state.currentInterval) return
|
||||
|
||||
this.start()
|
||||
}
|
||||
|
||||
intervalInstance = null
|
||||
|
||||
props: {
|
||||
children: Function,
|
||||
date?: Date,
|
||||
interval?: number, // in miliseconds
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children, ...props } = this.props
|
||||
return children(props)
|
||||
}
|
||||
}
|
||||