diff --git a/android/app/build.gradle b/android/app/build.gradle index 8f9068114..d9b59c7dd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -140,6 +140,7 @@ android { } dependencies { + compile project(':react-native-version-number') compile project(':react-native-code-push') compile project(':realm') compile project(':react-native-fast-image') diff --git a/android/app/src/main/java/app/esteem/mobile/MainApplication.java b/android/app/src/main/java/app/esteem/mobile/MainApplication.java index 27a8664f6..6339c80b2 100644 --- a/android/app/src/main/java/app/esteem/mobile/MainApplication.java +++ b/android/app/src/main/java/app/esteem/mobile/MainApplication.java @@ -3,6 +3,7 @@ package app.esteem.mobile; import android.app.Application; import com.facebook.react.ReactApplication; +import com.apsl.versionnumber.RNVersionNumberPackage; import com.microsoft.codepush.react.CodePush; import io.realm.react.RealmReactPackage; import com.dylanvann.fastimage.FastImageViewPackage; @@ -43,6 +44,7 @@ public class MainApplication extends Application implements ReactApplication { protected List getPackages() { return Arrays.asList( new MainReactPackage(), + new RNVersionNumberPackage(), new CodePush(getResources().getString(R.string.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG), new RealmReactPackage(), new FastImageViewPackage(), diff --git a/android/settings.gradle b/android/settings.gradle index 7ef80f5b5..d3b4d8727 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'eSteem' +include ':react-native-version-number' +project(':react-native-version-number').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-number/android') include ':react-native-code-push' project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app') include ':realm' diff --git a/ios/Podfile b/ios/Podfile index 2220767c1..85cca3ab8 100755 --- a/ios/Podfile +++ b/ios/Podfile @@ -36,6 +36,8 @@ target 'eSteem' do pod 'CodePush', :path => '../node_modules/react-native-code-push' + pod 'react-native-version-number', :path => '../node_modules/react-native-version-number' + target 'eSteemTests' do inherit! :search_paths # Pods for testing diff --git a/ios/Pods/Pods.xcodeproj/xcuserdata/mistik.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/Pods/Pods.xcodeproj/xcuserdata/mistik.xcuserdatad/xcschemes/xcschememanagement.plist index 07c0bc2aa..921c959b3 100644 --- a/ios/Pods/Pods.xcodeproj/xcuserdata/mistik.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/ios/Pods/Pods.xcodeproj/xcuserdata/mistik.xcuserdatad/xcschemes/xcschememanagement.plist @@ -14,7 +14,7 @@ FLAnimatedImage.xcscheme_^#shared#^_ orderHint - 14 + 67 Folly.xcscheme @@ -82,7 +82,7 @@ SDWebImage.xcscheme_^#shared#^_ orderHint - 16 + 69 glog.xcscheme @@ -94,7 +94,7 @@ react-native-fast-image.xcscheme_^#shared#^_ orderHint - 15 + 68 SuppressBuildableAutocreation diff --git a/ios/eSteem.xcodeproj/project.pbxproj b/ios/eSteem.xcodeproj/project.pbxproj index 503e04b6f..2f22d6e21 100644 --- a/ios/eSteem.xcodeproj/project.pbxproj +++ b/ios/eSteem.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; diff --git a/ios/eSteem.xcworkspace/xcuserdata/mistik.xcuserdatad/UserInterfaceState.xcuserstate b/ios/eSteem.xcworkspace/xcuserdata/mistik.xcuserdatad/UserInterfaceState.xcuserstate index a0a55fc80..4aa21bb6e 100644 Binary files a/ios/eSteem.xcworkspace/xcuserdata/mistik.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/eSteem.xcworkspace/xcuserdata/mistik.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/eSteem/Info.plist b/ios/eSteem/Info.plist index 7fd0735fd..12b08d6e1 100755 --- a/ios/eSteem/Info.plist +++ b/ios/eSteem/Info.plist @@ -47,7 +47,7 @@ NSCameraUsageDescription To access your photos, eSteem needs your permission to help you share your photos. NSLocationWhenInUseUsageDescription - + NSMainNibFile LaunchScreen NSMicrophoneUsageDescription diff --git a/package.json b/package.json index 64f2dbdb1..f4767ccd2 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "react-native-restart": "0.0.6", "react-native-slider": "^0.11.0", "react-native-vector-icons": "^6.0.2", + "react-native-version-number": "^0.3.5", "react-native-view-overflow": "0.0.3", "react-navigation": "^2.18.3", "react-navigation-redux-helpers": "^2.0.8", diff --git a/src/components/sideMenu/view/sideMenuStyles.js b/src/components/sideMenu/view/sideMenuStyles.js index 0292681ee..566c60f81 100644 --- a/src/components/sideMenu/view/sideMenuStyles.js +++ b/src/components/sideMenu/view/sideMenuStyles.js @@ -85,5 +85,6 @@ export default EStyleSheet.create({ }, versionText: { textAlign: 'center', + color: '$iconColor', }, }); diff --git a/src/components/sideMenu/view/sideMenuView.js b/src/components/sideMenu/view/sideMenuView.js index 4992d3574..bf1a99826 100644 --- a/src/components/sideMenu/view/sideMenuView.js +++ b/src/components/sideMenu/view/sideMenuView.js @@ -5,6 +5,7 @@ import { import { injectIntl } from 'react-intl'; import LinearGradient from 'react-native-linear-gradient'; import ActionSheet from 'react-native-actionsheet'; +import VersionNumber from 'react-native-version-number'; // Components import { IconButton } from '../../buttons'; @@ -87,6 +88,7 @@ class SideMenuView extends Component { } = this.props; const { menuItems, isAddAccountIconActive } = this.state; const { version } = PackageJson; + const { buildVersion } = VersionNumber; return ( @@ -165,7 +167,7 @@ class SideMenuView extends Component { )} /> - {`v ${version}`} + {`v${version} b${buildVersion}`} (this.ActionSheet = o)} options={[intl.formatMessage({ id: 'side_menu.logout' }), intl.formatMessage({ id: 'side_menu.cancel' })]} diff --git a/yarn.lock b/yarn.lock index a52fbea0f..c16e9bd79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7088,6 +7088,11 @@ react-native-vector-icons@^6.0.2: prop-types "^15.6.2" yargs "^8.0.2" +react-native-version-number@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/react-native-version-number/-/react-native-version-number-0.3.5.tgz#90f1b49bcb5e72f801bdc22ed6bad6c7cbbc2222" + integrity sha512-iANHQrYyDSe5Yts2qVjAjFXpK5EHkJGSFAqnVa3Bu/UKBRUjhnMqvskc3EH+IIvvJH9N2Qpidm1KCq42BWa6jQ== + react-native-view-overflow@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/react-native-view-overflow/-/react-native-view-overflow-0.0.3.tgz#d7b08e8c1e5047a2cf07f3ece82025899f930674"