Skip to content

url_launcher canLaunch false for mailto links containing subject on iOS #42279

@CoreyCole

Description

@CoreyCole

Steps to Reproduce

  1. create a flutter application with the url_launcher plugin (url_launcher: 5.1.4)
  2. run app on iOS device (simulator supposedly does not work for mailto link handling)
  3. canLaunch returns true for a link without a subject
await canLaunch('mailto:placeholder@google.com') == true
  1. canLaunch returns false for a link with a subject
await canLaunch('mailto:placeholder@google.com?subject="Test Subject"') == false

From apple's documentation it seems mailto links with a subject field are supported.

Target Platform: ios
Target OS version/browser: 12.4.1
Devices: iPhone SE

Logs

[+2344 ms] flutter: launching mailto:support@storybridgeapp.com?subject="Test Subject"
[        ] flutter: can launch email? false
[+1809 ms] flutter: launching mailto:support@storybridgeapp.com
[        ] flutter: can launch email? true
# flutter analyze
   info • This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not
          final: Provider.bloc • lib/src/blocs/provider.dart:7:7 • must_be_immutable
   info • The value of the field '_observer' isn't used • lib/src/blocs/services/analytics_service.dart:19:29 • unused_field

2 issues found. (ran in 6.1s)
# flutter doctor -v
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G95, locale en-US)
    • Flutter version 1.9.1+hotfix.4 at /Users/corey/flutter
    • Framework revision cc949a8e8b (11 days ago), 2019-09-27 15:04:59 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/corey/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/corey/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/corey/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.1, Build version 11A1027
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.0.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.38.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.5.1

[✓] Connected device (1 available)
    • Omnivor iPhone SE • 4723c97b1224bdc089fdce505d12715f1a3bf37c • ios • iOS 12.4.1

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions