Baseflow / flutter_cached_network_image

Download, cache and show images in a flutter app
https://baseflow.com
2.44k stars 656 forks source link

linking error when compiling for iOS with xcodebuild 14.3 #835

Open bertuz opened 1 year ago

bertuz commented 1 year ago

🐛 Bug Report

when the library is added to the pubspec.yaml, irrespective of its use or not, if xcodebuild 14.3 is used to compile and run on iOS simulator, an error is raised:

Error (Xcode): File not found:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

Expected behavior

it should compile properly like with the previous version of xcode.

$ sudo xcode-select --switch /Applications/Xcode14.2.app                                         1
$ flutter run
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running Xcode build...
 └─Compiling, linking and signing...                      2,295ms
Xcode build done.                                           12.9s
Syncing files to device iPhone 14 Pro Max...                       165ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

💪 Running with sound null safety 💪

An Observatory debugger and profiler on iPhone 14 Pro Max is available at: http://127.0.0.1:54943/GC7yUqS_ikQ=/
The Flutter DevTools debugger and profiler on iPhone 14 Pro Max is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:54943/GC7yUqS_ikQ=/

Reproduction steps

$ xcode-select --switch /Applications/Xcode14.2
$ flutter run
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           10.1s
Failed to build iOS app
Error (Xcode): File not found:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

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

Configuration

Version: 3.2.3 specifically, the problem is raised by cached_network_image_platform_interface

Platform:

JTorkk commented 1 year ago

Having the same problem.

geosebas commented 1 year ago

Same problem too

alejandrobalderas commented 1 year ago

I get exactly the same error... I debugged for hours why this was happening until I saw that this was the exact package that was making my whole application crash all of a sudden

Sun3 commented 1 year ago

Yep, same here. When you comment out the cached_network_image from the pubspec.yaml it compiles for iOS just fine.

codenashwan commented 1 year ago

import this code to podfile:

config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'

Screenshot 2023-04-15 at 6 10 06 PM
Sun3 commented 1 year ago

I just updated to Flutter 3.7.11 Dart 2.19.6 and it's now compiling. Is anyone else also having this success?

Sun3 commented 1 year ago

Guess what? With the latest Flutter/Dart release from yesterday, the error is back again...

Sun3 commented 1 year ago

FYI: I found out that in Xcode, for the Pod project, the FMDB iOS Minimum Deployment is set to 8.0. I changed it to 11.0 and it's working.

Xcode-FMDB-iOS-Version-11-Minimum
rgtstha commented 1 year ago

Upgrade Flutter and Xcode versions to the latest version and this issue will be solved.

baptistesx commented 1 year ago

FYI: I found out that in Xcode, for the Pod project, the FMDB iOS Minimum Deployment is set to 8.0. I changed it to 11.0 and it's working. Xcode-FMDB-iOS-Version-11-Minimum

Awesome thanks