flutter_fgbg
flutter_fgbg copied to clipboard
Wrong version installing on Mac M1
This is very strange ... seems a recent issue after I began using --dart-define in my build phase
I have a null safe flutter project, and my build onto IOS keeps failing. Even though my pubspec.yaml specified fgbg "^0.1.0", the podfile.lock indicates that "0.0.1" has been installed.
Build to IOS simulator keeps failing with:
flutter_fgbg not found
on this line of the GeneratedPluginRegistrant.m
#if __has_include(<flutter_fgbg/FlutterFGBGPlugin.h>)
#import <flutter_fgbg/FlutterFGBGPlugin.h>
#else
@import flutter_fgbg;
#endif
I'm very confused but I'm going to just point straight to this repo (instead of pub.dev) and see if that changes anything ...
Interesting. Could you try flutter_fgbg: 0.1.0
and see if that makes a difference?
That IS what was specified in my pubspec ... that's how I found the problem ... it seems the .lock file was preventing an upgrade from 0.0.1
Ah alright. I have faced similar issue when changing a commit reference of a git dependency of another lib. It simply wouldn't use the given commit. I had to clean project, delete lock file, change commit to something that does not exist and then back etc. to fix that. I believe this is similar. And this is more like a pub tool or pub's cache problem than a lib issue.
Hey @ajinasokan . First let me thank you for this package, it solves so many issues we are having the the vanilla life cycle state listener. Good job man!
About the issue, Im having the same problem. I
- deleted the
Podfile.lock
, - did
flutter pub cache clean
- and
flutter pub get
But still get the 0.0.1
in the Podfile.lock
@dgaedcke @danielRi Sorry. Something I missed from both of your comments is that you were mentioning Podfile.lock
and not pubspec.lock
. Some things I would like to share:
- You don't have to look at
Podfile.lock
version numbers. For Flutter pluginspubspec.lock
is what matters AFAIK. - Check
pubspec.lock
and see the version offlutter_fgbg
in it. If it is like following then you are on latest version:
flutter_fgbg:
dependency: "direct main"
description:
name: flutter_fgbg
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
- Version in
Podfile.lock
comes from podspec file of the lib. None of my libraries updates that number. Because it doesn't have any significance as Flutter build process always uses the files from the corresponding pub package and not cocoapods. - Most of the official libraries also doesn't use that number. For example in
Podfile.lock
of one of my projects:
- orientation (0.0.1):
- Flutter
- package_info (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- share (0.0.1):
- Flutter
- url_launcher (0.0.1):
- Flutter
- video_player (0.0.1):
- Flutter
So could you take a look at pubspec.lock
and let me know if that shows 0.1.0
? If yes then the build issue seem to be unrelated to the version. I would recommend to see the flutter build -v
output to pinpoint the cause.
Hi @ajinasokan
you are right, my Podfile.lock
actually also contains many 0.0.1
entries. For me, this issue can be closed. Thank you!