upgrader icon indicating copy to clipboard operation
upgrader copied to clipboard

Do you support iosSimulator/ androidEmulator?

Open mafreud opened this issue 1 year ago • 6 comments

Do you support iosSimulator / androidEmulator?

In simulator/emulator, I got these error messages.

flutter: upgrader.ITunesResults.version: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader.ITunesResults.trackViewUrl: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader.ITunesResults.releaseNotes: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader.ITunesResults.description: RangeError (index): Invalid value: Valid value range is empty: 0

mafreud avatar Apr 14 '23 16:04 mafreud

Experiencing the same issue here.

Also, is it normal for iOS's debug logging appStoreVersion to be 'null'? (Anyone can assist with answering this). Thanks!

naturalDev0 avatar May 04 '23 09:05 naturalDev0

Yes, upgrader works fine with the simulator and emulator. Do these apps have published apps in the stores? Can you include the full upgrader log here?

larryaasen avatar May 05 '23 11:05 larryaasen

hi @larryaasen, you can refer to the following logs.

flutter: upgrader: instantiated.
flutter: UpgradeCard: build UpgradeCard
flutter: upgrader: languageCode: en
flutter: upgrader: default operatingSystem: ios Version 16.2 (Build 20C52)
flutter: upgrader: operatingSystem: ios
flutter: upgrader: platform: TargetPlatform.iOS
flutter: upgrader: isAndroid: false, isIOS: true, isLinux: false, isMacOS: false, isWindows: false, isFuchsia: false, isWeb: false
flutter: upgrader: package info packageName: com.company.department
flutter: upgrader: package info appName: MSS Nexus
flutter: upgrader: package info version: 2.2.7
flutter: upgrader: countryCode: US
flutter: upgrader: languageCode: en
flutter: upgrader.ITunesResults.version: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader.ITunesResults.trackViewUrl: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader.ITunesResults.releaseNotes: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader.ITunesResults.description: RangeError (index): Invalid value: Valid value range is empty: 0
flutter: upgrader: blocked: false
flutter: upgrader: debugDisplayAlways: false
flutter: upgrader: debugDisplayOnce: false
flutter: upgrader: hasAlerted: false
flutter: upgrader: appStoreVersion: null
flutter: upgrader: installedVersion: 2.2.7
flutter: upgrader: minAppVersion: null
flutter: upgrader: isUpdateAvailable: false
flutter: upgrader: shouldDisplayUpgrade: false
flutter: UpgradeCard: will not display

Please let me know what can I do to make it work for the simulator. thank you! and looking forward to your wizardry.

naturalDev0 avatar May 08 '23 09:05 naturalDev0

@naturalDev0 The upgrader package looks in the App Store for the listed app and finds the version number published in the store. When the app has not been published yet, or it cannot find the app using the bundle id com.company.department, it will not be able to determine the version. This is what is being returned from the App Store:


{
 "resultCount":0,
 "results": []
}

Has your app been published yet?

To see upgrader work before the app has been published, use this parameter:

upgrader: Upgrader(debugDisplayAlways: true)

Use that only while debugging your app and do not leave that in for a release.

larryaasen avatar May 08 '23 11:05 larryaasen

@larryaasen thanks for the clarification! The API query service that you used I believe it to be from iTunes?

I think the problem lies on my end that it seems the app is hidden from the public... thus the difficulty in finding it on app store and not play store. Regarding this, could anyone advise what is this mode I could switch on/off so the visibility can be toggled as and when I desire?

Also, thanks for the tips mentioned in the later paragraph, definitely will bear in mind as development goes on.

naturalDev0 avatar May 08 '23 13:05 naturalDev0

[ final Upgrader upGrader = Upgrader(debugDisplayAlways: true);

void get _checkForceUpdate async { //com.mobisharks.lawyer final minAppVersion = upGrader.minAppVersion; final currentVersion = upGrader.currentInstalledVersion(); final storeVersion = upGrader.currentAppStoreVersion(); log("mm: $minAppVersion,cc: $currentVersion, ss: $storeVersion");

final iTunes = ITunesSearchAPI();
final resultsFuture = await iTunes.lookupByBundleId(
  'com.mobisharks.lawyer',
);
print('results: ${resultsFuture}');

}](url)

Result: mm: null,cc: null, ss: null - but Itunes lookup founded @larryaasen

samatzp avatar Dec 08 '23 11:12 samatzp

Look at the latest version of this package with a latest customization options. I think it now meets your needs. If not, please open a new issue with your details.

larryaasen avatar Apr 07 '24 12:04 larryaasen

@larryaasen thank you!

mafreud avatar Apr 07 '24 14:04 mafreud