XCode archive error 'No such module flutter_downloader' when using AppDelegate.swift
See original GitHub issueI can’t archive the project with XCode if I use AppDelegate.swift
as stated in the docs.
Both flutter run --release
and flutter build ios
work.
-
XCode:
Version 11.3.1 (11C504)
-
AppDelegate.swift
:
import UIKit
import Flutter
import flutter_downloader
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
private func registerPlugins(registry: FlutterPluginRegistry) {
if (!registry.hasPlugin("FlutterDownloaderPlugin")) {
FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin"))
}
}
flutter doctor -v
:
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.1 19B88, locale pt-BR)
• Flutter version 1.12.13+hotfix.7 at /Users/JHBitencourt/Documents/
• Framework revision 9f5ff2306b (8 weeks ago), 2020-01-26 22:38:26 -0800
• Engine revision a67792536c
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/JHBitencourt/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• 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.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.0.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
- Error:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:20 (2 by maintainers)
Top Results From Across the Web
ios - XCode archive error 'No such module flutter_downloader ...
XCode archive error 'No such module flutter_downloader' when using AppDelegate.swift. enter image description here.
Read more >xcodebuild returns "Error: No such module" - Apple Developer
I can build and archive in Xcode from the GUI, but xcodebuild fails with 482 errors, and at least the last few are...
Read more >Xcode 12.0.1 "No such module" | Apple Developer Forums
Works on a device, fails for the simulator. With a simple new iOS App project I was able to use the Cocoapods and...
Read more >No Such Module - 'WatchKit' | Apple Developer Forums
When I compile it, I get two errors: - WatchKit is not available when building for iOS Simulator. - No such Module, WatchKit...
Read more >SPM in project pre Xcode 11 - 'No … | Apple Developer Forums
I've a issue with integrating swift packages into projects that were created via e.g. ... In addition to "no such module" errors, some...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Open xcworkspace instead of xcodeproj and it will work fine
None of the above solutions worked for me so this is how I solved mine:
flutter clean
pod install