How to override version of pod dependency in flutter ios project - ios

I am using flutter_facebook_auth and facebook_app_events plugins.
One requires FBSDKCoreKit with version 13.0.0 and the other one with 13.1.0.
When I want to run my app it fails because of this version conflict.
Is there a way to override the version all packages use in my project or do I have to update the version in the dependencies themselfes?

Related

ios project shows errors after installing SkeletonView package

As soon as I add SkeletonView package with package Manager, xcode started showing these crazy errors. I installed 1.9.0 version of SkeletonView (selected exact version on package manager)
what should I do now?

Swift Package Manager could not be resolved all libraries, project

This error always happens whenever I add a new Package via Swift Package Manager in Xcode:
Cannot fetch library
I've already configured my GitHub Auth Token setting in Xcode and registered my GitHub account.
My macOS version is Monterey 12.1, my Xcode version is 13.1, my command-line tools are 13.1, and I'm using an M1 chipset Mac.
Configure Dependency Rule 📏
tl;dr
I encountered this issue today and managed to resolve the Package by changing the Dependency Rule from Branch -> master to Up to Next Major Version and checking their latest Release versions from GitHub.
Other Dependency Rules
We can also try changing from Branch to other rules depending on our application:
Up to Next Major Version: Useful for getting the latest major stable release.
Up to Next Minor Version: Useful for getting the very latest releases.
Range of Versions: Useful for resolving dependencies specific to a particular dependency chain (careful configuration).
Exact Version: Useful for pinning a version to a particular working release, or fork.
Commit: Useful for pinning a Package to a commit rather than a release version.
Xcode SPM "Add Package" prompt
I tried to simulate your problem, Xcode and command-line version are the same. I was able to add SnapKit into my project without problems. Try this workaround:
Project -> Package Dependencies -> + -> paste the link: https://github.com/SnapKit/SnapKit -> Dependency rule set to Up To Next Major -> Add Package.
It should add a new package. Currently in version 5.0.1 If you have still a problem, just click Add Anyway, build the project and send a screenshot of the error.

Flutter giving errror in old sdk files although I have upgraded the sdk

I created project using flutter sdk version 1.7.8. After long time when I run the build it was giving me errors in sdk files. So I just downloaded new version of flutter sdk (2.2). I have changed environment path to latest sdk version, but when I run project it still giving me error related to older sdk version.
Here is the error
/C:/flutter_windows_v1.7.8+hotfix.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_slidable-0.4.9/lib/src/widgets/slidable.dart:786:46: Error: Method not found: 'TypeMatcher'.
return context.ancestorStateOfType(const TypeMatcher());
This is my environment variable
Why it is giving error related to version 1.78, although I have provided version 2.2 in my environment variable.
I think the one of the plugins that you are using is deprecated when you upgrade flutter you mostly need to upgrade the plugins as well.
and you need to change your pubspec.yaml file also and change the dart version .
so run flutter clean first.
change dart version. then try to run if it doesnt work still you need to upgrade plugins and remove the deprecated plugin.
OR
You might have the old Path in your IDE (Android Studio, VS CODE ) ETC.

Realm's Swift module compiled with Swift 4.0 cannot be imported in Swift 4.0.2

I just updated to XCode 9.1 and when trying to compile my project which was running before under XCode 9.0.1 and Realm 3.0.0, I get the error message 'Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2' at the Realm import in my code
import RealmSwift
I have:
- updated to Realm 3.0.1
- Reinstalled the Framework into my project
- Cleaned the project with the function in XCode
In the Realm 3.0.1 package there is no Swift-4.0.2 folder, only Swift-4.0.
Should Realm 3.0.1 be compatible to Xcode 9.1? If so, what can I do to make it work? If not, is a new version being created?
Thanks for help.
Regards
Christian
Swift 4.0.2 is not ABI compatible with Swift 4.0, so the binaries you use as dependencies need to be recompiled.
Two approaches are reasonable here:
Use Carthage that will rebuild the Realm for you. (or build the Realm from source youself)
If you are not using Carthage or you don't wish to building Realm from source yourself, just install external Swift 4.0 Toolchain and select it within Xcode -> Preferences -> Components -> Toolchains so you are back with Xcode 9.0 swift toolchain until Realm will release their update.
I had the same issue, but with the module SocketIO. Recompiling the framework with Carthage worked for me. After that I also had to clean the build folder.

Find our versions of ALL dependencies installed by Carthage

How to know which versions of dependencies do I have installed via Carthage?
Cartfile.resolved does inform only about the dependencies of my project but not about dependencies of dependency of my project..?
In case anyone is still wondering:
Cartfile.resolved

Resources