Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on iOS #45

Closed
Dev-Owl opened this issue Jun 30, 2021 · 12 comments
Closed

Issue on iOS #45

Dev-Owl opened this issue Jun 30, 2021 · 12 comments

Comments

@Dev-Owl
Copy link

Dev-Owl commented Jun 30, 2021

Hi,

We do have a Flutter project still running SDK 2.6.0 (and can't change it right now). As the previous download location for the sqlite bindings is no longer ava. I have upgraded it to:

sqlite3_flutter_libs: ^0.4.0+1

Now I get the following error during pod install and also during the build:
Pod install

[!] CocoaPods could not find compatible versions for pod "sqlite3":
  In snapshot (Podfile.lock):
    sqlite3 (= 3.32.3, ~> 3.32.3)

  In Podfile:
    sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) was resolved to 0.0.1, which depends on
      sqlite3 (~> 3.35.4)

Specs satisfying the `sqlite3 (= 3.32.3, ~> 3.32.3), sqlite3 (~> 3.35.4)` dependency were found, but they required a higher minimum deployment target.

Build

 update
    [!] CocoaPods could not find compatible versions for pod "sqlite3":
      In snapshot (Podfile.lock):
        sqlite3 (= 3.32.3, ~> 3.32.3)
      In Podfile:
        sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) was resolved to 0.0.1, which depends on
          sqlite3 (~> 3.35.4)
    Specs satisfying the `sqlite3 (= 3.32.3, ~> 3.32.3), sqlite3 (~> 3.35.4)` dependency were found, but they required a higher minimum deployment target.
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
    [!] Automatically assigning platform `iOS` with version `12.1` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Exception: Error running pod install
Exited (sigterm)

Is there any way or suggestion to fix this? The android app builds fine. Happy for any feedback/suggestions.

@simolus3
Copy link
Owner

I'm a bit surprised to see this error. If you look at the diff in the sqlite3 pod, there doesn't appear to be anything that may increase the target platform now.

Does anything from here help at all? Do you have something like platform :ios, '9.0' in your podspec?

@Dev-Owl
Copy link
Author

Dev-Owl commented Jul 1, 2021

Thanks for the reply, we don't have any fixed version in the pod file. However, the following steps have "solved" the problem:

  1. Go to the main POD file from Flutter (FLUTTER PROJECT/ios/Podfile)
  2. Add a version to it, in our case we set platform: ios,'12.1'
  3. Via shell inside the ios folder run: pod install --repo-update
  4. Now the output complained that sqlite3 had no compatible version, as suggested by the output run pod update sqlite3

I really don't know why it happened and what exactly went wrong, I just hope that in case somebody runs into this the above steps help.

Thanks for your swift answer and pointing me to the SO post.

@Dev-Owl Dev-Owl closed this as completed Jul 1, 2021
@anatta-feng
Copy link

I had the same problem

$ pod install    
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "sqlite3":
  In Podfile:
    sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) was resolved to 0.0.1, which depends on
      sqlite3 (~> 3.37.2)

None of your spec sources contain a spec satisfying the dependency: `sqlite3 (~> 3.37.2)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

The problem disappeared when I rolled back the sqlite3_flutter_libs version to 0.5.0

@simolus3
Copy link
Owner

@T-Oner You may have to update your pod repositories as well, the latest version on cocoapods definitely is 3.37.2.

@edwardaux
Copy link

I bumped into this one recently too. At some stage, I had explicitly pinned sqlite3_flutter_libs to 0.5.0 and when I bumped that up to 0.5.4 I got the error above.

Eventually, I actually read the error message 😊 and ended up running pod repo update. After I did that, everything worked OK 🎉

Dunno if it will work for everyone, but it worked for me.

@daniloapr
Copy link

I had this problem too and pod repo update in the VSCode's terminal was not working. Then I tried pod repo update in the mac terminal and the problem was gone!

Flutter: 2.8.1
sqlite3_flutter_libs: ^0.5.5

@anhtuan23
Copy link

In my case, the problem is because Podfile.lock require sqlite3 (= 3.38.2, ~> 3.38.2) while sqlite3_flutter_libs require a newer version. Simply remove Podfile.lock and run pod install again resolve the problem.

@MSKoWa
Copy link

MSKoWa commented Jun 20, 2022

Hi,

I am receiving a similar error I guess. However, the error states that the file 'sqlite3.h' is not found when compiling. This is the error:

Could not build the precompiled application for the device.
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code

Lexical or Preprocessor Issue (Xcode): 'sqlite3.h' file not found
.../ios/Pods/SQLite.swift/Sources/SQLiteObjc/fts3_tokenizer.h:26:8

Error launching application on iPad. 

When I have a look at the installed dependencies in XCode or in the Podfile.lock it is quite odd that the 'sqlite3_flutter_libs' is resolved to version 0.0.1 even if I specified 0.5.0.

@MSKoWa
Copy link

MSKoWa commented Jun 20, 2022

Found some more information... I am using the AWS amplify datastore plugin for my database. As I used Drift before, I currently need to have both to transfer the data from one to the other.

They (actually AWS) seem to bring some kind of "hidden" stuff (that is not visible in the error messages) causing a conflict.

@bartpalmtree
Copy link

I had this problem too and pod repo update in the VSCode's terminal was not working. Then I tried pod repo update in the mac terminal and the problem was gone!

Flutter: 2.8.1 sqlite3_flutter_libs: ^0.5.5

Also had trouble in the VSCode terminal. Updating the minimum deployment target to 12.1 and finally reading the last of the message got me to this:

You have either:
 * changed the constraints of dependency `sqlite3` inside your development pod `sqlite3_flutter_libs`.
   You should run `pod update sqlite3` to apply changes you've made.`

The specific pod update made the difference.

@abdullahriaz95
Copy link

Found some more information... I am using the AWS amplify datastore plugin for my database. As I used Drift before, I currently need to have both to transfer the data from one to the other.

They (actually AWS) seem to bring some kind of "hidden" stuff (that is not visible in the error messages) causing a conflict.

@MSKoWa Did you find a solution where you could use both Amplify DataStore and Drift?

@MSKoWa
Copy link

MSKoWa commented Feb 20, 2024

@abdullahriaz95

Hi, sorry for the late response. No, I did not do any further investigation on this because we abandoned Amplify for now and are using just Drift for local persistence and a separate DynamoDB instance for server persistence. We have a simple sync procedure between these without Amplify's bells and whistles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants