Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

iphone - Flutter iOS build failed an error of pod files: Podfile is out of date

I'm trying to build my app on the ios simulator(ios 13), but the build fails and gives an error of pod files: Podfile is out of date

This is the error.

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: Podfile is out of date
  This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile

Warning: Podfile is out of date
  This can cause issues if your application depends on plugins that do not support iOS.
  See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile

Running Xcode build...
Xcode build done.                                            7,8s
Failed to build iOS app
Error output from Xcode build:
?
    ** BUILD FAILED **


Xcode's output:
?
    /Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:155:24: error: no visible @interface for 'FIRQuery' declares the selector 'queryWhereField:arrayContainsAny:'
            query = [query queryWhereField:fieldName arrayContainsAny:value];
                     ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:157:24: error: no visible @interface for 'FIRQuery' declares the selector 'queryWhereFieldPath:arrayContainsAny:'
            query = [query queryWhereFieldPath:fieldPath arrayContainsAny:value];
                     ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:163:24: error: no visible @interface for 'FIRQuery' declares the selector 'queryWhereField:in:'
            query = [query queryWhereField:fieldName in:value];
                     ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:165:24: error: no visible @interface for 'FIRQuery' declares the selector 'queryWhereFieldPath:in:'
            query = [query queryWhereFieldPath:fieldPath in:value];
                     ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:764:16: warning: 'timestampsInSnapshotsEnabled' is deprecated [-Wdeprecated-declarations]
          settings.timestampsInSnapshotsEnabled = (bool)call.arguments[@"timestampsInSnapshotsEnabled"];
                   ^
    In module 'FirebaseFirestore' imported from /Users/kareldebedts/DRINKM8/drinkm8_git/ios/Pods/Headers/Public/Firebase/Firebase.h:31:
    /Users/kareldebedts/DRINKM8/drinkm8_git/ios/Pods/FirebaseFirestore/Firestore/Source/Public/FIRFirestoreSettings.h:69:20: note: 'timestampsInSnapshotsEnabled' has been explicitly marked deprecated here
        __attribute__((deprecated));
                       ^
    1 warning and 4 errors generated.

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

I tried rm ios/Podfile , but terminal says the command doesn't exist...

This is my pubspec yaml.

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  firebase_core: ^0.4.0
  firebase_auth: ^0.11.1+12
  flutter_facebook_login: ^2.0.1
  cloud_firestore: ^0.12.7+1
  shared_preferences: ^0.5.3+4
  geolocator: ^5.1.1+1
  url_launcher: ^5.1.2
  rflutter_alert: ^1.0.3
  font_awesome_flutter: ^8.5.0
  flutter_picker: ^1.0.13
  uuid: 2.0.1
  image_picker: ^0.6.1
  path_provider: ^1.2.0
  image: ^2.1.4
  firebase_storage: ^3.0.4
  flutter_datetime_picker: ^1.2.5
  intl: ^0.15.8
  native_contact_picker: ^0.0.6
  flutter_spinkit: ^4.0.0
  transparent_image: ^1.0.0
  connectivity: ^0.4.3+7
  flare_splash_screen: ^2.1.3
  algolia: ^0.1.6+1
  http: ^0.12.0+2
  cloud_functions: ^0.4.1+6
  firebase_messaging: ^5.0.2
  avatar_glow: ^1.0.0
  google_maps_flutter: ^0.5.21+8
  geoflutterfire: ^2.0.2
  rxdart: ^0.22.2
  auto_size_text: ^2.1.0
  camera: ^0.5.4+1
  video_player: ^0.10.2+1
  story_view: ^0.11.0
  thumbnails: ^1.0.1
  image_crop: ^0.3.1
  file_picker: ^1.4.2
  pdf_viewer_plugin: ^1.0.0+2
  flutter_background_geolocation: ^1.3.2
  location_permissions: ^2.0.3
  image_downloader: ^0.19.1
  permission_handler: ^3.3.0
  firebase_database: ^3.1.0

Does someone knows what can cause the problem? Maybe it's because I upgraded the simulator to IOS 13...

Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This happens to most of times when i update the flutter SDK, But don't skip updating to make it better and easier because it is very easy to solve

It is necessary to fix - Removing contents of Pods folder will solve the issue, Here is the process of how to do this

  1. To completely clean(Removing all points to links) and create upgraded to the new(uninstall and installing again too), Write following command

    flutter clean
    rm -Rf ios/Pods
    rm -Rf ios/.symlinks
    rm -Rf ios/Flutter/Flutter.framework
    rm -Rf ios/Flutter/Flutter.podspec
    
  2. Then for reproduce Podfile follow this command

    rm ios/Podfile
    
  3. Finally your project is ready to good to go

    flutter run
    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...