question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VersionCheck.needUpdate() returns undefined in IOS

See original GitHub issue

This is the code I’m using

VersionCheck.needUpdate().then(res => {
      console.log("res version check >>>>>> ", res); // undefined on iOS
      if (res.isNeeded) {
        this.setState({
          showNewVersionModal: true
        });
      }
    });

it works fine on Android but on iOS it returns undefined

Version: “react-native-version-check”: “^3.3.0”, “react-native”: “^0.57.8”,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:15

github_iconTop GitHub Comments

4reactions
bahtiyarerdencommented, Jan 26, 2021

I installed this package with autolinking but this problem still exist.

1reaction
iwangsyahcommented, May 5, 2022

You can check your app url in browser, maybe they has a specific country code. you can add params for country code like this VersionCheck.needUpdate({country: <your-country-code>})

This works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

VersionCheck.needUpdate() returning undefined in ios
VersionCheck .needUpdate() .then(res => { console.log('needUpdate: ', res); }. res is returning undefined in ios.
Read more >
react native version check package make app crash
needUpdate() .then(async res => { console.log(res. ... version "react-native-version-check": "^3.4.3", is up to date documentation link: ...
Read more >
react-native-version-check - npm
A version checker for react-native applications. Latest version: 3.4.3, last published: 6 months ago. Start using react-native-version-check ...
Read more >
Get latest available version for user appstore and play market ...
import VersionCheck from 'react-native-version-check'; import {Linking } from 'react-native'; versioncontrol = async () =>{ VersionCheck.needUpdate() ...
Read more >
Top 5 react-native-version-check Code Examples - Snyk
Learn more about how to use react-native-version-check, based on react-native-version-check code examples created from the most popular ways it is used in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found