Code Monkey home page Code Monkey logo

react-native-version-number's People

Contributors

alvaromb avatar asutula avatar cwdn avatar enagorny avatar gvillenave avatar hhunaid avatar hkxicor avatar jcmais avatar kingdark1234 avatar lastin avatar lfkwtz avatar maxmamis avatar mmmurf avatar moreno97 avatar neilkimmett avatar oceanhorn avatar sbycrosz avatar trondwh avatar vtsatskin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-version-number's Issues

Implement autolinking for iOS

Implement autolinking so users don't need to run react native link for this dependency.

From RN CLI:

$ react-native run-ios
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
  - react-native-version-number (to unlink run: "react-native unlink react-native-version-number")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

react-native link does not link the native project for android

I'm trying to use react-native-version-number in my RN app. On iOS everything works, but on Android I get a redbox saying RNVersionNumber is undefined. Looking at my app's native android project I can see that it's not including the react-native-version-number native project at all. If I add it manually it'll fail on gradle sync with an error about the default configuration.

On further investigation, it seems that android studio (or rnpm/react-native-cli) is not able to recognize the react-native-version-number android project. It doesn't allow the submodule to be expanded when it's included in my app project and when opened directly in android studio it offers to setup gradle for the project.

Versions:
react-native-version-number: 0.3.0
react-native-cli: 2.0.1
react-native: 0.48.4
android studio: 3.0

Implement `requiresMainQueueSetup`

react-native 0.49.3 generates a warning:

Module RNVersionNumber requires main queue setup since it overrides constantsToExport but doesn't implement `requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

Doesn't show app version in ExpoKit app

this library doesn't show app version in ExpoKit project

This code doesn't return anything:

console.log(VersionNumber.appVersion);
console.log(VersionNumber.buildVersion);

Cannot read property appVersion of undefined - iOS

It works perfect in Android version, but in iOS version, I'm receiving this error.

I tried to use version 0.3.0 (Currently using 0.2.0) but I got some errors trying to install via yarn, it throws an error about access in some git files.

I already try react-native link but nothing happens.

Any clue?

screen shot 2017-11-01 at 17 15 34

`buildVersion` is not a string on Android

buildVersion is typed as ?string in the JS code.

https://github.com/APSL/react-native-version-number/blob/master/index.js#L7

type VersionObject = {
  appVersion: ?string,
  buildVersion: ?string,
  bundleIdentifier: ?string
};

However, in the Android code, versionCode from PackageInfo is used, which is a Java int

https://developer.android.com/reference/android/content/pm/PackageInfo#versionCode
https://github.com/APSL/react-native-version-number/blob/master/android/src/main/java/com/apsl/versionnumber/RNVersionNumberModule.java#L41

constants.put(APP_BUILD, packageManager.getPackageInfo(packageName, 0).versionCode);

This usually doesn't present itself as a problem, but in some cases - such as when passing this value back across the bridge - there can be problems. Probably would be best to convert it to a string before passing it over the bridge the first time.

showing different version name in react-native - "0.63.3","react-native-version-number": "^0.3.6",

app/build.gradle

defaultConfig { applicationId "com.app.demo" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "0.1" multiDexEnabled true missingDimensionStrategy 'react-native-camera', 'general' missingDimensionStrategy 'store', 'play' }

instead of 0.1 they are showing 2097153

Here is code

import VersionNumber from 'react-native-version-number';
console.log('buildVersion', VersionNumber.buildVersion);

Type definition does not match JavaScript code

In the JavaScript code there is a default export, the type definition exports the values separately.
This results into an error if you deactivate "allowSyntheticDefaultImports" in the tsconfig.json.

The type definition should looks like:

declare module 'react-native-version-number' {
	export default {
		appVersion: string,
		buildVersion: string,
		bundleIdentifier: string
	}
}

The SDK Build Tools revision (23.0.1) is too low for project ':react-native-version-number'. Minimum required is 25.0.0

Hi I get this error after installing this package.

Changing the SDK build tools revision to 25.0.0 gives me the following error:

`AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:TextAppearance.Material.Widget.Button.Borderless.Colored\u0027.","sources":[{"file":"/Users/Pin/Desktop/Workspace-Official/MiFun/ReactNative/EthMall/node_modules/react-native-version-number/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:TextAppearance.Material.Widget.Button.Colored\u0027.","sources":[{"file":"/Users/Pin/Desktop/Workspace-Official/MiFun/ReactNative/EthMall/node_modules/react-native-version-number/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml","position":{"startLine":3}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027android:keyboardNavigationCluster\u0027.","sources":[{"file":"/Users/Pin/Desktop/Workspace-Official/MiFun/ReactNative/EthMall/node_modules/react-native-version-number/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml","position":{"startLine":14,"startColumn":20,"startOffset":832,"endColumn":53,"endOffset":865}}],"original":"","tool":"AAPT"}
/Users/Pin/Desktop/Workspace-Official/MiFun/ReactNative/EthMall/node_modules/react-native-version-number/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/Pin/Desktop/Workspace-Official/MiFun/ReactNative/EthMall/node_modules/react-native-version-number/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/Users/Pin/Desktop/Workspace-Official/MiFun/ReactNative/EthMall/node_modules/react-native-version-number/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

:react-native-version-number:processDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-version-number:processDebugResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt`

Release app errors

Hi
Please use config in "build.gradle" file like this:

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
compileSdkVersion safeExtGet('compileSdkVersion', 26)
.......
}
.........

if i don't have buildToolsVersion 23.0.1 or sdk 23 when i release APK, i will receive some errors

Thanks

error: Error: Unable to resolve module child_process

Step1. myapp

yarn add react-native-version --dev

Step2. package.json

+   "postversion": "react-native-version"

Step3.

npm version patch

Step4.

yarn android

error

image

version info

Expo CLI 4.4.1 environment info:
    System:
      OS: Windows 10 10.0.19042
    Binaries:
      Node: 15.11.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Users\Administrator\AppData\Roaming\npm\yarn.CMD
      npm: 7.6.3 - C:\Program Files\nodejs\npm.CMD
    SDKs:
      Android SDK:
        API Levels: 28, 29, 30
        Build Tools: 28.0.3, 29.0.2, 30.0.3
        System Images: android-28 | Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: Version  4.1.0.0 AI-201.8743.12.41.7042882
    npmPackages:
      expo: ~40.0.0 => 40.0.0
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: 0.63.4 => 0.63.4
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: bare

Undefined appVersion on Android crashes app

While implementing this package in Android I am having an issue while importing the module.

As soon as the module is added to the view I get that appVersion is not an object.

screenshot 2017-09-19 14 06 36

Getting 'undefined' when running on iOS

Returns undefined when trying to print out version number on iOS device:

console.log('versionNumber ', VersionNumber)
{appVersion: undefined, buildVersion: undefined, bundleIdentifier: undefined}

Tested on iOS 11.4 iPhone 8 (simulator and device)

Error with linking

I had to manually link it to MainApplication.java

import com.apsl.versionnumber.RNVersionNumberPackage;  <-- add this
@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
	  new RNVersionNumberPackage(),  <-- add this
          new MainReactPackage()
      );
    }
`

Repeatedly performing npm-install fails with EISGIT: Appears to be a git repo or submodule

When repeatedly performing npm install with a dependency on react-native-version-number, npm fails with the error code EISGIT.

I have declared a dependency on on react-native-version-number in my package.json like so:

  ...
  "dependencies": {
    "react-native-version-number": ">=0.2.0",
    ...
  },
  ...

Performing npm install for the first time succeeds. Performing npm install immediately again will fail:

$ rm -rf node_modules/
$ npm install
$ <installation succeeds>
$
$ npm install
npm ERR! path <path/to/project/root>/node_modules/react-native-version-number
npm ERR! code EISGIT
npm ERR! git <path/to/project/root>/node_modules/react-native-version-number: Appears to be a git repo or submodule.
npm ERR! git     <path/to/project/root>/node_modules/react-native-version-number
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

When inspecting the installed react-native-version-number module in node_modules, I found that the module contains a .git file.

Any help resolving this failure would be much appreciated. Thanks!

git Refusing to remove it. Update manually

$ npm install
npm ERR! code EISGIT
npm ERR! path .............................................\node_modules\protractor-retry
npm ERR! git ..................................................\node_modules\protractor-retry: Appears to be a git repo or submodule.
npm ERR! git .........................................................................\node_modules\protractor-retry
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

is this project dead?

Just wondering if this project is dead. There are a few PRs open, but nothing has happened so far.

I mean information on how to use it on iOS can't be that hard to merge and should have been added from the start.

Many issues with CeBuilder and ListPro

Ive installed all of the required plugins but in CeBuilder. Step 2 does not let me move forward. It doesnt recognize the installs.
Screen Shot 2020-04-03 at 10 51 47 PM
Ive upgraded to SDK 37 and I get errors.
Simulator Screen Shot - iPhone 11 Pro Max - 2020-04-03 at 22 39 30

Package.json


{
"name": "listpro",
"version": "1.3.5",
"description": "ListPro",
"author": "InspireUI",
"private": true,
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"setup": "./scripts/setup.sh",
"detach": "./scripts/detach.sh",
"start": "expo start -c",
"postinstall": "patch-package"
},
"dependencies": {
"@appandflow/masonry-list": "^0.4.0",
"@babel/plugin-proposal-decorators": "^7.4.0",
"api-ecommerce": "0.0.29",
"axios": "^0.18.0",
"base-64": "^0.1.0",
"create-react-class": "^15.6.2",
"crypto-js": "^3.1.9-1",
"currency-formatter": "1.5.4",
"emoji-utils": "^1.0.1",
"expo": "^37.0.0",
"expo-analytics": "1.0.8",
"firebase": "6.0.2",
"hoist-non-react-statics": "3.3.0",
"html-entities": "^1.2.1",
"lodash": "^4.17.11",
"moment": "2.24.0",
"oauth-1.0a": "1.0.1",
"patch-package": "^6.1.2",
"postinstall-postinstall": "^2.0.0",
"prop-types": "15.7.2",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz",
"react-native-animatable": "1.3.2",
"react-native-button": "2.4.0",
"react-native-collapsible": "^1.3.0",
"react-native-dates": "^2.0.4",
"react-native-dropdownalert": "3.11.0",
"react-native-gifted-chat": "0.8.2",
"react-native-google-places-autocomplete": "^1.3.9",
"react-native-invertible-scroll-view": "^1.1.0",
"react-native-keyboard-aware-scroll-view": "0.8.0",
"react-native-map-link": "2.4.0",
"react-native-modal-datetime-picker": "7.4.2",
"react-native-modalbox": "1.7.1",
"react-native-onboarding-component": "0.0.5",
"react-native-onesignal": "3.2.13",
"react-native-parallax-swiper": "^1.1.7",
"react-native-progress-bar-animated": "^1.0.6",
"react-native-render-html": "4.1.2",
"react-native-root-toast": "^3.0.2",
"react-native-safe-area-view": "0.14.3",
"react-native-scrollable-tab-view": "^0.10.0",
"react-native-slider": "0.11.0",
"react-native-snap-carousel": "3.7.5",
"react-native-swipe-list-view": "1.5.3",
"react-native-swiper": "^1.5.14",
"react-native-tab-view": "2.3.0",
"react-native-tag-select": "^2.0.0",
"react-native-textinput-effects": "0.5.1",
"react-native-timeago": "^0.4.0",
"react-native-vector-icons": "6.4.2",
"react-navigation": "^3.11.0",
"react-redux": "5.1.1",
"react-timer-mixin": "^0.13.3",
"react-tween-state": "^0.1.5",
"redux": "4.0.1",
"redux-persist": "^5.6.5",
"redux-thunk": "^2.2.0",
"sanitize-html": "1.20.1",
"schedule": "0.4.0",
"sentry-expo": "1.13.0",
"tcomb-form-native": "^0.6.20",
"urijs": "^1.19.0",
"url": "^0.11.0",
"util": "0.12.0",
"wpapi": "1.2.1",
"xdate": "^0.8.2",
"expo-ads-facebook": "~8.1.0",
"expo-localization": "~8.1.0"
},
"devDependencies": {
"@babel/core": "7.4.4",
"@babel/plugin-transform-runtime": "7.4.4",
"@babel/preset-env": "7.4.4",
"babel-jest": "24.8.0",
"babel-plugin-module-resolver": "3.2.0",
"babel-polyfill": "^6.26.0",
"babel-preset-expo": "^8.1.0",
"babel-preset-react-native": "4.0.1",
"path": "^0.12.7",
"reactotron-react-native": "3.5.2",
"reactotron-redux": "3.1.0"
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.