Repository navigation
Lexical or Preprocessor Issue (Xcode): Redefinition of module 'image_picker_ios' #148307
Copy link
Copy link
Closed
Closed
Copy link
Labels
found in release: 3.22Found to occur in 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
Steps to reproduce
- Add image_picker: ^1.1.1 to pubspec.yaml
- flutter clean
- flutter pub get
- cd ios
- rm -rf Pods Podfile.lock
- pod cache clean --allpod
- pod install
- flutter run
Expected results
Application build successfully and opening the app
Actual results
Lexical or Preprocessor Issue (Xcode): Redefinition of module 'image_picker_ios' /Users/user/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.11+1/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap:0:7
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.0, on macOS 12.7.4 21H1123 darwin-x64, locale en-IT)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[!] Android Studio (version unknown)
✗ Unable to determine Android Studio version.
[✓] VS Code (version 1.86.1)
[✓] Connected device (4 available)
[✓] Network resources
! Doctor found issues in 3 categories.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
found in release: 3.22Found to occur in 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Activity
darshankawar commentedon May 14, 2024
Thanks for the report. I am able to replicate this behavior in a demo existing app in which I get below:
I also created a new Flutter project, just added
image_pickerand then tried to run via Xcode in which I get below error:Keeping the issue open for team's input / attention on reported behavior.
stable, master flutter doctor -v
mu7mmd commentedon May 14, 2024
@darshankawar, Thank you for your response. When I downgraded to version 3.19.6, I encountered the same issue. However, when I further downgraded to version 3.19.5, the problem was resolved and it functioned correctly.
loic-sharma commentedon May 14, 2024
This might have been caused by the Swift Package Manager migration done in
package:image_picker_iosversion 0.8.11, /cc @vashworthloic-sharma commentedon May 14, 2024
I wasn't able to reproduce this using Xcode 15.0 and newer. I suspect this only happens on Xcode 14.
Could you try the following workarounds:
package:image_picker_iosversion 0.8.10 or older? This is before Swift Package Manager support was addedPlease let us know which of these options, if any, fix this issue. That'll help us understand this build error better.
14 remaining items
[file_selector_ios, image_picker_ios] Remove Swift Package Support (#…
vashworth commentedon May 16, 2024
Issue should be resolved with latest version of image_picker_ios (image_picker_ios-0.8.10+2). Try
flutter pub upgradeEmmyTechnology commentedon May 17, 2024
it works for me. Thanks
loic-sharma commentedon May 20, 2024
Please let us know if anyone can reproduce this issue after using
flutter pub upgrade![file_selector_ios, image_picker_ios] Remove Swift Package Support (f…
[image_picker_ios] Re-adds Swift Package Manager compatibility (#6833)
github-actions commentedon Jun 10, 2024
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Jun 24, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.