Flutter throws dependency error not flutter 2

Issue

I have a flutter project that uses imagepicker as a pub package, when I run the project I get the following error, this happened to me after I changed my mac to m1, I have already followed several guides about it but I can’t solve it, pod packages are installed but running on ios does not start, what can it be?

Error:

Running pod install...                                           1,271ms
Running Xcode build...                                                  
Xcode build done.                                            3.2s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[48068]: Class AMSupportURLConnectionDelegate is implemented in both
    /usr/lib/libauthinstall.dylib (0x1ef8d3ad8) and
    /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    (0x1228142b8). One of the two will be used. Which one is undefined.
    objc[48068]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib
    (0x1ef8d3b28) and
    /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    (0x122814308). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/utente/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+22/
    ios/Classes/FLTImagePickerPlugin.m:149:20: warning: 'UIAlertView' is deprecated: first
    deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a
    preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations]
        [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil)
                       ^
    In module 'UIKit' imported from /Users/utente/Desktop/Progetti/ffvordini/ios/Pods/Target
    Support Files/image_picker/image_picker-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
    iPhoneSimulator14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12
    : note: 'UIAlertView' has been explicitly marked deprecated here
    @interface UIAlertView : UIView
               ^
    1 warning generated.
    building file list ... rsync: link_stat
    "/Users/utente/Desktop/Progetti/ffvordini/build/ios/Debug-iphonesimulator/App.framework"
    failed: No such file or directory (2)
    done

    sent 29 bytes  received 20 bytes  98.00 bytes/sec
    total size is 0  speedup is 0.00
    rsync error: some files could not be transferred (code 23) at
    /System/Volumes/Data/SWE/macOS/BuildRoots/d7e177bcf5/Library/Caches/com.apple.xbs/Sources/rsy
    nc/rsync-55/rsync/main.c(996) [sender=2.6.9]
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    /Users/utente/Desktop/Progetti/ffvordini/ios/Pods/Pods.xcodeproj: warning: The iOS
    Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
    supported deployment target versions is 9.0 to 14.5.99. (in target 'FMDB' from project
    'Pods')
    /Users/utente/Desktop/Progetti/ffvordini/ios/Pods/Pods.xcodeproj: warning: The iOS
    Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
    supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project
    'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

Solution

If you are using getMultiImage you have to upgrade your deployment target in Xcode to iOS14.

Open flutter project in Xcode
Runner > General > Deployment Info > iOS14

Answered By – guccisekspir

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.