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

iOS - Pickers not showing as part of module, but works when run as standalone. #525

Closed
Jimmybee opened this issue Dec 1, 2020 · 2 comments
Labels
help wanted Extra attention is needed iOS Issue applies to iOS platform

Comments

@Jimmybee
Copy link

Jimmybee commented Dec 1, 2020

Describe the bug
Using FilePickerResult result = await FilePicker.platform.pickFiles(type: FileType.image); works fine when running as a straight forward Flutter project in the iOS simulator, showing both gallery picker and file picker.

Neither picker is appearing when using it as a flutter module in an iOS project.

Issue details

  1. iOS
  2. iOS 14.2

Error Log
n/a

Screenshots and/or video
If applicable, add screenshots or video to help explain your problem.

Flutter Version details
[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-GB)
• Flutter version 1.22.4 at /Users/jamesbirtwell/development/flutter
• Framework revision 1aafb3a8b9 (3 weeks ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /Users/jamesbirtwell/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (2 available)
• iPhone 11 (mobile) • 89279B96-8B42-48F5-886C-34DF224C9B11 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-2
(simulator)

Additional context

Setup flutter engine:

class AppDelegate: FlutterAppDelegate {
    
    lazy var flutterEngine = FlutterEngine(name: "my flutter engine")
flutterEngine.run()
 GeneratedPluginRegistrant.register(with: self.flutterEngine)

Set FlutterViewController by:

window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
let flutterEngine = (UIApplication.shared.delegate as! AppDelegate).flutterEngine
let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
window?.rootViewController = flutterViewController
@Jimmybee Jimmybee added the new issue An issue that hasn't yet been seen from the maintainer label Dec 1, 2020
@miguelpruivo miguelpruivo added help wanted Extra attention is needed iOS Issue applies to iOS platform and removed new issue An issue that hasn't yet been seen from the maintainer labels Dec 6, 2020
@miguelpruivo
Copy link
Owner

Hi, I might need help on this one as I don’t have a clue what might be causing it.

@miguelpruivo
Copy link
Owner

@Jimmybee this should be fixed with 2.1.4 thanks to #539. Let me know if it fixed for you and feel free to reopen this is you still experience any issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed iOS Issue applies to iOS platform
Projects
None yet
Development

No branches or pull requests

2 participants