Git Product home page Git Product logo

Comments (4)

cas8398 avatar cas8398 commented on June 1, 2024

you need add manual app id.

import { CheckVersionOptions, checkVersion } from "react-native-check-version";


const options: CheckVersionOptions = {
      bundleId: "com.example.id", // Replace with your bundle ID
    };


const appVersion = await checkVersion(options); // Handle the response
console.log(appVersion);
console.log("App version:", appVersion.version);
console.log("App needs update:", appVersion.needsUpdate);
console.log("Update URL:", appVersion.url);

from react-native-check-version.

kriit24 avatar kriit24 commented on June 1, 2024

hi, now it worked but it shows "needsUpdate" true, but i have the latest version.

{"bundleId": "com.project.cronimetcrm", "lastChecked": "2024-04-06T03:50:45.664Z", "needsUpdate": true, "notes": "", "notice": "Invalid version. Must be a string. Got type \"object\".", "platform": "android", "releasedAt": "2024-04-06T03:50:45.663Z", "updateType": "minor", "url": "https://play.google.com/store/apps/details?id=com.project.cronimetcrm&hl=us", "version": "1.0.1"}

*** EDIT ***
i added currentVersion to option and now its shows correct info
{"bundleId": "com.project.cronimetcrm", "lastChecked": "2024-04-06T03:56:42.409Z", "needsUpdate": false, "notes": "", "platform": "android", "releasedAt": "2024-04-06T03:56:42.409Z", "updateType": null, "url": "https://play.google.com/store/apps/details?id=com.project.cronimetcrm&hl=us", "version": "1.0.1"}

from react-native-check-version.

cas8398 avatar cas8398 commented on June 1, 2024

great, you need re-run yarn android or npm android. for auto check your bundleId and currentVersion.

const appVersion = await checkVersion(); // now you can remove option

from react-native-check-version.

kriit24 avatar kriit24 commented on June 1, 2024

now, the second thing is with IOS.
the error is - Error: App for this bundle ID not found.
this error is not only with "react-native-check-version" package, but also with similar packages.
This is the first time I've received feedback.
And the ios buindleid is different from android.

options:
Object { "bundleId": "com.project.cronimetcrmv2", "country": "et", "currentVersion": "1.0.1", }

result:
Object { "bundleId": "com.project.cronimetcrmv2", "country": "et", "error": [Error: App for this bundle ID not found.], "lastChecked": "2024-04-06T08:28:20.050Z", "needsUpdate": false, "notes": "", "platform": "ios", "url": null, "version": null, }

from react-native-check-version.

Related Issues (20)

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.