Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: PlatformException(Error, Error while launching https://apps.apple.com/de/app/snapchat/id447188370?uo=4, null, null) #12

Open
md186 opened this issue Feb 10, 2023 · 0 comments

Comments

@md186
Copy link

md186 commented Feb 10, 2023

Hello,

I created an update window and I used snapchat as test app to force an update. Im developing on an iPhone 14 simulator running iOS 16.2. Im getting Unhandled Exception: PlatformException(Error, Error while launching https://apps.apple.com/de/app/snapchat/id447188370?uo=4, null, null) when clicking the update button, but the link is correct. Below is the code im using leaving out the UI part which is not relevant:

 String? version = '';
  String? storeVersion = '';
  String? storeUrl = '';
  String? packageName = '';

  final versionCheck = VersionCheck(
    packageName: Platform.isIOS
        ? 'com.toyopagroup.picaboo'
        : '',
    packageVersion: '12.0.0',
    showUpdateDialog: customShowUpdateDialog,
    country: 'DE',
  );

  

 Future checkVersion() async {
    await versionCheck.checkVersion(context);
    setState(() {
      version = versionCheck.packageVersion;
      packageName = versionCheck.packageName;
      storeVersion = versionCheck.storeVersion;
      storeUrl = versionCheck.storeUrl;
    });

    print(version);
     print(packageName);
      print(storeVersion);
       print(storeUrl);
  }

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

the print outputs:

flutter: 12.0.0
flutter: com.toyopagroup.picaboo
flutter: 12.20.0.32
flutter: https://apps.apple.com/de/app/snapchat/id447188370?uo=4

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Error, Error while launching https://apps.apple.com/de/app/snapchat/id447188370?uo=4, null, null)
#0      StandardMethodCodec.decodeEnvelope
message_codecs.dart:653
#1      MethodChannel._invokeMethod
platform_channel.dart:296
<asynchronous suspension>
#2      VersionCheck.launchStore
version_check.dart:98
<asynchronous suspension>
#3      customShowUpdateDialog.<anonymous closure>.<anonymous closure>
app_wrapper.dart:149
<asynchronous suspension>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant