diff --git a/App.js b/App.js
index f80df0c..542204f 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";
import { initFCM } from './app/helper/firebaseCloudMessaging';
const { store, persistor } = configureStore();
@@ -106,10 +107,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/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
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 1700c74..745c959 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -111,18 +111,20 @@ 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"
minSdkVersion 16
targetSdkVersion 26
- versionCode 15
- versionName "2.7.0"
+ versionCode 17
+ versionName "2.8.1"
ndk {
abiFilters "armeabi-v7a", "x86"
}
+ // Enabling multidex support.
+ multiDexEnabled true
}
signingConfigs {
release {
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index b75f19c..2e51949 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -4,6 +4,7 @@
+
{
- const { showTermsAndConditions, signIn } = props;
+ const { showTermsAndConditions, signIn, version } = props;
return (
@@ -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/OnBoarding/OnBoardingContainer.js b/app/containers/OnBoarding/OnBoardingContainer.js
index 1f7f11a..497a0dd 100644
--- a/app/containers/OnBoarding/OnBoardingContainer.js
+++ b/app/containers/OnBoarding/OnBoardingContainer.js
@@ -24,10 +24,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 6ab3439..32d5d5a 100644
--- a/app/containers/Settings/Settings.js
+++ b/app/containers/Settings/Settings.js
@@ -1,5 +1,5 @@
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";
@@ -9,7 +9,7 @@ import { IconButton } from './components';
import { version } from '../../../package';
const Settings = props => {
- const { goBack, showUserDetails, handleLogout, showPrivacy, showPurchaseHistory, handleFeedback } = props;
+ const { goBack, showUserDetails, handleLogout, showPrivacy, showPurchaseHistory, handleShowSignUp, handleFeedback } = props;
return (
@@ -44,6 +44,11 @@ const Settings = props => {
Logout
+
+
+ Sign Up Flow
+
+
Report a problem
@@ -51,6 +56,9 @@ const Settings = props => {
+
);
}
diff --git a/app/containers/Settings/SettingsContainer.js b/app/containers/Settings/SettingsContainer.js
index fa27881..92a0f44 100644
--- a/app/containers/Settings/SettingsContainer.js
+++ b/app/containers/Settings/SettingsContainer.js
@@ -32,10 +32,16 @@ class SettingsContainer extends React.Component {
this.props.userLogout();
return auth0.webAuth.clearSession()
.finally(() => {
+ Instabug.logOut();
this.props.navigation.navigate(screens.OnBoarding);
});
};
+ _handleShowSignUp = () => {
+ this.props.navigation.navigate(screens.OnBoarding, {
+ forceSignUp: true
+ });
+
_handleFeedback = () => {
Instabug.invoke();
};
@@ -49,6 +55,7 @@ class SettingsContainer extends React.Component {
showPurchaseHistory={this._showPurchaseHistory}
showDeleteAccount={this._showDeleteAccount}
handleLogout={this._handleLogout}
+ handleShowSignUp={this._handleShowSignUp}
handleFeedback={this._handleFeedback}
/>
)
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
}
});
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/PanaceaReactNativeClient-tvOS/Info.plist b/ios/PanaceaReactNativeClient-tvOS/Info.plist
index 4b3f68f..66db217 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.1
CFBundleSignature
????
CFBundleVersion
- 24
+ 28
LSRequiresIPhoneOS
UILaunchStoryboardName
diff --git a/ios/PanaceaReactNativeClient-tvOSTests/Info.plist b/ios/PanaceaReactNativeClient-tvOSTests/Info.plist
index 8ded0e3..0fc354a 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.1
CFBundleSignature
????
CFBundleVersion
- 24
+ 28
diff --git a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj
index a9b78fc..104735d 100644
--- a/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj
+++ b/ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj
@@ -1584,7 +1584,7 @@
CODE_SIGN_ENTITLEMENTS = PanaceaReactNativeClient/PanaceaReactNativeClient.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 24;
+ CURRENT_PROJECT_VERSION = 28;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = G4VMYY2CK5;
FRAMEWORK_SEARCH_PATHS = (
@@ -1621,7 +1621,7 @@
CODE_SIGN_ENTITLEMENTS = PanaceaReactNativeClient/PanaceaReactNativeClient.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 24;
+ CURRENT_PROJECT_VERSION = 28;
DEVELOPMENT_TEAM = G4VMYY2CK5;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
diff --git a/ios/PanaceaReactNativeClient/Info.plist b/ios/PanaceaReactNativeClient/Info.plist
index 28c6149..f428114 100644
--- a/ios/PanaceaReactNativeClient/Info.plist
+++ b/ios/PanaceaReactNativeClient/Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.7.0
+ 2.8.1
CFBundleSignature
????
CFBundleVersion
- 24
+ 28
CFBundleURLTypes
@@ -66,6 +66,10 @@
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
UIBackgroundModes
remote-notification
diff --git a/ios/PanaceaReactNativeClientTests/Info.plist b/ios/PanaceaReactNativeClientTests/Info.plist
index 8ded0e3..0fc354a 100644
--- a/ios/PanaceaReactNativeClientTests/Info.plist
+++ b/ios/PanaceaReactNativeClientTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 2.7.0
+ 2.8.1
CFBundleSignature
????
CFBundleVersion
- 24
+ 28
diff --git a/package-lock.json b/package-lock.json
index 2dc20dd..323376c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "PanaceaReactNativeClient",
- "version": "2.7.0",
+ "version": "2.8.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 82bae16..ffa55ff 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "PanaceaReactNativeClient",
- "version": "2.7.0",
+ "version": "2.8.1",
"private": true,
"devDependencies": {
"babel-core": "^7.0.0-bridge.0",