I have been trying to run my flutter project on my MacBook Air 12.1 but getting following error.
Error output from CocoaPods:
↳
Searching for inspections failed: undefined method `map' for nil:NilClass
I have tried cleaning up pods file or deleting pods file and reinstall pods, but facing the same issue since yesterday.
Below is my flutter doctor for the version I am using
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale
en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Android Studio (version 2020.3)
[✓] Connected device (1 available)
If I run the same project on Xcode I am getting a different error as follows:
flutter/.pub-cache/hosted/pub.dartlang.org/share_plus-3.0.4/ios/Classes/FLTSharePlusPlugin.h: No such file or directory
You can run this command in your terminal
sudo arch -x86_64 gem install ffi
and after Re-install dependencies
arch -x86_64 pod install
Related
i'm trying to using package: url_launcher of flutter to make call.
my project working til well and when i install url_launcher i got error like this
Parse Issue (Xcode): Module 'url_launcher_ios' not found
my flutter doctor fine
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Community Edition (version 2022.1)
[✓] VS Code (version 1.65.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
• No issues found!
some way i also try
flutter clean & flutter pub get
pod update repo && pod install
Try this:
Close Xcode
Check if your minimum deployed version in the pod file is not commented
Check if the package scheme is added in the info.plist file, here.
<key>LSApplicationQueriesSchemes</key> <array> <string>sms</string> <string>tel</string> </array>
Use the lastest version of the package (which is 6.1.7) (as of the date of this answer).
Do and run the following
Delete the pubspec.lock file in the project app directory.
flutter clean
flutter pub get
In the ios directory, run
pod install & pod install --repo-update
I am trying to setup CI/CD for flutter using jenkins, i am successful in building the android part but jenkins is unable to locate pod when building iOS.
when i execute flutter doctor, it returns cocoapods not installed.
Jenkins Output:
+ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.2, on macOS 12.4 21F79 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 13.4)
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] Connected device (1 available)
[✓] HTTP Host Availability
! Doctor found issues in 1 category.
[Pipeline] sh
+ pod install
/Users/mobilesotf/.jenkins/workspace/TPL Surveyor app#tmp/durable-f6e4ebbb/script.sh: line 1: pod: command not found
I use Mac M1 and After I upgrade Xcode 13.3.1 , I got this error when I make a build for the project:
Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1ec461eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x103b884f8). One of the two will be used. Which one is undefined
here is Flutter doctor:
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale en-SY)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Community Edition (version 2021.2.3)
[✓] VS Code (version 1.67.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
After I made a search, they said the problem was from flutter_svg library however, I tried to downgrade the version of the library but nothing changed.
Plus I tried these commands:
cd ios
rm -rf ~/Library/Caches/CocoaPods
rm -rf Podfile.lock
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
then these:
pod deintegrate
pod setup
pod install
and I still got same error
Any suggestions :(
Thanks in advance
I'm having an error with the flutter_facebook_auth plugin when trying to generate an Archive in Xcode.
When I run the application in debug mode, the app does not show any errors related to the plugin. However, when trying to generate an Archive to upload to the AppleStore, the xcode reports some errors, as follows:
my flutter doctor:
[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-x64, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.64.0)
[✓] Connected device (2 available)
I've looked at some related forums in search of a possible solution, but I haven't found it.
NOTE: Some of my attempts were
enter the Podfile and uncomment the line #platform :ios, '9.0' for version '10.0'
i did run the commands pod repo update, pod install and other commands that cause the pod to be restructured from a modification I have made.
Since I upgrade Flutter on the stable channel, I can't run on IOS simulators. This is an error that often appears when updating Flutter, only and despite my research I can't find any solutions. I tried to remove Podfile.lock, update pod and reinstall, change channel and upgrade but always the same error.
Flutter doctor:
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.3 19D76, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.45.0)
[✓] Connected device (3 available)
• No issues found!
Beginning of log:
Xcode build done. 12.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET gRPC-Core OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/flo/.pub-cache/hosted/pub.dartlang.org/camera-0.4.3+2/ios/Classes/CameraPlugin.m:62:2
4: warning: 'AVCapturePhotoOutput' is only available on iOS 10.0 or newer
[-Wunguarded-availability]
- (void)captureOutput:(AVCapturePhotoOutput *)output
^
In module 'AVFoundation' imported from
/Users/flo/.pub-cache/hosted/pub.dartlang.org/camera-0.4.3+2/ios/Classes/CameraPlugin.m:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
/iPhoneSimulator13.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureP
hotoOutput.h:48:12: note: 'AVCapturePhotoOutput' has been marked as being introduced in iOS
10.0 here, but the deployment target is iOS 8.0.0
#interface AVCapturePhotoOutput : AVCaptureOutput
I share the solution that works for those who need it:
rm -rf ios/Podfile ios/Podfile.lock ios/Pods ios/Runner.xcworkspace