Baseflow / Baseflow/flutter_cached_network_image
Failed to build iOS due to sqflite transitive dependency
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
## 🐛 Bug Report
Currently I added the `cached_network_image: ^2.3.3` to my project dependencies and now iOS build is failing with:
```
error: the following command failed with exit code 0 but produced no further output
CompileC /Users/myuser/Library/Developer/Xcode/DerivedData/Runner-adczpfoxmrmmcrenpvwevoumfynr/Build/Intermediates.noindex/Pods.build/Release-iphoneos/FMDB.build/Objects-normal/arm64/FMDatabase.o /Users/myuser/builds/ErPwZgwM/0/axonstream/axon-pos-flutter/ios/Pods/FMDB/src/fmdb/FMDatabase.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
/Users/myuser/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1+2/ios/Classes/SqflitePlugin.m:3:9: fatal error: 'fmdb/FMDB.h' file not found
#import
^~~~~~~~~~~~~
1 error generated.
```
I checked my project and the only dependency that uses sqflite as transitive dependency is **cached_network_image**, if I remove **cached_network_image** from my dependencies then transitive sqflite is removed also from pubspec.lock... and iOS build is successful.
### Expected behavior
The iOS build should build successful.
### Reproduction steps
Just added the `cached_network_image: ^2.3.3` dependency to my project and iOS build starts failing.
### Flutter Doctor
[✓] Flutter (Channel beta, 1.22.1, on Mac OS X 10.15.5 19F101, locale en-US)
• Flutter version 1.22.1 at /Users/myuser/Flutter/SDK
• Framework revision f30b7f4db9 (4 weeks ago), 2020-10-08 10:06:30 -0700
• Engine revision 75bef9f6c8
• Dart version 2.10.1
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/myuser/Android/SDK
• Platform android-30, build-tools 29.0.3
• ANDROID_HOME = /Users/myuser/Android/SDK
• 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.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
**Version:** 2.3.3
**Platform:**
- [x] :iphone: iOS
- [ ] :robot: Android
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure by adding cached_network_image: ^2.3.3 and running the iOS build. Start with ios/Classes/SqflitePlugin.m and the FMDB dependency referenced in the error, then inspect how the transitive sqflite dependency is integrated. Done means the project builds successfully for iOS while cached_network_image remains in pubspec.lock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, objective-c
- Domain
- build-system, databases, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100