Does objectbox flutter support ios emulator on M1 macbooks?
I get this error despite following Getting started guide, however it works fine in CI which also runs on M1 chip (but against physical phone engine snapshot, not the emulator)
$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "ObjectBox":
In snapshot (Podfile.lock):
ObjectBox (= 1.7.0)
In Podfile:
objectbox_flutter_libs (from `.symlinks/plugins/objectbox_flutter_libs/ios`) was resolved to 0.0.1, which depends on
ObjectBox (= 1.8.1)
Specs satisfying the `ObjectBox (= 1.7.0), ObjectBox (= 1.8.1)` dependency were found, but they required a higher minimum deployment target.
From what I can see, 1.7.2 requires swift 5.7.2 which according to a quick google search should be supported by ios 14
I've tried rolling back to 1.6.2 and changing deployment target up to 14 (from 11) but the error is still there.
How do I fix that?
I deleted Podfile.lock and then ran flutter pub get followed by pod install which seems to have solved the issue
Related
i've added firebase_auth and get this error
CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.0.2, which depends on
Firebase/Auth (= 10.0.0) was resolved to 10.0.0, which depends on
FirebaseAuth (~> 10.0.0) was resolved to 10.0.0, which depends on
GTMSessionFetcher/Core (~> 2.1)
mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
GoogleMLKit/BarcodeScanning (~> 2.6.0) was resolved to 2.6.0, which depends on
MLKitBarcodeScanning (~> 1.7.0) was resolved to 1.7.0, which depends on
MLKitVision (~> 3.0) was resolved to 3.0.0, which depends on
GTMSessionFetcher/Core (~> 1.1)
if i remove the firebase_auth, everything goes fine .
i've tried to use arch -x86_64 pod install with no success .
any one faced this issue?
Both the packages (firebase_auth and mobile_scanner) are using GTMSessionFetcher pod internally in iOS.
As both plugin uses different version of GTMSessionFetcher it causes conflicts, thus we are not able to compile iOS app.
There is one open issue in firebase-ios-sdk where we can get all the updates, as of now I am also not able to found any issues, but will update here if I found anything important. Thanks.
Update
I found two more linked issues.
Issue 1
Issue 2
For me Updating all the firebase dependencies to the latest version and google sign in version removed this error.
Then, run pod install.
Try to remove Podile.lock and rebuild the app
UPDATE
Sometimes problems happen due target ios platform. Try to do these steps:
flutter clean
update all dependencies to the latest version in pubspec.yml file and do flutter pub get
Go to your Podfile and uncomment #platform :ios, '9.0' Then change the version to 10 platform :ios, '10.0'
go to ios folder and throuh the terminal run command: pod repo update, pod update or pod install
I know there are many threads about this but even though I searched for days, none of them could solve my problem.
I am using macOS Monterey 12.5.1 M1 Chip. I tried the 2022 and 2021 solution written in the most fav solution at this address How to run CocoaPods on Apple Silicon (M1), but it did not improve.
While applying 'sudo arch -x86_64 gem install ffi' in 2021 solution, I get the error "arch: posix_spawnp: gem: Bad CPU type in executable". The address says download rosetta as a solution, I download 'softwareupdate --install-rosetta' like this but this did not solve my problem.
I updated the Ruby version to 3.1.2 nothing changed,
and I tried;
delete ios folder
Flutter create .
pod deintegrate ios folder
pod install ios folder
Flutter clean
Flutter pub get
Flutter run
error persists.
When I change the released sections in the project 'Runner' section in the podfile to debug, I can open the application in the simulator, but this time while trying the application on the real device, when I want to run the application again, a white screen comes and throws it from the application. Thanks in advance to those who can help.
[!] CocoaPods could not find compatible versions for pod "Sentry":
In Podfile:
sentry_flutter (from .symlinks/plugins/sentry_flutter/ios) was resolved to 0.0.1, which depends on
Sentry (~> 7.11.0)
None of your spec sources contain a spec satisfying the dependency: `Sentry (~> 7.11.0)`.
I am just trying to install sentry_flutter plugin in my futter project. Currently i am testing in ios device. But it gives the above error.
The error message seems straight forward enough. But i cannot manage to include this plugin in my project.
you can run pod repo update to update your local cache bcause it may be outdated.
If it doesn't fix the issue for you, you can delete your Podfile.look file on ios folder and run pod install
I'm currently working on a project that uses Cocoapods in Flutter 2.2.3 and I'm having Issues with the Flutter pod that in included when I run pod install. The version it is giving me is Flutter 1.0.0, even though I'm building the app using flutter 2.2.3.
This is the output I get from running pod outdated:
Updating spec repo `trunk`
Analyzing dependencies
The color indicates what happens when you run `pod update`
<green> - Will be updated to the newest version
<blue> - Will be updated, but not to the newest version because of specified version in Podfile
<red> - Will not be updated because of specified version in Podfile
The following pod updates are available:
- Firebase 8.3.0 -> (unused) (latest version 8.4.0)
- FirebaseCore 8.3.0 -> 8.3.0 (latest version 8.4.0)
- Flutter 1.0.0 -> 1.0.0 (latest version 2.0.2)
This begs the question, is the Flutter pod equivalent and/or overriding the Flutter SDK? I don't think it is but I haven't been able to find any concrete explanation of what the difference between the two are. I tried looking up the Flutter pod on the cocoapods website but the description did not prove helpful at all.
I was wondering the same and came across this issue: https://github.com/flutter/flutter/issues/53673
It looks like this is to be expected and doesn't really matter:
This is expected. The Flutter framework isn't downloaded from CocoaPods; it's copied from your installed Flutter SDK. So it's hard-coded to 1.0 since there's no version resolution for CocoaPods to handle. If you see actual issues related to this, pleas let us know!
Rather confusing given that CocoaPods shows you there's a newer version.
Using iphone 11 iOS-14 device and simulator, I have deleted THE podfile and podlock of my flutter app and trying to rebuild the app in debug MODE, i am using the latest firebase dependencies including cloud_firestore: ^0.14.1 dependency then it gets stuck at pod install and is taking forever to finish, been more than half an hour.
I wonder if i should wait longer or is there something wrong with firebase dependencies?
Pod install is not stuck, when you delete Podfile.lock, pod install will redownload all pod dependencies, will take a long time, after finish, it will create a new Podfile.lock
I have a project that have 20+ dependencies for flutter, firebase dependencies are the most complex ones
Add this line under target 'Runner' do in Podfile.
pod 'FirebaseFirestore', :git =>
'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag
=> '6.33.0'
Then in IOS:
flutter clean
pod repo update
For more info: https://github.com/FirebaseExtended/flutterfire/issues/2751
If you have spent 20-30 minutes of your time holding onto pod install and yet it seems to stuck forever (Possibly installed firebase dependencies then running same project on different machine). Then there are other workaround to it.
Clean cache and pub get your dependencies
flutter clean
flutter pub get
Navigate to your ios folder from the terminal
cd ios
Remove Trunk
pod repo remove trunk
If your current installation is in Intel Chipped Mac run the code below
pod install --repo-update
If your installation is in M1 chip device install ffi first
sudo arch -x86_64 gem install ffi
Then update POD
arch -x86_64 pod install --repo-update
Now clean and fetch dependencies
flutter clean
flutter pub get
If you encountered an error similar to like below
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
[!] Automatically assigning platform `iOS` with version `9.0` 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`.
Then go to podfile, uncomment platmform:ios line and update it
platform :ios, '12.0'
Now re-run the command
arch -x86_64 pod install --repo-update
Don't Forget to clean pub caches with flutter clean
Check if your Xcode is up to date.
Updating my Xcode has resolved the issue for me.
I have tried all the above solutions but non have worked.
Only updating Xcode has worked.
Sometimes it seems that the 'pod install' command is taking forever, but it is downloading the dependencies in the background.
Please try to look into the Activity Monitor network tab to confirm that some data is being downloaded.
In my case, my pod depended on the Firebase pods, so it took around 10 minutes to complete my dependencies.
Recommended way on their official documentation is as follow:
Optional: Improve iOS & macOS build times by including the pre-compiled framework.
Currently, the Firestore SDK for iOS depends on code that can take upwards of 5 minutes to build in Xcode. To reduce build times significantly, you can use a pre-compiled version by adding this line to the target 'Runner' do block in your Podfile:
target 'Runner' do
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
# ...
end
Additionally, ensure that you have upgraded CocoaPods to 1.9.1 or higher:
gem install cocoapods