Code Monkey home page Code Monkey logo

new_version's People

Contributors

2shrestha22 avatar benitogonzalezh avatar goltvik avatar mauriziopinotti avatar mayroncachina avatar pmagnuson avatar sachin-dahal avatar sachinganesh avatar timtraversy avatar vxern 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  avatar

new_version's Issues

Update url_launcher package

Currently my app is using url_launcher package with the latest version, when trying to install this new_version package, this error message pops up:

$ flutter pub get
"Because every version of new_version depends on url_launcher ^4.0.3 and <MY_APP_NAME> depends on url_launcher ^5.4.1, new_version is forbidden. So, because <MY_APP_NAME> depends on new_version ^0.0.4, version solving failed."

I believe you need to update your url_launcher package to solve this problem, thank you.

Text widget param

Please, add a option to pass a text widget instead of string. Thanks.

Value invalid range error

2021-08-11 16:39:25.576776+0500 Runner[6227:4820110] flutter: connected 2021-08-11 16:39:26.751187+0500 Runner[6227:4820110] [VERBOSE-2:ui_dart_state.cc(213)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0 #0 List.[] (dart:core-patch/growable_array.dart:254:60) #1 NewVersion._getiOSStoreVersion (package:new_version/new_version.dart:127:39)

My bundle Id is com.healthSolutions.healthService.iOS.
I am struck at this for last 3 days where I am giving the correct bundle Id.

|| --- Attaching Screenshot --- ||

Screenshot 2021-08-11 at 4 56 20 PM

Country for store link

Please add a feature to set the country where the appstore,playstore get the version of the app.

Possible to add a stream

Hi, I see that the only option of receiving the App Store version data is through a Future. It might be a good reason for why that is, but in case I want to force the user to update, I would need the information about a newer version to come through asap. So the rebuilds and I can tell the user to update before he does anything crazy, is there a possibility to add a stream as well, that would send data when a newer version is available?

canUpdate logic

I ran into a case where the new app version is 1.10.1 and the store version is 1.9.4. In this case the comparison logic fails, and reports that an update is available.

After a couple of iterations, I settled on the following code for the comparison. There is probably a better way.

bool get canUpdate {
    final localFields = localVersion.split('.');
    final storeFields = storeVersion.split('.');
    String localPad = '';
    String storePad = '';
    for (int i = 0; i < storeFields.length; i++) {
      localPad = localPad + localFields[i].padLeft(3, '0');
      storePad = storePad + storeFields[i].padLeft(3, '0');
    }
    if (localPad.compareTo(storePad) < 0)
      return true;
    else
      return false;
  }

Feature request

Lets say my local version is 2.0.0 but app store version is 1.0.0. Now, the logic of this package returns that the app can still be updated, so it is quite important to always confirm that the version number is smaller than the app store version.

Another feature is to provide a way to customize the text of the dialog.

Thank you so much and really appreciate if you could make such changes.

Error when trying the sample code

When I followed the example code:
` @OverRide
void initState() {
super.initState();

// Implementation is here
final newVersion = NewVersion(
  iOSId: 'com.google.Vespa',
  androidId: 'com.google.android.apps.cloudconsole',    // I used my own Id here I just copied your sample code..
);
newVersion.showAlertIfNecessary(context: context);

}

it will give error like that in the image.. but I only just followed the sample code...
Screen Shot 2021-05-12 at 10 39 35 AM

No alert

I used this plug-in in my app.. But app not showing alert if play store version is installed..... And when I tried it with debug mode.. It shows alert, but in that case play store shows only Open option instead of Update..
Sorry for my bad communication skills

Customize the Popup dialog ?

I dont seem to find a way to customize the buttons or their style. It'd be nice to give more flexibility on this.

Return release notes for store version

  1. Please with this package, can I customize the update message?

  2. Is there a way to get the release note from the server?

Thank you very much for this package

In iOS I can't get the correct version from the store

Sometimes I run the code with seconds of difference and it is very rare, the first time it brings me a value for example. 1.1.1 and then 1.1.2

Sorry but i new here !!

Screen Shot 2021-09-13 at 20 48 21

![23630](https://user-images.githubusercontent.com/64325299/133250283-55da2c3d-6993-41e7-8073-8739ec106565.jpg)

Exception is thrown when app is not in the app store

When the app is not in the app store an exception is thrown during getVersionStatus():

RangeError (index): Invalid value: Valid value range is empty: 0)

obraz

obraz

On Android function works just fine returning null version status and notifying that version status could not be retrieved with debug print.

Problem to closing the dialog

Hello, I had some problems using on Android plugin when I clicked the button to close the dialog.

Using Navigator.pop (context) removed my overlapping page. Checking the documentation of showDialog I found this: https://api.flutter.dev/flutter/material/showDialog.html

/// If the application has multiple [Navigator] objects, it may be necessary to
/// call `Navigator.of (context, rootNavigator: true) .pop (result)` to close the
/// dialog rather than just `Navigator.pop (context, result)`.

After making the change, it worked perfectly and I believe there will be no problem if it is changed ....

Taking advantage of it I made some changes so that it has more optional parameters in the constructor, to be more customizable ...

Getting web page does not exist error (Android)

Today, my app's new version is published on Google Play Store. I had an old version of my app installed in my device. When I started the app, it asked me to update the app. But when I click the link, I got "web page does not exists" error.

intent://play.app.goo.gl/?link=https://play.google.com/store/apps/details?id%3Dcom.swoddy.swoddy_app#Intent;package=com.google.android.gms;scheme=https;S.browsefallback_url=https://play.google.com/store/apps/details%3Fid%3Dcom.swoddy.swoddy_app;end;

120661238_335267921113773_6334398577225980652_n

I have the latest version of new_version package (v0.0.5).

Failed host lookup: 'play.google.com'

Hi!
Thx for all the work You did with plugin!
However I struggle to get it going...

I get:
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: SocketException: Failed host lookup: 'play.google.com' (OS Error: No address associated with hostname, errno = 7)
while traing to invoke: showAlertIfNecessary.
My app have all Internet rights.
App is published on play store, and I debug it by implamanting code, and descreesing version lvl.

Any ideas?
Thx a lot for any help

Exception not checked

I have currently tested the lib. but you did not provide exception checker on these two methods :

  • _getiOSStoreVersion()
  • _getAndroidStoreVersion()

I would have branched the changes I did on my forked project, but I'm not able !
Just adding try...catch to returned values:

FOR IOS: _getiOSStoreVersion()
try { return VersionStatus._( localVersion: packageInfo.version, storeVersion: jsonObj['results'][0]['version'], appStoreLink: jsonObj['results'][0]['trackViewUrl'], releaseNotes: jsonObj['results'][0]['releaseNotes'], ); } catch (exc) { return null; }

FOR ANDROID: _getAndroidStoreVersion()
try { return VersionStatus._( localVersion: packageInfo.version, storeVersion: storeVersion, appStoreLink: uri.toString(), releaseNotes: releaseNotes, ); } catch (exc) { return null; }

Error in run Pub get with adding new virsion

Because new_version >=0.1.0 depends on http ^0.13.1 and google_fonts <2.0.0-nullsafety.0 depends on http ^0.12.0+2, new_version >=0.1.0 is incompatible with google_fonts <2.0.0-nullsafety.0.
So, because buy_app_flutter depends on both google_fonts ^0.3.5 and new_version ^0.2.0, version solving failed.
pub get failed (1; So, because buy_app_flutter depends on both google_fonts ^0.3.5 and new_version ^0.2.0, version solving failed.)
Process finished with exit code 1

Error in iOS

Even when the application id does not exist, the request returns status 200. Therefore, it generates an error when obtaining the results [0] in the array.
Captura de Tela 2020-10-06 às 17 03 04

A suggestion would also be to provide the option of passing the title and message of the dialog by parameter so that we can use other languages.

I look forward to it.

Thank you.

Update Reminder

Does the package have a feature to remind users after some days to update incase they click on “Ignore”?

iOS version Issue

Hello, guys!
I have an issue with this package for ios.
I have submitted new version ios to the app store and approved.
But still get old version for ios store version.

Who can guide me how to solve this issue?
It is very important thing for me. Cuz I should make our customers force upgrade to new version.

Thanks

Force update

Hey,

I would like to disable possibility to hide/close popup if the app is not updated.

Edit

I dont want to close the dialog on backdrop click.

Version updates should always be prompted only when there is an update

Hi great developer!

I like this package very much and have already used it in several apps.

However, the default for this package is to explicitly check the status to see if an update is available. For example, in the following case.

   final newVersion =
        NewVersion(androidId: FlavorConfig.instance.variables['androidId']);
    final status = await newVersion.getVersionStatus();

   // ↓ This
    if (status!.canUpdate) {
      newVersion.showUpdateDialog(
        context: context,
        versionStatus: status,
        dialogTitle: 'New Version Is Available!',
        updateButtonText: 'Update Right Now',
        dismissButtonText: 'Skip',
      );
    }

I didn't know about the canUpdate method when I first started using this package, and I thought that the package was doing this internally. And what happened was that I got this dialog even in the same case as the current version.

Are there any design circumstances that would require this to be done this way? I imagine that updates may remove internal processing from the app, but the version will always go up, and I don't see the benefit of using canUpdate to determine when to implement using this package.

Anyway thanks for the amazing development!

not able to get local version IOS

[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
#0 List.[] (dart:core-patch/growable_array.dart:254:60)
#1 NewVersion._getiOSStoreVersion (package:new_version/new_version.dart:126:39)

#2 _HomeScreenState._checkVersion (package:alert_update_version/main.dart:47:20)

Test the feature

I want to be able to test the feature without changing the version of the app. How can I do it?

NewVersion(context: context).showAlertIfNecessary();

Idea:

  • Add debug: true param to showAlertIfNecessary
NewVersion(context: context).showAlertIfNecessary(debug: true);

Can't fetch version status

The argument type 'VersionStatus?' can't be assigned to the parameter type 'VersionStatus'

This is my code

final versionStatus = await newversion.getVersionStatus();
newversion.showUpdateDialog(context: context, versionStatus: versionStatus);

When my local app version and PlayStore version are the same after that show this pop-up.

I don't know why I'm facing this issue. When my local app version and PlayStore version are the same after that show this pop-up.

I'm using very simple code and default code

  @override
   void initState() {
      super.initState();
      ...
      checkVersion();
    }

  void checkVersion() async {
    final newVersion = NewVersion(
      androidId: "banda.app",
    );

  final status = await newVersion.getVersionStatus();
  newVersion.showUpdateDialog(
    versionStatus: status,
    context: context,
  );
}

This is a Screenshot:- https://user-images.githubusercontent.com/53011602/133896317-4ba20fa4-0e10-4c05-b02f-193073fe070b.jpg

This code work on our project.

  @override
   void initState() {
      super.initState();
      ...
      checkVersion();
    }
void checkVersion() async {
  final newVersion = NewVersion(
    androidId: "banda.app",
  );

  final status = await newVersion.getVersionStatus();

// I'm checking manual add If condition
 if (status.localVersion != status.storeVersion) {
    newVersion.showUpdateDialog(
      versionStatus: status,
      context: context,
    );
  }
}

canUpdate problem

new_version 0.2.0

final status = await newVersion.getVersionStatus();
status.canUpdate // (true)
status.localVersion // (1.2.1)
status.storeVersion // (1.2.3)

update button

update button for our application is not showing in play store, even store version is greater than local version

Error when calling showUpdateDialog in MaterialApp

E/flutter (24494): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: setState() or markNeedsBuild() called during build.
E/flutter (24494): This Overlay widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase.

Error in iOS - Cannot find package name on API.

Hey.
Thanks for your nice plugin.

I have a weird issue,
The package does not recognize that my app exists at all.

I'm not sure if it's your issue, or something wrong with the App Store,
But the api you're connecting to returning 0 results for my package name.

Is there should be any special settings for the API to recognize the application?

It's published in App Store (only for certain countries).

Will appreciate some help in here regarding this.

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.