From 2193d5dff9601d45f25655fbf1524f33171f06ea Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 12:36:58 +0200 Subject: [PATCH 01/13] 2.8.0 --- android/app/build.gradle | 4 ++-- ios/PanaceaReactNativeClient-tvOS/Info.plist | 4 ++-- ios/PanaceaReactNativeClient-tvOSTests/Info.plist | 4 ++-- ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj | 4 ++-- ios/PanaceaReactNativeClient/Info.plist | 4 ++-- ios/PanaceaReactNativeClientTests/Info.plist | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5f112cf..9ad1b9c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -118,8 +118,8 @@ android { applicationId "digital.telenor.panacea" minSdkVersion 16 targetSdkVersion 26 - versionCode 15 - versionName "2.7.0" + versionCode 16 + versionName "2.8.0" ndk { abiFilters "armeabi-v7a", "x86" } diff --git a/ios/PanaceaReactNativeClient-tvOS/Info.plist b/ios/PanaceaReactNativeClient-tvOS/Info.plist index 4b3f68f..8cd900d 100644 --- a/ios/PanaceaReactNativeClient-tvOS/Info.plist +++ b/ios/PanaceaReactNativeClient-tvOS/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.7.0 + 2.8.0 CFBundleSignature ???? CFBundleVersion - 24 + 25 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist index 8ded0e3..c23bd3f 100644 --- a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist +++ b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.7.0 + 2.8.0 CFBundleSignature ???? CFBundleVersion - 24 + 25 diff --git a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj index e8058e8..b629bab 100644 --- a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj +++ b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj @@ -1573,7 +1573,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 25; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = G4VMYY2CK5; FRAMEWORK_SEARCH_PATHS = ( @@ -1609,7 +1609,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 25; DEVELOPMENT_TEAM = G4VMYY2CK5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/PanaceaReactNativeClient/Info.plist b/ios/PanaceaReactNativeClient/Info.plist index 30d053e..e28e1b0 100644 --- a/ios/PanaceaReactNativeClient/Info.plist +++ b/ios/PanaceaReactNativeClient/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.7.0 + 2.8.0 CFBundleSignature ???? CFBundleVersion - 24 + 25 CFBundleURLTypes diff --git a/ios/PanaceaReactNativeClientTests/Info.plist b/ios/PanaceaReactNativeClientTests/Info.plist index 8ded0e3..c23bd3f 100644 --- a/ios/PanaceaReactNativeClientTests/Info.plist +++ b/ios/PanaceaReactNativeClientTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.7.0 + 2.8.0 CFBundleSignature ???? CFBundleVersion - 24 + 25 diff --git a/package-lock.json b/package-lock.json index 2dc20dd..e311320 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "PanaceaReactNativeClient", - "version": "2.7.0", + "version": "2.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 82bae16..f4583ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "PanaceaReactNativeClient", - "version": "2.7.0", + "version": "2.8.0", "private": true, "devDependencies": { "babel-core": "^7.0.0-bridge.0", From fdcd92a341bbf4d3a6889bc0e9ef5dcfeb3fc204 Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 12:37:30 +0200 Subject: [PATCH 02/13] chore: run pod install --- ios/Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 950236b..2e6dfe4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -75,7 +75,7 @@ DEPENDENCIES: - Firebase/RemoteConfig SPEC REPOS: - https://github.com/cocoapods/specs.git: + https://github.com/CocoaPods/Specs.git: - Crashlytics - Fabric - Firebase @@ -111,4 +111,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: c824a7e5afca43c8d42f8a941a8959014e236c05 -COCOAPODS: 1.5.3 +COCOAPODS: 1.5.0 From 5d42d30105c7a3a97239f50d1058548b977bdc53 Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 12:38:14 +0200 Subject: [PATCH 03/13] chore: add usage description for photo and microphone for ios --- ios/PanaceaReactNativeClient/Info.plist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/PanaceaReactNativeClient/Info.plist b/ios/PanaceaReactNativeClient/Info.plist index e28e1b0..5207c22 100644 --- a/ios/PanaceaReactNativeClient/Info.plist +++ b/ios/PanaceaReactNativeClient/Info.plist @@ -76,5 +76,9 @@ SimpleLineIcons.ttf Zocial.ttf + NSPhotoLibraryUsageDescription + To give the user possibility to send extra context on feedback + NSMicrophoneUsageDescription + To give the user possibility to send extra context on feedback From 7066a3b4b666269654984e976c12c2f8a9fcc251 Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 12:43:30 +0200 Subject: [PATCH 04/13] chore: bump ios build number --- ios/PanaceaReactNativeClient-tvOS/Info.plist | 2 +- ios/PanaceaReactNativeClient-tvOSTests/Info.plist | 2 +- ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj | 4 ++-- ios/PanaceaReactNativeClient/Info.plist | 2 +- ios/PanaceaReactNativeClientTests/Info.plist | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/PanaceaReactNativeClient-tvOS/Info.plist b/ios/PanaceaReactNativeClient-tvOS/Info.plist index 8cd900d..d0cccc1 100644 --- a/ios/PanaceaReactNativeClient-tvOS/Info.plist +++ b/ios/PanaceaReactNativeClient-tvOS/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 25 + 26 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist index c23bd3f..6ebecf4 100644 --- a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist +++ b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 25 + 26 diff --git a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj index b629bab..be42e71 100644 --- a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj +++ b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj @@ -1573,7 +1573,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 25; + CURRENT_PROJECT_VERSION = 26; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = G4VMYY2CK5; FRAMEWORK_SEARCH_PATHS = ( @@ -1609,7 +1609,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 25; + CURRENT_PROJECT_VERSION = 26; DEVELOPMENT_TEAM = G4VMYY2CK5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/PanaceaReactNativeClient/Info.plist b/ios/PanaceaReactNativeClient/Info.plist index 5207c22..0cc84f8 100644 --- a/ios/PanaceaReactNativeClient/Info.plist +++ b/ios/PanaceaReactNativeClient/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 25 + 26 CFBundleURLTypes diff --git a/ios/PanaceaReactNativeClientTests/Info.plist b/ios/PanaceaReactNativeClientTests/Info.plist index c23bd3f..6ebecf4 100644 --- a/ios/PanaceaReactNativeClientTests/Info.plist +++ b/ios/PanaceaReactNativeClientTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 25 + 26 From fd067f3eceded4e30032900235d7df82bd8802c6 Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 12:43:45 +0200 Subject: [PATCH 05/13] chore(README): update section about instabug --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1116cb0..a5f21cf 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The project was initially created with CRNA (create-react-native-app) before we - [Firebase Analytics](https://console.firebase.google.com/project/panacea-39e5a/analytics/app/ios:digital.telenor.panacea/overview%3Ft=2&cs=app.m.dashboard.overview&g=1) link to firebase analytics dashboard - [Screen Tracking with React Navigation](https://reactnavigation.org/docs/en/screen-tracking.html) - [Remote Config](https://console.firebase.google.com/project/panacea-39e5a/config) used to send global configuration to clients or to run experiments where client can get different configurations -- [Bug Reporting](https://instabug.com/) we use instabug for bug reporting +- [Bug Reporting](https://instabug.com/) we use instabug for bug reporting. Requires micro phone and photo permissions ## Remote Config From 1bdb398781d42748c3d4ce7ef85526bc9c786e9e Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 13:28:43 +0200 Subject: [PATCH 06/13] chore: bump compiledSdkVersion and build tools version from 23 -> 26 --- android/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9ad1b9c..0646dbe 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -111,8 +111,8 @@ def enableProguardInReleaseBuilds = false def pass = getPassword("mac","android_keystore") android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion 26 + buildToolsVersion "26.0.1" defaultConfig { applicationId "digital.telenor.panacea" From e4f957b584b37f9cbf503feaa7b3822706bf5ae2 Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 14:45:38 +0200 Subject: [PATCH 07/13] fix: the number of method references in a dex file cannot exceed 64k --- android/app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 0646dbe..4cf5900 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -123,6 +123,8 @@ android { ndk { abiFilters "armeabi-v7a", "x86" } + // Enabling multidex support. + multiDexEnabled true } signingConfigs { release { From 290bc5e8c5c5cec3f0b901fb8748612617a78690 Mon Sep 17 00:00:00 2001 From: havard Date: Fri, 15 Jun 2018 14:56:14 +0200 Subject: [PATCH 08/13] fix: add RECORD_AUDIO permission to manifest for android --- android/app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 7853d90..15c3b23 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -4,6 +4,7 @@ + Date: Sat, 16 Jun 2018 17:10:50 +0200 Subject: [PATCH 09/13] feat(Instabug): clear user data on logout refactor(Instabug): move configuration to helper file feat(Instabug): Use different token for production and testing feat(Instabug): Disable auto screen recording feat(Instabug): Configure welcome message for prod and beta feat(Instabug): Show welcome message on first time open app --- App.js | 6 +-- app/containers/Settings/SettingsContainer.js | 2 + app/helper/instabug.js | 39 ++++++++++++++++++++ ios/Podfile.lock | 4 +- 4 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 app/helper/instabug.js diff --git a/App.js b/App.js index df4e63a..1b91449 100644 --- a/App.js +++ b/App.js @@ -13,6 +13,7 @@ import { setRemoteConfig, loadSubscription } from './app/actions'; import Instabug from 'instabug-reactnative'; import { PersistGate } from 'redux-persist/integration/react' import analytics from "./app/helper/analytics"; +import {initInstabug} from "./app/helper/instabug"; const { store, persistor } = configureStore(); @@ -105,10 +106,7 @@ export default class App extends React.Component { } async componentWillMount() { - Instabug.startWithToken('d50e4b80d80701c04553b97dbf6a318b', Instabug.invocationEvent.shake); - Instabug.setColorTheme(Instabug.colorTheme.dark); - Instabug.setExtendedBugReportMode(Instabug.extendedBugReportMode.enabledWithRequiredFields); - Instabug.setAutoScreenRecordingEnabled(true); + initInstabug(); this.setState({ loading: false }); // TODO: Hardcoded value until better approach is implemented since onNavigationStateChange does not capture initial screen view diff --git a/app/containers/Settings/SettingsContainer.js b/app/containers/Settings/SettingsContainer.js index c0e642e..a42bb04 100644 --- a/app/containers/Settings/SettingsContainer.js +++ b/app/containers/Settings/SettingsContainer.js @@ -4,6 +4,7 @@ import { auth0 } from '../../helper/auth'; import { userLogout } from "../../actions"; import { connect } from 'react-redux'; import screens from "../../helper/screens"; +import Instabug from 'instabug-reactnative'; class SettingsContainer extends React.Component { @@ -31,6 +32,7 @@ class SettingsContainer extends React.Component { this.props.userLogout(); return auth0.webAuth.clearSession() .finally(() => { + Instabug.logOut(); this.props.navigation.navigate(screens.OnBoarding); }); }; diff --git a/app/helper/instabug.js b/app/helper/instabug.js new file mode 100644 index 0000000..16dcb71 --- /dev/null +++ b/app/helper/instabug.js @@ -0,0 +1,39 @@ +import {Platform, AsyncStorage} from 'react-native'; +import Instabug from "instabug-reactnative"; + +export const initInstabug = async () => { + Instabug.startWithToken('d50e4b80d80701c04553b97dbf6a318b', Instabug.invocationEvent.shake); + Instabug.setColorTheme(Instabug.colorTheme.dark); + Instabug.setExtendedBugReportMode(Instabug.extendedBugReportMode.enabledWithRequiredFields); + Instabug.setIntroMessageEnabled(false); + + if (Platform.OS === 'ios') { + Instabug.setUserStepsEnabled(true); + } + + Instabug.isRunningLive(function (isLive) { + if (isLive) { + // Instabug.startWithToken('LIVE_TOKEN', Instabug.invocationEvent.none); + } else { + Instabug.startWithToken('d50e4b80d80701c04553b97dbf6a318b', Instabug.invocationEvent.shake); + } + }); + + const hasShownWelcomeMessage = await AsyncStorage.getItem('@Panacea:hasShownInstabugWelcomeMessage'); + if (hasShownWelcomeMessage !== "yes") { + showWelcomeMessage(); + AsyncStorage.setItem('@Panacea:hasShownInstabugWelcomeMessage', "yes"); + } + + +}; + +const showWelcomeMessage = () => { + Instabug.isRunningLive(isLive => { + if (isLive) { + Instabug.showWelcomeMessage(Instabug.welcomeMessageMode.live); + } else { + Instabug.showWelcomeMessage(Instabug.welcomeMessageMode.beta); + } + }) +} \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2e6dfe4..950236b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -75,7 +75,7 @@ DEPENDENCIES: - Firebase/RemoteConfig SPEC REPOS: - https://github.com/CocoaPods/Specs.git: + https://github.com/cocoapods/specs.git: - Crashlytics - Fabric - Firebase @@ -111,4 +111,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: c824a7e5afca43c8d42f8a941a8959014e236c05 -COCOAPODS: 1.5.0 +COCOAPODS: 1.5.3 From 01b8e0187bea9f2af57801f2080d650c26474cec Mon Sep 17 00:00:00 2001 From: havard Date: Sat, 16 Jun 2018 17:11:45 +0200 Subject: [PATCH 10/13] 2.8.1 --- android/app/build.gradle | 4 ++-- ios/PanaceaReactNativeClient-tvOS/Info.plist | 4 ++-- ios/PanaceaReactNativeClient-tvOSTests/Info.plist | 4 ++-- ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj | 4 ++-- ios/PanaceaReactNativeClient/Info.plist | 4 ++-- ios/PanaceaReactNativeClientTests/Info.plist | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4cf5900..b760427 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -118,8 +118,8 @@ android { applicationId "digital.telenor.panacea" minSdkVersion 16 targetSdkVersion 26 - versionCode 16 - versionName "2.8.0" + versionCode 17 + versionName "2.8.1" ndk { abiFilters "armeabi-v7a", "x86" } diff --git a/ios/PanaceaReactNativeClient-tvOS/Info.plist b/ios/PanaceaReactNativeClient-tvOS/Info.plist index d0cccc1..64557c7 100644 --- a/ios/PanaceaReactNativeClient-tvOS/Info.plist +++ b/ios/PanaceaReactNativeClient-tvOS/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.8.0 + 2.8.1 CFBundleSignature ???? CFBundleVersion - 26 + 27 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist index 6ebecf4..7b5152d 100644 --- a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist +++ b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.8.0 + 2.8.1 CFBundleSignature ???? CFBundleVersion - 26 + 27 diff --git a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj index be42e71..e638022 100644 --- a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj +++ b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj @@ -1573,7 +1573,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 26; + CURRENT_PROJECT_VERSION = 27; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = G4VMYY2CK5; FRAMEWORK_SEARCH_PATHS = ( @@ -1609,7 +1609,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 26; + CURRENT_PROJECT_VERSION = 27; DEVELOPMENT_TEAM = G4VMYY2CK5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/PanaceaReactNativeClient/Info.plist b/ios/PanaceaReactNativeClient/Info.plist index 0cc84f8..2103490 100644 --- a/ios/PanaceaReactNativeClient/Info.plist +++ b/ios/PanaceaReactNativeClient/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.8.0 + 2.8.1 CFBundleSignature ???? CFBundleVersion - 26 + 27 CFBundleURLTypes diff --git a/ios/PanaceaReactNativeClientTests/Info.plist b/ios/PanaceaReactNativeClientTests/Info.plist index 6ebecf4..7b5152d 100644 --- a/ios/PanaceaReactNativeClientTests/Info.plist +++ b/ios/PanaceaReactNativeClientTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.8.0 + 2.8.1 CFBundleSignature ???? CFBundleVersion - 26 + 27 diff --git a/package-lock.json b/package-lock.json index e311320..323376c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "PanaceaReactNativeClient", - "version": "2.8.0", + "version": "2.8.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f4583ec..ffa55ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "PanaceaReactNativeClient", - "version": "2.8.0", + "version": "2.8.1", "private": true, "devDependencies": { "babel-core": "^7.0.0-bridge.0", From 0c9b185d5e1260ab83ce1b0dab9184fbd666a090 Mon Sep 17 00:00:00 2001 From: havard Date: Sat, 16 Jun 2018 17:25:06 +0200 Subject: [PATCH 11/13] feat: make app version visible in the app --- app/containers/OnBoarding/OnBoarding.js | 12 +++++++++--- app/containers/Settings/Settings.js | 6 +++++- app/containers/Settings/styles.js | 8 ++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/containers/OnBoarding/OnBoarding.js b/app/containers/OnBoarding/OnBoarding.js index 4e27344..c07e8aa 100644 --- a/app/containers/OnBoarding/OnBoarding.js +++ b/app/containers/OnBoarding/OnBoarding.js @@ -5,15 +5,16 @@ import PropTypes from 'prop-types'; import {Image} from "react-native"; import styles from './styles'; import {textStyles} from "../../config/fonts"; +import { version } from '../../../package.json'; const OnBoarding = (props) => { - const { showTermsAndConditions, signIn } = props; + const { showTermsAndConditions, signIn, version } = props; return (
- pi + pi <Text style={{ color: 'white' }}>({ version })</Text>
@@ -44,7 +45,12 @@ const OnBoarding = (props) => { OnBoarding.propTypes = { showTermsAndConditions: PropTypes.func, - signIn: PropTypes.func + signIn: PropTypes.func, + version: PropTypes.string.isRequired +}; + +OnBoarding.defaultProps = { + version }; export default OnBoarding; diff --git a/app/containers/Settings/Settings.js b/app/containers/Settings/Settings.js index 6105782..7c66b1a 100644 --- a/app/containers/Settings/Settings.js +++ b/app/containers/Settings/Settings.js @@ -1,11 +1,12 @@ import React from "react"; -import {Container, Body, Left, Title, Text, Button, Icon, Content, Header, Right, View} from "native-base"; +import {Container, Body, Left, Title, Text, Button, Icon, Content, Header, Right, View, Footer} from "native-base"; import {textStyles} from "../../config/fonts"; import styles from "./styles"; import {colors} from "../../config/colors"; import { RoundedBorder } from "../../components"; import {TouchableHighlight} from "react-native"; import { IconButton } from './components'; +import { version } from '../../../package'; const Settings = props => { const { goBack, showUserDetails, handleLogout, showPrivacy, showPurchaseHistory } = props; @@ -45,6 +46,9 @@ const Settings = props => { +
+ version: {version} +
); } diff --git a/app/containers/Settings/styles.js b/app/containers/Settings/styles.js index fbd9983..6317177 100644 --- a/app/containers/Settings/styles.js +++ b/app/containers/Settings/styles.js @@ -44,5 +44,13 @@ export default StyleSheet.create({ backgroundColor: colors.white, padding: 15, marginVertical: 8 + }, + footer: { + backgroundColor: colors.whiteTwo, + alignItems: 'center', + borderTopWidth: 0 + }, + footerText: { + color: colors.brownishGrey } }); From e07e1697c186901e1a638638facb649651826487 Mon Sep 17 00:00:00 2001 From: havard Date: Sat, 16 Jun 2018 17:32:11 +0200 Subject: [PATCH 12/13] feat: make it possible to force sign up flow from settings menu --- app/containers/OnBoarding/OnBoardingContainer.js | 3 ++- app/containers/Settings/Settings.js | 7 ++++++- app/containers/Settings/SettingsContainer.js | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/containers/OnBoarding/OnBoardingContainer.js b/app/containers/OnBoarding/OnBoardingContainer.js index e36e69f..c30ad71 100644 --- a/app/containers/OnBoarding/OnBoardingContainer.js +++ b/app/containers/OnBoarding/OnBoardingContainer.js @@ -22,10 +22,11 @@ class OnBoardingContainer extends React.Component { } componentDidUpdate(prevProps, prevState, snapshot) { + const forceSignUp = this.props.navigation.getParam('forceSignUp', false); if (this.props.profile.queried === true && prevProps.profile.queried === false) { // We have finished the getProfile query. // if the profile is missing we go to Signup. - if (!this.props.profile.data) { + if (forceSignUp || !this.props.profile.data) { this.props.navigation.navigate(screens.SignUp); } else { // Otherwise go to home page diff --git a/app/containers/Settings/Settings.js b/app/containers/Settings/Settings.js index 7c66b1a..0ff3f31 100644 --- a/app/containers/Settings/Settings.js +++ b/app/containers/Settings/Settings.js @@ -9,7 +9,7 @@ import { IconButton } from './components'; import { version } from '../../../package'; const Settings = props => { - const { goBack, showUserDetails, handleLogout, showPrivacy, showPurchaseHistory } = props; + const { goBack, showUserDetails, handleLogout, showPrivacy, showPurchaseHistory, handleShowSignUp } = props; return (
@@ -44,6 +44,11 @@ const Settings = props => { Logout + + + Sign Up Flow + +