Closed chris-NR closed 5 months ago
The problem appears to come from https://github.com/clemensg/sqlite3pod/commit/a2b935e745bd4945474442b37a084ecd215c6a91. Can you check what the minimum ios deployment version is in your Podfile
? XCode 15 apparently requires iOS 12 as a minimum which is why that was added to the upstream dependency. Do you need support for iOS 11 or older versions? Flutter claims to not support that either.
I think the podfile is the default that ships with flutter (I have not modified it). It does not specify an iOS version.
I am using XCode 14. I can't upgrade to 15+ until I get a new macbook :confused:
Does it work if you uncomment platform :ios, '12.0'
?
Hmmm, before updating the Podfile I unpinned sqlite3_flutter_libs, re-ran 'flutter pub upgrade' and checked to see that the original problem was still reproducible - and it wasn't !! Here is the latest output from the upgrade:
This puzzled me as I wasn't expecting anything other than the sqlite3_flutter_libs to change. On further investigation I think I understand what may have happened...
I have two packages in separate git repos. One for the UI and one for the Drift Database and other services. The 'Services package' only depends on flutter to enable the loading of the database from an asset as well as a file. The 'UI package' specifies it's dependency on the 'Services Package' via a local path in it's pubspec. This allows me to work on both packages simultaneously in a vscode workspace (I am the sole developer). I use 'test' for the Services and 'flutter_test' for the UI.
I hadn't appreciated (until now) that a consequence of this setup is that running 'flutter pub upgrade' on the 'UI package' does not upgrade the dependencies inside the 'Services Package'. The output in my original post, except for the pubspec (which was from the Services package 🙄 ), is from the 'UI package' and the output in this comment is from the 'Services package'.
I think I need to restructure my codebase - I will look at using a mono repo (like Drift) or using a 'proper' dependency rather than the path. I think this issue can be closed. Thanks for your support (and the excellent Drift package) and sorry for the false alarm.
No problems, and hopefully pub workspaces will eventually fix these kinds of problems :)
By the way, since drift is a pure Dart package you can just add the sqlite3_flutter_libs
package as a dependency to your UI/main app package and remove it from the services package. That might avoid these problems in the future as well.
Upgrading Flutter (v3.22), Dart (v3.4) and the package dependencies has caused my iOS build to fail with the following error.
Error output
``` Launching lib/main.dart on iPhone in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: 2QU963T8NU CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Finding Podfile changes - Flutter - path_provider_foundation - sqlite3_flutter_libs Fetching external sources -> Fetching podspec for `Flutter` from `Flutter` -> Fetching podspec for `path_provider_foundation` from `.symlinks/plugins/path_provider_foundation/darwin` -> Fetching podspec for `sqlite3_flutter_libs` from `.symlinks/plugins/sqlite3_flutter_libs/ios` Resolving dependencies of `Podfile` CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_4_2_c.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/4/2/c/FlutterMacOS/3.16.0/FlutterMacOS.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_d_c_2.txt exists! Returning local because checking is only performed in repo update 4 CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.45.1/sqlite3.podspec.json exists! Returning local because checking is only performed in repo update [!] CocoaPods could not find compatible versions for pod "sqlite3": In snapshot (Podfile.lock): sqlite3 (= 3.45.1, ~> 3.45.1) In Podfile: sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) was resolved to 0.0.1, which depends on sqlite3 (~> 3.45.3+1) Specs satisfying the `sqlite3 (= 3.45.1, ~> 3.45.1), sqlite3 (~> 3.45.3+1)` dependency were found, but they required a higher minimum deployment target. /usr/local/Cellar/cocoapods/1.15.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state' /usr/local/Cellar/cocoapods/1.15.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'Relevant section of pubspec
``` environment: sdk: ">=3.3.0 <4.0.0" dependencies: intl: platform: meta: async: drift: ^2.16.0 drift_dev: sqlite3: sqlite3_flutter_libs: ^0.5.0 path_provider: ^2.0.0 path: json_annotation: ^4.8.1 freezed_annotation: ^2.4.1 args: ^2.4.2 equatable: ^2.0.5 rxdart: bloc: ^8.1.0 bloc_concurrency: ^0.2.5 stream_transform: ^2.1.0 dev_dependencies: test: sprintf: flutter_lints: ^3.0.1 benchmark_harness: any build_runner: ^2.4.8 json_serializable: ^6.7.1 freezed: ^2.4.7 csv: ^6.0.0 ```Output from flutter pub upgrade
``` Resolving dependencies... (2.0s) Downloading packages... _fe_analyzer_shared 67.0.0 (68.0.0 available) analyzer 6.4.1 (6.5.0 available) > args 2.5.0 (was 2.4.2) > build_daemon 4.0.2 (was 4.0.1) > build_runner 2.4.10 (was 2.4.8) > built_value 8.9.2 (was 8.9.1) > coverage 1.8.0 (was 1.7.2) > cupertino_icons 1.0.8 (was 1.0.6) > drift 2.18.0 (was 2.16.0) > drift_dev 2.18.0 (was 2.16.0) > flutter_lints 3.0.2 (was 3.0.1) (4.0.0 available) > freezed 2.5.2 (was 2.4.7) (2.5.3 available) > frontend_server_client 4.0.0 (was 3.2.0) > go_router 13.2.5 (was 13.2.0) (14.1.2 available) > js 0.7.1 (was 0.6.7) > json_annotation 4.9.0 (was 4.8.1) > json_serializable 6.8.0 (was 6.7.1) leak_tracker 10.0.4 (10.0.5 available) leak_tracker_flutter_testing 3.0.3 (3.0.5 available) lints 3.0.0 (4.0.0 available) material_color_utilities 0.8.0 (0.11.1 available) meta 1.12.0 (1.15.0 available) > path_provider 2.1.3 (was 2.1.2) > path_provider_android 2.2.4 (was 2.2.2) > path_provider_foundation 2.4.0 (was 2.3.2) shelf_web_socket 1.0.4 (2.0.0 available) > sqlite3 2.4.3 (was 2.4.0) > sqlite3_flutter_libs 0.5.21 (was 0.5.20) > sqlparser 0.36.0 (was 0.34.1) test 1.25.2 (1.25.5 available) test_api 0.7.0 (0.7.1 available) test_core 0.6.0 (0.6.2 available) vm_service 14.2.1 (14.2.2 available) > web 0.5.1 (was 0.5.0) > web_socket_channel 2.4.5 (was 2.4.4) (3.0.0 available) > win32 5.5.1 (was 5.2.0) Changed 24 dependencies! 16 packages have newer versions incompatible with dependency constraints. Try `flutter pub outdated` for more information. ```If I pin the version to v0.5.20 the problem is resolved