Archived
Merge branch 'rn-0.59x' into 'master'
React Native 0.59.x See merge request edb/dusken-client!3
This commit is contained in:
commit
ab77f9dea9
69 files changed
+6351
-3505
No files matched your search
@@ -1,3 +1,4 @@
|
||||
|
||||
[android]
|
||||
target = Google Inc.:Google APIs:23
|
||||
|
||||
|
||||
+27
-6
@@ -16,6 +16,9 @@
|
||||
; Ignore polyfills
|
||||
.*/Libraries/polyfills/.*
|
||||
|
||||
; Ignore metro
|
||||
.*/node_modules/metro/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
@@ -25,24 +28,42 @@ node_modules/react-native/flow/
|
||||
[options]
|
||||
emoji=true
|
||||
|
||||
esproposal.optional_chaining=enable
|
||||
esproposal.nullish_coalescing=enable
|
||||
|
||||
module.system=haste
|
||||
module.system.haste.use_name_reducers=true
|
||||
# get basename
|
||||
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
|
||||
# strip .js or .js.flow suffix
|
||||
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
|
||||
# strip .ios suffix
|
||||
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
|
||||
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'
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.jsx
|
||||
module.file_ext=.json
|
||||
module.file_ext=.native.js
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(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.57.0
|
||||
^0.92.0
|
||||
+92
-76
@@ -1,84 +1,89 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (2.3.6)
|
||||
activesupport (4.2.10)
|
||||
CFPropertyList (3.0.0)
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.2)
|
||||
addressable (2.6.0)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
atomos (0.1.3)
|
||||
babosa (1.0.2)
|
||||
claide (1.0.2)
|
||||
cocoapods (1.3.1)
|
||||
cocoapods (1.6.1)
|
||||
activesupport (>= 4.0.2, < 5)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
cocoapods-core (= 1.3.1)
|
||||
cocoapods-deintegrate (>= 1.0.1, < 2.0)
|
||||
cocoapods-downloader (>= 1.1.3, < 2.0)
|
||||
cocoapods-core (= 1.6.1)
|
||||
cocoapods-deintegrate (>= 1.0.2, < 2.0)
|
||||
cocoapods-downloader (>= 1.2.2, < 2.0)
|
||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||
cocoapods-search (>= 1.0.0, < 2.0)
|
||||
cocoapods-stats (>= 1.0.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.2.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.3.1, < 2.0)
|
||||
cocoapods-try (>= 1.1.0, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
escape (~> 0.0.4)
|
||||
fourflusher (~> 2.0.1)
|
||||
fourflusher (>= 2.2.0, < 3.0)
|
||||
gh_inspector (~> 1.0)
|
||||
molinillo (~> 0.5.7)
|
||||
molinillo (~> 0.6.6)
|
||||
nap (~> 1.0)
|
||||
ruby-macho (~> 1.1)
|
||||
xcodeproj (>= 1.5.1, < 2.0)
|
||||
cocoapods-core (1.3.1)
|
||||
ruby-macho (~> 1.4)
|
||||
xcodeproj (>= 1.8.1, < 2.0)
|
||||
cocoapods-core (1.6.1)
|
||||
activesupport (>= 4.0.2, < 6)
|
||||
fuzzy_match (~> 2.0.4)
|
||||
nap (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.1)
|
||||
cocoapods-downloader (1.1.3)
|
||||
cocoapods-deintegrate (1.0.4)
|
||||
cocoapods-downloader (1.2.2)
|
||||
cocoapods-plugins (1.0.0)
|
||||
nap
|
||||
cocoapods-search (1.0.0)
|
||||
cocoapods-stats (1.0.0)
|
||||
cocoapods-trunk (1.3.0)
|
||||
cocoapods-stats (1.1.0)
|
||||
cocoapods-trunk (1.3.1)
|
||||
nap (>= 0.8, < 2.0)
|
||||
netrc (~> 0.11)
|
||||
cocoapods-try (1.1.0)
|
||||
colored (1.2)
|
||||
colored2 (3.1.2)
|
||||
commander-fastlane (4.4.5)
|
||||
commander-fastlane (4.4.6)
|
||||
highline (~> 1.7.2)
|
||||
concurrent-ruby (1.0.5)
|
||||
concurrent-ruby (1.1.5)
|
||||
declarative (0.0.10)
|
||||
declarative-option (0.1.0)
|
||||
domain_name (0.5.20170404)
|
||||
digest-crc (0.4.1)
|
||||
domain_name (0.5.20180417)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dotenv (2.2.1)
|
||||
dotenv (2.7.2)
|
||||
emoji_regex (1.0.1)
|
||||
escape (0.0.4)
|
||||
excon (0.60.0)
|
||||
faraday (0.13.1)
|
||||
excon (0.64.0)
|
||||
faraday (0.15.4)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-cookie_jar (0.0.6)
|
||||
faraday (>= 0.7.4)
|
||||
http-cookie (~> 1.0.0)
|
||||
faraday_middleware (0.12.2)
|
||||
faraday_middleware (0.13.1)
|
||||
faraday (>= 0.7.4, < 1.0)
|
||||
fastimage (2.1.1)
|
||||
fastlane (2.73.0)
|
||||
CFPropertyList (>= 2.3, < 3.0.0)
|
||||
fastimage (2.1.5)
|
||||
fastlane (2.122.0)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.3, < 3.0.0)
|
||||
babosa (>= 1.0.2, < 2.0.0)
|
||||
bundler (>= 1.12.0, < 2.0.0)
|
||||
bundler (>= 1.12.0, < 3.0.0)
|
||||
colored
|
||||
commander-fastlane (>= 4.4.5, < 5.0.0)
|
||||
commander-fastlane (>= 4.4.6, < 5.0.0)
|
||||
dotenv (>= 2.1.1, < 3.0.0)
|
||||
emoji_regex (>= 0.1, < 2.0)
|
||||
excon (>= 0.45.0, < 1.0.0)
|
||||
faraday (~> 0.9)
|
||||
faraday-cookie_jar (~> 0.0.6)
|
||||
faraday_middleware (~> 0.9)
|
||||
fastimage (>= 2.1.0, < 3.0.0)
|
||||
gh_inspector (>= 1.0.1, < 2.0.0)
|
||||
google-api-client (>= 0.13.1, < 0.14.0)
|
||||
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||
google-api-client (>= 0.21.2, < 0.24.0)
|
||||
google-cloud-storage (>= 1.15.0, < 2.0.0)
|
||||
highline (>= 1.7.2, < 2.0.0)
|
||||
json (< 3.0.0)
|
||||
mini_magick (~> 4.5.1)
|
||||
@@ -87,100 +92,111 @@ GEM
|
||||
multipart-post (~> 2.0.0)
|
||||
plist (>= 3.1.0, < 4.0.0)
|
||||
public_suffix (~> 2.0.0)
|
||||
rubyzip (>= 1.1.0, < 2.0.0)
|
||||
rubyzip (>= 1.2.2, < 2.0.0)
|
||||
security (= 0.1.3)
|
||||
slack-notifier (>= 1.3, < 2.0.0)
|
||||
terminal-notifier (>= 1.6.2, < 2.0.0)
|
||||
simctl (~> 1.6.3)
|
||||
slack-notifier (>= 2.0.0, < 3.0.0)
|
||||
terminal-notifier (>= 2.0.0, < 3.0.0)
|
||||
terminal-table (>= 1.4.5, < 2.0.0)
|
||||
tty-screen (>= 0.6.3, < 1.0.0)
|
||||
tty-spinner (>= 0.7.0, < 1.0.0)
|
||||
tty-spinner (>= 0.8.0, < 1.0.0)
|
||||
word_wrap (~> 1.0.0)
|
||||
xcodeproj (>= 1.5.2, < 2.0.0)
|
||||
xcpretty (>= 0.2.4, < 1.0.0)
|
||||
xcodeproj (>= 1.8.1, < 2.0.0)
|
||||
xcpretty (~> 0.3.0)
|
||||
xcpretty-travis-formatter (>= 0.0.3)
|
||||
fourflusher (2.0.1)
|
||||
fourflusher (2.2.0)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.0.3)
|
||||
google-api-client (0.13.6)
|
||||
gh_inspector (1.1.3)
|
||||
google-api-client (0.23.9)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (~> 0.5)
|
||||
googleauth (>= 0.5, < 0.7.0)
|
||||
httpclient (>= 2.8.1, < 3.0)
|
||||
mime-types (~> 3.0)
|
||||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.0)
|
||||
googleauth (0.6.2)
|
||||
signet (~> 0.9)
|
||||
google-cloud-core (1.3.0)
|
||||
google-cloud-env (~> 1.0)
|
||||
google-cloud-env (1.0.5)
|
||||
faraday (~> 0.11)
|
||||
google-cloud-storage (1.16.0)
|
||||
digest-crc (~> 0.4)
|
||||
google-api-client (~> 0.23)
|
||||
google-cloud-core (~> 1.2)
|
||||
googleauth (>= 0.6.2, < 0.10.0)
|
||||
googleauth (0.6.7)
|
||||
faraday (~> 0.12)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
logging (~> 2.0)
|
||||
memoist (~> 0.12)
|
||||
memoist (~> 0.16)
|
||||
multi_json (~> 1.11)
|
||||
os (~> 0.9)
|
||||
os (>= 0.9, < 2.0)
|
||||
signet (~> 0.7)
|
||||
highline (1.7.10)
|
||||
http-cookie (1.0.3)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
i18n (0.9.1)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.1.0)
|
||||
json (2.2.0)
|
||||
jwt (2.1.0)
|
||||
little-plugger (1.1.4)
|
||||
logging (2.2.2)
|
||||
little-plugger (~> 1.1)
|
||||
multi_json (~> 1.10)
|
||||
memoist (0.16.0)
|
||||
mime-types (3.1)
|
||||
mime-types (3.2.2)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mime-types-data (3.2019.0331)
|
||||
mini_magick (4.5.1)
|
||||
minitest (5.11.1)
|
||||
molinillo (0.5.7)
|
||||
multi_json (1.12.2)
|
||||
minitest (5.11.3)
|
||||
molinillo (0.6.6)
|
||||
multi_json (1.13.1)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
nanaimo (0.2.3)
|
||||
nanaimo (0.2.6)
|
||||
nap (1.1.0)
|
||||
naturally (2.2.0)
|
||||
netrc (0.11.0)
|
||||
os (0.9.6)
|
||||
plist (3.4.0)
|
||||
os (1.0.1)
|
||||
plist (3.5.0)
|
||||
public_suffix (2.0.5)
|
||||
representable (3.0.4)
|
||||
declarative (< 0.1.0)
|
||||
declarative-option (< 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
retriable (3.1.1)
|
||||
retriable (3.1.2)
|
||||
rouge (2.0.7)
|
||||
ruby-macho (1.1.0)
|
||||
rubyzip (1.2.1)
|
||||
ruby-macho (1.4.0)
|
||||
rubyzip (1.2.2)
|
||||
security (0.1.3)
|
||||
signet (0.8.1)
|
||||
signet (0.11.0)
|
||||
addressable (~> 2.3)
|
||||
faraday (~> 0.9)
|
||||
jwt (>= 1.5, < 3.0)
|
||||
multi_json (~> 1.10)
|
||||
slack-notifier (1.5.1)
|
||||
terminal-notifier (1.8.0)
|
||||
simctl (1.6.5)
|
||||
CFPropertyList
|
||||
naturally
|
||||
slack-notifier (2.3.2)
|
||||
terminal-notifier (2.0.0)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thread_safe (0.3.6)
|
||||
tty-cursor (0.5.0)
|
||||
tty-screen (0.6.4)
|
||||
tty-spinner (0.7.0)
|
||||
tty-cursor (>= 0.5.0)
|
||||
tzinfo (1.2.4)
|
||||
tty-cursor (0.6.1)
|
||||
tty-screen (0.6.5)
|
||||
tty-spinner (0.9.0)
|
||||
tty-cursor (~> 0.6.0)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uber (0.1.0)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.4)
|
||||
unicode-display_width (1.3.0)
|
||||
unf_ext (0.0.7.6)
|
||||
unicode-display_width (1.5.0)
|
||||
word_wrap (1.0.0)
|
||||
xcodeproj (1.5.4)
|
||||
CFPropertyList (~> 2.3.3)
|
||||
xcodeproj (1.9.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.2.3)
|
||||
xcpretty (0.2.8)
|
||||
nanaimo (~> 0.2.6)
|
||||
xcpretty (0.3.0)
|
||||
rouge (~> 2.0.7)
|
||||
xcpretty-travis-formatter (1.0.0)
|
||||
xcpretty (~> 0.2, >= 0.0.7)
|
||||
|
||||
@@ -12,12 +12,16 @@
|
||||
## Development
|
||||
# Improve compile times
|
||||
touch ~/.gradle/gradle.properties && echo -e "org.gradle.daemon=true\norg.gradle.jvmargs=-Xmx2048M" >> ~/.gradle/gradle.properties
|
||||
|
||||
# Run android emulator (first avd)
|
||||
yarn emulator
|
||||
|
||||
# Make sure you have hw.keyboard=yes in your avd config.ini (in $HOME/.android/avd/.../) for reloading when pressing R twice to work.
|
||||
|
||||
### Linking native dependencies
|
||||
We use a Podfile to install the stripe ios library, but not for anything else.
|
||||
Before running any `react-native link` commands, rename `ios/Podfile` to something else before running, then rename the file back when you are done.
|
||||
This is to let the react-native CLI know we use the Dusken xcode project and not cocoapods for managing all other dependencies.
|
||||
This avoids alot of issues resulting from poor cocoapods support by react native.
|
||||
|
||||
## Prepare release build
|
||||
# Fastlane
|
||||
bundle update
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
|
||||
import App from '../src/App';
|
||||
|
||||
import 'isomorphic-fetch';
|
||||
|
||||
// Note: test renderer must be required after react-native.
|
||||
|
||||
+4
-14
@@ -8,23 +8,13 @@
|
||||
# - `buck install -r android/app` - compile, install and run application
|
||||
#
|
||||
|
||||
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
|
||||
|
||||
lib_deps = []
|
||||
|
||||
for jarfile in glob(['libs/*.jar']):
|
||||
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
|
||||
lib_deps.append(':' + name)
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
binary_jar = jarfile,
|
||||
)
|
||||
create_aar_targets(glob(["libs/*.aar"]))
|
||||
|
||||
for aarfile in glob(['libs/*.aar']):
|
||||
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
|
||||
lib_deps.append(':' + name)
|
||||
android_prebuilt_aar(
|
||||
name = name,
|
||||
aar = aarfile,
|
||||
)
|
||||
create_jar_targets(glob(["libs/*.jar"]))
|
||||
|
||||
android_library(
|
||||
name = "all-libs",
|
||||
|
||||
+23
-34
@@ -78,7 +78,6 @@ project.ext.react = [
|
||||
]
|
||||
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
|
||||
|
||||
/**
|
||||
* Set this to true to create two separate APKs instead of one:
|
||||
@@ -96,47 +95,34 @@ def enableSeparateBuildPerCPUArchitecture = false
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion "26.0.2"
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "no.neuf.chateau"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 23
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 21
|
||||
versionName "1.2.2"
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
tipsiStripeRedirectScheme: "wedontusethis"
|
||||
]
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
reset()
|
||||
enable enableSeparateBuildPerCPUArchitecture
|
||||
universalApk false // If true, also generate a universal APK
|
||||
include "armeabi-v7a", "x86"
|
||||
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
// locally
|
||||
if (project.hasProperty('DUSKEN_RELEASE_STORE_FILE')) {
|
||||
storeFile file(DUSKEN_RELEASE_STORE_FILE)
|
||||
storePassword DUSKEN_RELEASE_STORE_PASSWORD
|
||||
keyAlias DUSKEN_RELEASE_KEY_ALIAS
|
||||
keyPassword DUSKEN_RELEASE_KEY_PASSWORD
|
||||
}
|
||||
// bitrise.io
|
||||
else if (System.getenv('BITRISEIO_ANDROID_KEYSTORE_URL')) {
|
||||
storeFile file(System.getenv("HOME") + "/keystores/my_keystore.jks")
|
||||
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
|
||||
keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
|
||||
keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
|
||||
|
||||
}
|
||||
storeFile file(DUSKEN_RELEASE_STORE_FILE)
|
||||
storePassword DUSKEN_RELEASE_STORE_PASSWORD
|
||||
keyAlias DUSKEN_RELEASE_KEY_ALIAS
|
||||
keyPassword DUSKEN_RELEASE_KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
@@ -151,7 +137,7 @@ android {
|
||||
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 versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
|
||||
def abi = output.getFilter(OutputFile.ABI)
|
||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||
output.versionCodeOverride =
|
||||
@@ -162,12 +148,15 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':tipsi-stripe')
|
||||
compile project(':react-native-sentry')
|
||||
compile project(':react-native-config')
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
compile "com.android.support:appcompat-v7:23.0.1"
|
||||
compile "com.facebook.react:react-native:+" // From node_modules
|
||||
implementation project(':@react-native-community_async-storage')
|
||||
implementation project(':react-native-sentry')
|
||||
implementation project(':tipsi-stripe')
|
||||
implementation project(':react-native-vector-icons')
|
||||
implementation project(':react-native-config')
|
||||
implementation project(':react-native-gesture-handler')
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
}
|
||||
|
||||
// Run this once to be able to run the application with BUCK
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
"""Helper definitions to glob .aar and .jar targets"""
|
||||
|
||||
def create_aar_targets(aarfiles):
|
||||
for aarfile in aarfiles:
|
||||
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
|
||||
lib_deps.append(":" + name)
|
||||
android_prebuilt_aar(
|
||||
name = name,
|
||||
aar = aarfile,
|
||||
)
|
||||
|
||||
def create_jar_targets(jarfiles):
|
||||
for jarfile in jarfiles:
|
||||
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
|
||||
lib_deps.append(":" + name)
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
binary_jar = jarfile,
|
||||
)
|
||||
Vendored
-53
@@ -15,56 +15,3 @@
|
||||
#-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.**
|
||||
+6
-3
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- These are added by React Native for debug mode, but actually aren't needed in release mode -->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" tools:node="remove" />
|
||||
</manifest>
|
||||
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
|
||||
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
|
||||
</manifest>
|
||||
@@ -1,27 +1,13 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="no.neuf.chateau"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
package="no.neuf.chateau">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
||||
<!-- These permissions are added implicitly by android-jsc, see https://github.com/facebook/android-jsc/pull/12 -->
|
||||
<!-- The following lines can be removed after android-jsc is updated in react-native -->
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
|
||||
|
||||
<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:allowBackup="false"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Executable → Regular
File mode changed.
Binary file not shown.
@@ -3,10 +3,12 @@ package no.neuf.chateau;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.gettipsi.stripe.StripeReactPackage;
|
||||
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
|
||||
import io.sentry.RNSentryPackage;
|
||||
import com.gettipsi.stripe.StripeReactPackage;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
@@ -27,9 +29,12 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(),
|
||||
new AsyncStoragePackage(),
|
||||
new RNSentryPackage(),
|
||||
new StripeReactPackage(),
|
||||
new RNSentryPackage(MainApplication.this),
|
||||
new ReactNativeConfigPackage()
|
||||
new VectorIconsPackage(),
|
||||
new ReactNativeConfigPackage(),
|
||||
new RNGestureHandlerPackage()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+10
-4
@@ -1,11 +1,19 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext {
|
||||
buildToolsVersion = "28.0.3"
|
||||
minSdkVersion = 16
|
||||
compileSdkVersion = 28
|
||||
targetSdkVersion = 28
|
||||
supportLibVersion = "28.0.0"
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -16,10 +24,8 @@ allprojects {
|
||||
repositories {
|
||||
// Add jitpack repository (added by tipsi-stripe)
|
||||
maven { url "https://jitpack.io" }
|
||||
maven {
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
mavenLocal()
|
||||
google()
|
||||
jcenter()
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
# update_fastlane
|
||||
|
||||
fastlane_version "2.73.0"
|
||||
|
||||
default_platform :android
|
||||
default_platform(:android)
|
||||
|
||||
platform :android do
|
||||
desc "Submit a new build to the Google Play Beta track"
|
||||
@@ -18,4 +16,8 @@ platform :android do
|
||||
|
||||
slack(message: "Chateau Neuf app build uploaded to Google Play")
|
||||
end
|
||||
|
||||
lane :build do
|
||||
gradle(task: "assembleRelease")
|
||||
end
|
||||
end
|
||||
@@ -8,13 +8,11 @@ Make sure you have the latest version of the Xcode command line tools installed:
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
## Choose your installation method:
|
||||
|
||||
| Method | OS support | Description |
|
||||
|----------------------------|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Homebrew](http://brew.sh) | macOS | `brew cask install fastlane` |
|
||||
| Installer Script | macOS | [Download the zip file](https://download.fastlane.tools). Then double click on the `install` script (or run it in a terminal window). |
|
||||
| RubyGems | macOS or Linux with Ruby 2.0.0 or above | `sudo gem install fastlane -NV` |
|
||||
Install _fastlane_ using
|
||||
```
|
||||
[sudo] gem install fastlane -NV
|
||||
```
|
||||
or alternatively using `brew cask install fastlane`
|
||||
|
||||
# Available Actions
|
||||
## Android
|
||||
@@ -23,6 +21,11 @@ xcode-select --install
|
||||
fastlane android beta
|
||||
```
|
||||
Submit a new build to the Google Play Beta track
|
||||
### android build
|
||||
```
|
||||
fastlane android build
|
||||
```
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
@@ -16,5 +16,3 @@
|
||||
# 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
Binary file not shown.
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||
Vendored
+59
-51
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -6,47 +6,6 @@
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# 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"
|
||||
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# 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
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
@@ -90,7 +89,7 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
@@ -114,6 +113,7 @@ fi
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
@@ -154,11 +154,19 @@ if $cygwin ; then
|
||||
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=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+4
-10
@@ -8,14 +8,14 @@
|
||||
@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 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=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -46,10 +46,9 @@ echo location of your Java installation.
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows 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.
|
||||
@@ -60,11 +59,6 @@ set _SKIP=2
|
||||
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
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
rootProject.name = 'Dusken'
|
||||
include ':tipsi-stripe'
|
||||
project(':tipsi-stripe').projectDir = new File(rootProject.projectDir, '../node_modules/tipsi-stripe/android')
|
||||
include ':@react-native-community_async-storage'
|
||||
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
|
||||
include ':react-native-sentry'
|
||||
project(':react-native-sentry').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sentry/android')
|
||||
include ':tipsi-stripe'
|
||||
project(':tipsi-stripe').projectDir = new File(rootProject.projectDir, '../node_modules/tipsi-stripe/android')
|
||||
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-config'
|
||||
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
|
||||
include ':react-native-gesture-handler'
|
||||
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
|
||||
|
||||
include ':app'
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "Dusken",
|
||||
"displayName": "Dusken"
|
||||
}
|
||||
"displayName": "Chateau Neuf"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
};
|
||||
@@ -3,8 +3,10 @@ import { AppRegistry } from "react-native";
|
||||
import { Sentry } from 'react-native-sentry';
|
||||
import Config from 'react-native-config';
|
||||
|
||||
import {name as appName} from './app.json';
|
||||
|
||||
if(Config.SENTRY_DSN) {
|
||||
Sentry.config(Config.SENTRY_DSN).install();
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent('Dusken', () => App);
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0820"
|
||||
LastUpgradeVersion = "0940"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0620"
|
||||
LastUpgradeVersion = "0940"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?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>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,15 +1,14 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* 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.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <React/RCTBridgeDelegate.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIWindow *window;
|
||||
|
||||
|
||||
+17
-20
@@ -1,36 +1,24 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* 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.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
#import <React/RCTRootView.h>
|
||||
#if __has_include(<React/RNSentry.h>)
|
||||
#import <React/RNSentry.h> // This is used for versions of react >= 0.40
|
||||
#else
|
||||
#import "RNSentry.h" // This is used for versions of react < 0.40
|
||||
#endif
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
NSURL *jsCodeLocation;
|
||||
|
||||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
||||
moduleName:@"Dusken"
|
||||
initialProperties:nil
|
||||
launchOptions:launchOptions];
|
||||
|
||||
[RNSentry installWithRootView:rootView];
|
||||
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
||||
moduleName:@"Dusken"
|
||||
initialProperties:nil];
|
||||
|
||||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
||||
|
||||
@@ -42,4 +30,13 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
#if DEBUG
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||
#else
|
||||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -32,6 +32,8 @@
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
@@ -45,16 +47,19 @@
|
||||
<string></string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>AntDesign.ttf</string>
|
||||
<string>Entypo.ttf</string>
|
||||
<string>EvilIcons.ttf</string>
|
||||
<string>Feather.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>FontAwesome5_Brands.ttf</string>
|
||||
<string>FontAwesome5_Regular.ttf</string>
|
||||
<string>FontAwesome5_Solid.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
<string>MaterialCommunityIcons.ttf</string>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>Octicons.ttf</string>
|
||||
<string>Roboto_medium.ttf</string>
|
||||
<string>Roboto.ttf</string>
|
||||
<string>rubicon-icon-font.ttf</string>
|
||||
<string>SimpleLineIcons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
</array>
|
||||
|
||||
+3
-5
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* 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.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* 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.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
platform :ios, '9.0'
|
||||
|
||||
target 'Dusken' do
|
||||
pod 'Stripe', '~> 11.2.0'
|
||||
pod 'Stripe', '~> 14.0.0'
|
||||
inherit! :search_paths
|
||||
end
|
||||
+9
-5
@@ -1,12 +1,16 @@
|
||||
PODS:
|
||||
- Stripe (11.2.0)
|
||||
- Stripe (14.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Stripe (~> 11.2.0)
|
||||
- Stripe (~> 14.0.0)
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Stripe
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Stripe: 898f83a95d72180c6eb4acd65b2ae6158fc6a8bd
|
||||
Stripe: db29ad197c74aca6fb981e4e8355cf7ebd0fca5a
|
||||
|
||||
PODFILE CHECKSUM: 273d0fa628aa24ffc6ca337ff5541ea938e9910c
|
||||
PODFILE CHECKSUM: efbda7a8dd746948fda0c0f77d2a6025b23adc55
|
||||
|
||||
COCOAPODS: 1.3.1
|
||||
COCOAPODS: 1.6.1
|
||||
@@ -17,7 +17,7 @@ platform :ios do
|
||||
lane :beta do
|
||||
increment_build_number
|
||||
increment_version_number
|
||||
build_app(scheme: "Dusken") # more options available
|
||||
build_app(scheme: "Dusken")
|
||||
upload_to_testflight(skip_waiting_for_build_processing: true)
|
||||
slack(message: "Chateau Neuf app build uploaded to TestFlight")
|
||||
end
|
||||
@@ -27,16 +27,14 @@ platform :ios do
|
||||
increment_build_number
|
||||
increment_version_number
|
||||
# capture_screenshots
|
||||
build_app(scheme: "Dusken") # more options available
|
||||
build_app(scheme: "Dusken")
|
||||
upload_to_app_store(force: true)
|
||||
# frame_screenshots
|
||||
slack(message: "Chateau Neuf app build uploaded to App Store")
|
||||
end
|
||||
|
||||
error do |lane, exception|
|
||||
# slack(
|
||||
# message: exception.message,
|
||||
# success: false
|
||||
# )
|
||||
lane :build do
|
||||
build_app(scheme: "Dusken")
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
preset: "react-native",
|
||||
setupFiles: [
|
||||
"<rootDir>/jestSetup.js"
|
||||
],
|
||||
transformIgnorePatterns: [
|
||||
"node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-navigation|react-navigation-tabs|react-navigation-stack|native-base|@shoutem|tipsi-stripe|redux-persist|@react-native-community)"
|
||||
]
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
jest.doMock('tipsi-stripe', () => ({
|
||||
init: jest.fn(),
|
||||
}));
|
||||
jest.doMock('react-dom/server', () => {}, {virtual: true})
|
||||
|
||||
global.fetch = require('jest-fetch-mock');
|
||||
@@ -0,0 +1,15 @@
|
||||
jest.doMock('tipsi-stripe', () => ({
|
||||
setOptions: jest.fn(),
|
||||
}));
|
||||
jest.doMock('react-dom/server', () => {}, {virtual: true})
|
||||
|
||||
global.fetch = require('jest-fetch-mock');
|
||||
|
||||
// ref https://github.com/kmagiera/react-native-gesture-handler/issues/344#issuecomment-489208684
|
||||
import { NativeModules } from 'react-native';
|
||||
NativeModules.RNGestureHandlerModule = {};
|
||||
|
||||
// ref https://github.com/react-native-community/react-native-async-storage/blob/master/docs/Jest-integration.md
|
||||
import mockAsyncStorage from '@react-native-community/async-storage/jest/async-storage-mock';
|
||||
|
||||
jest.mock('@react-native-community/async-storage', () => mockAsyncStorage);
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Metro configuration for React Native
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: false,
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
+42
-46
@@ -1,58 +1,54 @@
|
||||
{
|
||||
"name": "Dusken",
|
||||
"name": "dusken",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"test": "jest",
|
||||
"android": "react-native run-android",
|
||||
"build:android": "cd android && ./gradlew assembleRelease",
|
||||
"emulator": "emulator -avd $(emulator -list-avds | head)&",
|
||||
"build-android": "cd android && ./gradlew assembleRelease",
|
||||
"release-android": "cd android && bundle exec fastlane beta",
|
||||
"release-ios": "cd ios && bundle exec fastlane beta"
|
||||
"ios": "react-native run-ios",
|
||||
"release:android": "cd android && bundle exec fastlane beta",
|
||||
"release:ios": "cd ios && bundle exec fastlane beta",
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"apollo-cache-inmemory": "^1.1.0",
|
||||
"apollo-client": "^2.0.2",
|
||||
"apollo-link-http": "^1.1.0",
|
||||
"email-validator": "^1.1.1",
|
||||
"graphql": "^0.11.7",
|
||||
"graphql-tag": "^2.5.0",
|
||||
"moment": "^2.19.4",
|
||||
"native-base": "^2.3.5",
|
||||
"prop-types": "^15.5.10",
|
||||
"react": "16.0.0",
|
||||
"react-apollo": "^2.0.0",
|
||||
"react-native": "0.51.0",
|
||||
"react-native-confetti": "^0.0.6",
|
||||
"react-native-config": "^0.11.2",
|
||||
"react-native-htmlview": "^0.12.1",
|
||||
"react-native-sentry": "^0.32.0",
|
||||
"react-native-vector-icons": "~4.4.2",
|
||||
"react-navigation": "^1.0.0-beta.21",
|
||||
"react-redux": "^5.0.6",
|
||||
"redux": "^3.7.2",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-persist": "^4.10.2",
|
||||
"redux-thunk": "^2.2.0",
|
||||
"tipsi-stripe": "^4.5.1"
|
||||
"@react-native-community/async-storage": "^1.3.4",
|
||||
"apollo-cache-inmemory": "^1.5.1",
|
||||
"apollo-client": "^2.5.1",
|
||||
"apollo-link-http": "^1.5.14",
|
||||
"email-validator": "^2.0.4",
|
||||
"graphql": "^14.2.1",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"moment": "^2.24.0",
|
||||
"native-base": "^2.12.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "16.8.3",
|
||||
"react-apollo": "^2.5.5",
|
||||
"react-native": "0.59.5",
|
||||
"react-native-confetti": "^0.1.0",
|
||||
"react-native-config": "^0.11.7",
|
||||
"react-native-gesture-handler": "^1.2.1",
|
||||
"react-native-htmlview": "^0.14.0",
|
||||
"react-native-screens": "^1.0.0-alpha.22",
|
||||
"react-native-sentry": "^0.42.0",
|
||||
"react-native-vector-icons": "^6.4.2",
|
||||
"react-navigation": "^3.9.1",
|
||||
"react-navigation-hooks": "^1.0.0-alpha.2",
|
||||
"react-redux": "^7.0.3",
|
||||
"redux": "^4.0.1",
|
||||
"redux-persist": "^5.10.0",
|
||||
"redux-thunk": "^2.3.0",
|
||||
"tipsi-stripe": "^7.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "21.2.0",
|
||||
"jest": "21.2.1",
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/runtime": "^7.4.4",
|
||||
"babel-jest": "^24.7.1",
|
||||
"jest": "^24.7.1",
|
||||
"jest-fetch-mock": "^1.6.5",
|
||||
"react-dom": "^16.0.0",
|
||||
"react-test-renderer": "16.2.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native",
|
||||
"setupFiles": [
|
||||
"<rootDir>/jest/setup.js"
|
||||
],
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!(jest-)?react-native|react-clone-referenced-element|react-navigation|native-base|@shoutem|tipsi-stripe)"
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
"@sentry/cli": "1.27.0"
|
||||
"metro-react-native-babel-preset": "^0.54.0",
|
||||
"react-dom": "16.8.3",
|
||||
"react-test-renderer": "16.8.3"
|
||||
}
|
||||
}
|
||||
+7
-18
@@ -1,10 +1,6 @@
|
||||
import React, {Component} from 'react';
|
||||
import {Provider} from 'react-redux';
|
||||
import {applyMiddleware, createStore} from 'redux';
|
||||
import logger from 'redux-logger';
|
||||
import thunk from 'redux-thunk';
|
||||
import {autoRehydrate, persistStore} from 'redux-persist'
|
||||
import {AsyncStorage} from 'react-native'
|
||||
import {PersistGate} from 'redux-persist/es/integration/react'
|
||||
import Config from 'react-native-config';
|
||||
import {ApolloClient} from 'apollo-client';
|
||||
import {HttpLink} from 'apollo-link-http';
|
||||
@@ -12,15 +8,9 @@ import {InMemoryCache} from 'apollo-cache-inmemory';
|
||||
import {ApolloProvider} from "react-apollo";
|
||||
|
||||
import Dusken from "./Dusken";
|
||||
import duskenApp from "./reducers";
|
||||
import {store, persistor} from './reduxStore';
|
||||
|
||||
|
||||
let store = createStore(
|
||||
duskenApp,
|
||||
applyMiddleware(...[logger, thunk]),
|
||||
autoRehydrate()
|
||||
);
|
||||
|
||||
const apolloClient = new ApolloClient({
|
||||
link: new HttpLink({uri: `${Config.DUSKEN_API_URL}/api/graphql/`}),
|
||||
cache: new InMemoryCache()
|
||||
@@ -30,13 +20,12 @@ export default class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<Dusken />
|
||||
</ApolloProvider>
|
||||
<PersistGate loading={null} persistor={persistor}>
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<Dusken />
|
||||
</ApolloProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// begin periodically persisting the store
|
||||
persistStore(store, {storage: AsyncStorage});
|
||||
+5
-4
@@ -6,13 +6,14 @@ import {
|
||||
userDataFailure, userDataRequest, userDataSuccess,
|
||||
membershipChargeFailure, membershipChargeRequest, membershipChargeSuccess,
|
||||
} from "./actions";
|
||||
import { fetchWithTimeout } from "./utils";
|
||||
|
||||
export function requestLogin(username, password) {
|
||||
return (dispatch) => {
|
||||
// We are now logging in
|
||||
dispatch(loginRequest());
|
||||
|
||||
return fetch(`${Config.DUSKEN_API_URL}/auth/obtain-token/`, {
|
||||
return fetchWithTimeout(`${Config.DUSKEN_API_URL}/auth/obtain-token/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
@@ -47,7 +48,7 @@ export function requestUserData(auth_token) {
|
||||
// We are now fetching user data
|
||||
dispatch(userDataRequest());
|
||||
|
||||
return fetch(`${Config.DUSKEN_API_URL}/api/me/`, {
|
||||
return fetchWithTimeout(`${Config.DUSKEN_API_URL}/api/me/`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
@@ -77,7 +78,7 @@ export function requestRegisterUser(firstName, lastName, email, phoneNumber, pas
|
||||
return (dispatch) => {
|
||||
dispatch(registerUserRequest());
|
||||
|
||||
return fetch(`${Config.DUSKEN_API_URL}/api/user/register/`, {
|
||||
return fetchWithTimeout(`${Config.DUSKEN_API_URL}/api/user/register/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
@@ -113,7 +114,7 @@ export function requestMembershipCharge(auth_token, stripe_token, membership_typ
|
||||
return (dispatch) => {
|
||||
dispatch(membershipChargeRequest());
|
||||
|
||||
return fetch(`${Config.DUSKEN_API_URL}/api/membership/charge/`, {
|
||||
return fetchWithTimeout(`${Config.DUSKEN_API_URL}/api/membership/charge/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {StyleSheet, View, SectionList, Platform} from "react-native";
|
||||
import {StyleSheet, View, Platform} from "react-native";
|
||||
import {SectionList} from 'react-navigation';
|
||||
import {Card, ListItem, CardItem, Body, Text as Text, Left, Right, Icon, Button, Content, Spinner} from 'native-base';
|
||||
import React, { Component } from 'react';
|
||||
import moment from "moment";
|
||||
@@ -118,4 +119,4 @@ const styles = StyleSheet.create({
|
||||
listHeader: {
|
||||
paddingTop: 8,
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -9,7 +9,7 @@ import Proof from "./Proof";
|
||||
import {requestMembershipCharge} from "../../api";
|
||||
|
||||
|
||||
stripe.init({
|
||||
stripe.setOptions({
|
||||
publishableKey: Config.STRIPE_PUBLISHABLE_KEY || '',
|
||||
});
|
||||
|
||||
|
||||
@@ -261,4 +261,4 @@ const styles = StyleSheet.create({
|
||||
paddingTop: 2,
|
||||
paddingBottom: 12,
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, {Component} from 'react';
|
||||
import {connect} from "react-redux";
|
||||
|
||||
import UserRegister from "./UserRegister";
|
||||
import {requestRegisterUser} from "../../api";
|
||||
|
||||
@@ -45,4 +46,4 @@ function storeToProps(store) {
|
||||
export default connect(
|
||||
storeToProps,
|
||||
{requestRegisterUser}
|
||||
)(UserRegisterContainer);
|
||||
)(UserRegisterContainer);
|
||||
+23
-12
@@ -1,5 +1,5 @@
|
||||
import {Platform, StyleSheet} from 'react-native';
|
||||
import {TabNavigator, StackNavigator} from "react-navigation";
|
||||
import {createBottomTabNavigator, createStackNavigator, createAppContainer, getActiveChildNavigationOptions} from "react-navigation";
|
||||
|
||||
import AboutScreen from "./screens/AboutScreen";
|
||||
import EventDetailScreen from "./screens/EventDetailScreen";
|
||||
@@ -9,9 +9,9 @@ import MembershipScreen from "./screens/MembershipScreen";
|
||||
import UserRegisterScreen from "./screens/UserRegisterScreen";
|
||||
|
||||
const tabBarRoutes = {
|
||||
EventList: { screen: EventListScreen },
|
||||
Membership: { screen: MembershipScreen },
|
||||
About: { screen: AboutScreen },
|
||||
EventList: EventListScreen,
|
||||
Membership: MembershipScreen,
|
||||
About: AboutScreen,
|
||||
};
|
||||
|
||||
const tabBarOptions = {
|
||||
@@ -41,16 +41,27 @@ const tabBarOptions = {
|
||||
}
|
||||
}),
|
||||
},
|
||||
}
|
||||
},
|
||||
navigationOptions: ({ navigation, screenProps }) => ({
|
||||
// get header title from active child screen
|
||||
...getActiveChildNavigationOptions(navigation, screenProps),
|
||||
headerStyle: {
|
||||
backgroundColor: '#f58220',
|
||||
},
|
||||
headerTitleStyle: {
|
||||
color: 'white',
|
||||
},
|
||||
headerTintColor: 'white',
|
||||
})
|
||||
};
|
||||
|
||||
const tabNav = TabNavigator(tabBarRoutes, tabBarOptions);
|
||||
const tabNav = createBottomTabNavigator(tabBarRoutes, tabBarOptions);
|
||||
|
||||
const DuskenNavigation = StackNavigator({
|
||||
Root: { screen: tabNav },
|
||||
Login: { screen: LoginScreen },
|
||||
UserRegister: { screen: UserRegisterScreen },
|
||||
EventDetail: { screen: EventDetailScreen },
|
||||
const DuskenNavigation = createStackNavigator({
|
||||
Root: tabNav,
|
||||
Login: LoginScreen,
|
||||
UserRegister: UserRegisterScreen,
|
||||
EventDetail: EventDetailScreen,
|
||||
});
|
||||
|
||||
export default DuskenNavigation;
|
||||
export default createAppContainer(DuskenNavigation);
|
||||
@@ -0,0 +1,26 @@
|
||||
import { applyMiddleware, createStore } from 'redux';
|
||||
import { persistStore, persistReducer } from 'redux-persist';
|
||||
import AsyncStorage from '@react-native-community/async-storage';
|
||||
import thunk from "redux-thunk";
|
||||
|
||||
import rootReducer from './reducers'
|
||||
|
||||
|
||||
const persistConfig = {
|
||||
key: 'root',
|
||||
storage: AsyncStorage,
|
||||
blacklist: [
|
||||
'isLoggingIn',
|
||||
'isFetchingUserData',
|
||||
'isRegisteringUser',
|
||||
'isChargingMembership'
|
||||
]
|
||||
};
|
||||
|
||||
const persistedReducer = persistReducer(persistConfig, rootReducer);
|
||||
|
||||
export let store = createStore(
|
||||
persistedReducer,
|
||||
applyMiddleware(...[thunk])
|
||||
);
|
||||
export let persistor = persistStore(store);
|
||||
@@ -8,13 +8,6 @@ import getTheme from '../../native-base-theme/components';
|
||||
export default class AboutScreen extends Component {
|
||||
static navigationOptions = {
|
||||
title: 'Om oss',
|
||||
headerStyle: {
|
||||
backgroundColor: '#f58220',
|
||||
},
|
||||
headerTitleStyle: {
|
||||
color: 'white',
|
||||
},
|
||||
headerTintColor: 'white',
|
||||
tabBarIcon: ({ tintColor }) => (
|
||||
<Icon name="info" size={16} color={tintColor} style={{marginTop: 5}} />
|
||||
),
|
||||
@@ -26,4 +19,4 @@ export default class AboutScreen extends Component {
|
||||
<AboutContainer />
|
||||
</StyleProvider>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,6 @@ import getTheme from '../../native-base-theme/components';
|
||||
export default class EventsScreen extends Component {
|
||||
static navigationOptions = {
|
||||
title: 'Program',
|
||||
headerStyle: {
|
||||
backgroundColor: '#f58220',
|
||||
},
|
||||
headerTitleStyle: {
|
||||
color: 'white',
|
||||
},
|
||||
headerTintColor: 'white',
|
||||
tabBarIcon: ({ tintColor }) => (
|
||||
<Icon name="event" size={16} color={tintColor} style={{marginTop: 5}}/>
|
||||
),
|
||||
@@ -31,4 +24,4 @@ export default class EventsScreen extends Component {
|
||||
</StyleProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,6 @@ import getTheme from '../../native-base-theme/components';
|
||||
export default class MembershipScreen extends Component {
|
||||
static navigationOptions = {
|
||||
title: 'Medlemskap',
|
||||
headerStyle: {
|
||||
backgroundColor: '#f58220',
|
||||
},
|
||||
headerTitleStyle: {
|
||||
color: 'white',
|
||||
},
|
||||
headerTintColor: 'white',
|
||||
tabBarIcon: ({ tintColor }) => (
|
||||
<Icon name="user" size={16} color={tintColor} style={{marginTop: 5}} />
|
||||
),
|
||||
@@ -41,4 +34,4 @@ export default class MembershipScreen extends Component {
|
||||
</StyleProvider>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,14 @@
|
||||
export function snakeToCamelCase(val) {
|
||||
return val.replace(/_([a-z])/g, function (g) { return g[1].toUpperCase(); });
|
||||
}
|
||||
|
||||
export function fetchWithTimeout(url, options, timeout=10000) {
|
||||
/** Wraps fetch to allow it to time out */
|
||||
// FIXME: show timeout message in UI
|
||||
return Promise.race([
|
||||
fetch(url, options),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(() => reject(new Error('Fetch request timed out')), timeout)
|
||||
)
|
||||
]);
|
||||
}
|
||||
Reference in new issue
Block a user