drift icon indicating copy to clipboard operation
drift copied to clipboard

Adding sqlite3_flutter_libs in Pubspec.yaml is creating problem with iOS run

Open derekhskim opened this issue 3 years ago • 6 comments

Hello Sir/Madam,

I am truly sorry to bother but when I add sqlite3_flutter_libs in pubspec.yaml, it is causing problem when I try to run on iOS simulator. I have tried to downgrade XCode, uninstalled and installed the cocoapods again, deleted android studio cache, deleting podfile.lock and running pod install in terminal (ios directory) etc, but none of them seems to be working.

Below is the error message I am receiving:

Warning: CocoaPods not installed. Skipping pod install. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state. Error launching application on iPhone 13.

Below is what I see when I run flutter doctor -v (to verify that Cocoapods is working fine): [✓] Flutter (Channel stable, 3.3.1, on macOS 12.6 21G115 darwin-arm, locale ko-KR) • Flutter version 3.3.1 on channel stable at /Users/derek/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 4f9d92fbbd (3주 전), 2022-09-06 17:54:53 -0700 • Engine revision 3efdf03e73 • Dart version 2.18.0 • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at /Users/derek/Library/Android/sdk • Platform android-33, build-tools 32.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Users/derek/Downloads/Xcode.app/Contents/Developer • Build 13C100 • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Connected device (3 available) • iPhone 13 (mobile) • FF17A0BB-B4BB-4111-B1F6-87C8AB840426 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.6 21G115 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.125

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found!

Can you please assist with this?

derekhskim avatar Sep 25 '22 02:09 derekhskim

Thanks for the report! Could you run pod install in your ios folder and post any error that might get printed?

simolus3 avatar Sep 25 '22 06:09 simolus3

No problem, thanks for responding. After the pod install, when I run the error still shows that

Warning: CocoaPods not installed. Skipping pod install. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state. Error launching application on iPhone 13.

error. I've tried with different phone models as well. As soon as I block out the plugin, it works fine.

derekhskim avatar Sep 25 '22 06:09 derekhskim

Warning: CocoaPods not installed. Skipping pod install.

This sounds like a general issue with your Flutter install not finding CocoaPods. I suspect this is not due to sqlite3_flutter_libs. Just to check, does the error go away after removing your dependency on sqlite3_flutter_libs?

simolus3 avatar Sep 27 '22 08:09 simolus3

So I've suspected that too, but I've never had any issues with Cocoapods before. This error suddenly appeared when sqlite3_flutter_libs was added in the pubspec.yaml and once I remove this dependency, the error disappears and works fine.

derekhskim avatar Sep 27 '22 13:09 derekhskim

I had a similar issue, you need to install CocoaPods. I recommend using brew to do that. Close down the simulator and your coding environment and rebuild, it should work.

mprync avatar Oct 08 '22 18:10 mprync

Hello, thanks for adding a reply. I actually have CocoaPods installed via brew already. I have mentioned this in my question as well. That's actually not the problem, well it is but I did definitely delete and re-install, clear cache and all. Still no luck.

derekhskim avatar Oct 08 '22 21:10 derekhskim