3

I'm trying to use the Flutter url_launcher package to create a feedback form template. It worked well so far but I recently did a major package versioning upgrade and now it seems like something is going wrong in the translation of the placeholders.

    final Uri _emailLaunchUri = Uri(
      scheme: 'mailto',
      path: recipient,
      queryParameters: {
        'subject': subject,
        'body': body,
      },
    );

    var newurl = _emailLaunchUri.toString();
    return newurl;

The upper is my chunk of code to generate the uri and eventually return the new launch url including some Device information. Printing it out leads to the following output in the console:

mailto:support@support.de?subject=Feedback%3A+App+Name%28Subtitle%29&body=Dear+developers%2C%0D%0A%0D%0AiOS+version%3A+14.6%0D%0Amodel%3A+iPhone11%2C8%0D%0A

So far so good I guess, but that's how it ends up to look in my app (tested on a physical iPhone):

Screenshot

Is there anything I miss or that Apple might have changed in the recent iOS versions? My iPhone is using version 14.6. I figured out to replace the "+" with a %20 instead (seems to be a package error), but I'm not sure how to convert the line breaks correctly.

Would appreciate any help.

patreu22
  • 2,988
  • 4
  • 22
  • 31
  • 5
    Have the same issue with React Native Linking. Seems to be new in iOS 14.6 only. Somebody filed a bug already. Hopefully it is a bug that will be fixed... and not a security feature – zinne Jun 14 '21 at 07:03
  • https://developer.apple.com/forums/thread/681023 – Henadzi Rabkin Aug 24 '21 at 11:13

0 Answers0