Skip to content

[image_picker][iOS]: pickMultiImage throws an invalid type cast exception on iOS 12 #100132

@jonasfranz

Description

@jonasfranz

Steps to Reproduce

  1. Execute the code sample on an iOS 12 device (in my case iOS 12.4)
  2. Select an image from the library
  3. image_picker will throw the exception shown in logs

It should use the legacy image picker instead of throwing the exception since flutter/plugins#4718 got implemented.

Expected results: List of XFile with the selected image inside

Actual results: Exception type 'String' is not a subtype of type 'List<dynamic>?' in type cast

Code sample
await picker.pickMultiImage()
Logs
flutter: type 'String' is not a subtype of type 'List<dynamic>?' in type cast
flutter: #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:41)
<asynchronous suspension>
#1      MethodChannelImagePicker.getMultiImage (package:image_picker_platform_interface/src/method_channel/method_channel_image_picker.dart:206:34)
<asynchronous suspension>

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: crashStack traces logged to the consolee: OS-version specificAffects only some versions of the relevant operating systemfound in release: 2.10Found to occur in 2.10found in release: 2.13Found to occur in 2.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: image_pickerThe Image Picker plugin.packageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions