flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

linking error when compiling for iOS with xcodebuild 14.3

Open bertuz opened this issue 1 year ago • 10 comments

🐛 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:

  • [x] :iphone: iOS
  • [ ] :robot: Android

bertuz avatar Apr 02 '23 13:04 bertuz

Having the same problem.

JTorkk avatar Apr 03 '23 16:04 JTorkk

Same problem too

geosebas avatar Apr 04 '23 11:04 geosebas

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

alejandrobalderas avatar Apr 04 '23 22:04 alejandrobalderas

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

Sun3 avatar Apr 08 '23 05:04 Sun3

import this code to podfile:

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

Screenshot 2023-04-15 at 6 10 06 PM

codenashwan avatar Apr 08 '23 13:04 codenashwan

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 avatar Apr 12 '23 19:04 Sun3

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

Sun3 avatar May 11 '23 20:05 Sun3

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

Sun3 avatar May 12 '23 15:05 Sun3

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

rgtstha avatar May 29 '23 05:05 rgtstha

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

baptistesx avatar Jun 23 '23 16:06 baptistesx