I have tried every suggestion and solution in stack overflow and GitHub and yet I am not able to run pod install and I get pod : command not found , also my pod file is empty.
Warning: CocoaPods not installed. Skipping pod install.
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:
sudo gem install cocoapods
Running Xcode build...
Xcode build done. 6.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
error: /Users/seyedaliaghamali/Documents/projects/my_app/ios/Flutter/Debug.xcconfig:1:
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-
Runner.debug.xcconfig' in search paths (in target 'Runner')
warning: Capabilities for Runner may not function correctly because its entitlements
use a placeholder team ID. To resolve this, select a development team in the build settings
editor. (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
The error was caused by CocoaPods not being installed, therefore pod install can't be run. Simply install CocoaPods to solve this issue. Run either sudo gem install cocoapods or install it without sudo following this guide.
Related
I have update flutter version from 1.x to 2.8.x and now I am trying to run application in Xcode 13.1 and Simulator iOS 15. I am facing this error. 'mobileffmpeg/LogDelegate.h' file not found and Command CompileSwiftSources failed with a nonzero exit code I tried some available solutions but it won't work for me.
I am using latest cocoa pod version 1.11.3
Error-Log (After performing flutter clean and flutter pub get and pod install in iOS)
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/username/Library/Developer/Xcode/DerivedData/Runner-ewlkrnytkuoiywhfslyuauileapw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/mobile-ffmpeg-https.build/Script-4C68ADEB2D24F6C2D2249598537085F9.sh:
line 2: /Users/username/Documents/spieler_coach part 2/ios/Pods/Target Support Files/mobile-ffmpeg-https/mobile-ffmpeg-https-xcframeworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
error: the following command failed with exit code 0 but produced no further output
CompileC /Users/username/Library/Developer/Xcode/DerivedData/Runner-ewlkrnytkuoiywhfslyuauileapw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/webview_flutter_wkwebview.build/Objects-normal/arm64/FlutterWebView.o /Users/username/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/FlutterWebView.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'webview_flutter_wkwebview' from project 'Pods')
note: Building targets in dependency order
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
When you upgrade your flutter version some libs can not work anymore. Have you know meaning of ^ yet? For example: you're using lib abc in version 5.10 like this
abc: ^5.1.0 and abc has other version 5.2.0, ...5.9.0 and 6.0.0. If you use ^ that means version range is from 5.1.0 to 5.9.0. Maybe it has issue in ver 5.9.0. Moreover, sometimes the cause is not your library but its dependency. The abc lib uses xyz inside then it uses higher version that conflict with your flutter version.
So solution here is:
Try fix hard version of all libraries, remove using ^: abc: 5.1.0
If problem comes from dependency of your lib such as xyz. Check your xyz ver from pubspec.lock then add more package xyz into pubspec.yaml with compatible version.
Update:
You seems get issue with package https://pub.dev/packages/flutter_ffmpeg, please check Readme at section label:
2.1.2 iOS (Flutter >= 2.x) then replace two lines below:
def flutter_install_ios_plugin_pods(ios_application_path = nil)
↓
def flutter_install_plugin_pods(application_path = nil, relative_symlink_dir, platform)
plugin_pods = flutter_parse_plugins_file(plugins_file)
↓
plugin_pods = flutter_parse_plugins_file(plugins_file, platform)
Moreover, because the package was discontinued. You should change to https://pub.dev/packages/ffmpeg_kit_flutter
While running pod lib lint throwing the following issue.
error: Cannot code sign because the target does not have an Info.plist file and one is not being generated automatically. Apply an Info.plist file to the target using the INFOPLIST_FILE build setting or generate one automatically by setting the GENERATE_INFOPLIST_FILE build setting to YES (recommended). (in target 'App' from project 'App')
This works while using Xcode 13.4 but not working on Xcode 14
bundle exec pod lib lint throwing the eror
I'm getting the following error from xcode when I try to build a project I ejected from expo:
ld: library not found for -lAnalytics
I have the expo Segment package installed, and have gone through the regular ejection process, installing and configuring unimodules, and running npx install
Where should I start looking for this error? - Analytics (4.1.3) appears in my podfile.lock and I have an Analytics folder in the Library folder. I'm at a complete loss
The fix was exactly as #brentvatne said, I had opened the project via xcodeproj NOT xcworkspace. Xcode remembers your choice so on subsequent openings of xcode it had defaulted to xcodeproj.
Solution: open project with xcworkspace.
I successfully implemented the plugin on android but when I try to start the app on ios I'm getting an error message. When I disable the plugin and reinstall the app on ios, everything works just fine.
Here is my console log:
Launching lib/main.dart on iPhone 5s in debug mode...
Running pod install...
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
Running Xcode build...
Xcode build done. 41,0s
Could not build the application for the simulator.
Error launching application on iPhone 5s.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'FirebaseInAppMessaging' imported from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessagingDisplay/Firebase/InAppMessagingDisplay/FIDBaseRenderingViewController.h:19:
In file included from <module-includes>:1:
In file included from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Target Support Files/FirebaseInAppMessaging/FirebaseInAppMessaging-umbrella.h:13:
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessaging/FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging.h:21:2: warning: The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework). [-W#warnings]
#warning The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework).
^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
While building module 'FirebaseInAppMessaging' imported from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Headers/Public/Firebase/Firebase.h:53:
In file included from <module-includes>:1:
In file included from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Target Support Files/FirebaseInAppMessaging/FirebaseInAppMessaging-umbrella.h:13:
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessaging/FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging.h:21:2: warning: The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework). [-W#warnings]
#warning The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework).
^
1 warning generated.
1 warning generated.
While building module 'FirebaseInAppMessaging' imported from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Headers/Public/Firebase/Firebase.h:53:
In file included from <module-includes>:1:
In file included from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Target Support Files/FirebaseInAppMessaging/FirebaseInAppMessaging-umbrella.h:13:
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessaging/FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging.h:21:2: warning: The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework). [-W#warnings]
#warning The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework).
^
1 warning generated.
1 warning generated.
duplicate symbol '_OBJC_CLASS_$_FIRIAMDefaultDisplayImpl' in:
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessaging/FirebaseInAppMessaging.framework/FirebaseInAppMessaging(FIRIAMDefaultDisplayImpl.o)
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessagingDisplay/FirebaseInAppMessagingDisplay.framework/FirebaseInAppMessagingDisplay(FIRIAMDefaultDisplayImpl.o)
duplicate symbol '_OBJC_METACLASS_$_FIRIAMDefaultDisplayImpl' in:
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessaging/FirebaseInAppMessaging.framework/FirebaseInAppMessaging(FIRIAMDefaultDisplayImpl.o)
/Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessagingDisplay/FirebaseInAppMessagingDisplay.framework/FirebaseInAppMessagingDisplay(FIRIAMDefaultDisplayImpl.o)
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning build
note: Constructing build description
Has somebody faced the same issue and was able to fix it?
I fixed it!
comment firebase_in_app_messaging i.e (#firebase_in_app_messaging: ^0.1.1+3)
inside pubspec.yaml
Run flutter packages get
Delete Podfile.lock inside the ios folder
open up your terminal
cd to the projects ios folder
enter Vim Podfile
press "i" for insert mode
add these to lines to the bottom:
pod 'Firebase', '6.15.0'
pod 'FirebaseInAppMessaging', '0.16.0'
Press "esc" on your keyboard to save
enter pod install
enter pod update Firebase/Core
add uncomment firebase_in_app_messaging inside pubspec.yaml
run flutter packages get
You can try the following:
flutter clean.
rm ios/Podfile
rm ios/Podfile.lock
pod update
pod install
This could do the work.
I have an Xcode project with Cocoa Pods installed which I added a tvOS single view app target. I shared with the tvOS target all the pod installed. When I build and run my iOS target everything is ok, but when I run the tvOS target I get this error
"ld: library not found for -lAFNetworking clang: error: linker command failed with exit code 1 (use -v to see invocation)"
So after searching on the web I found a solution to this error. If I go to the Build Settings for the tvOS target and under Valid Architectures I remove arm64 and type armv7 the error disappears but then when i run the project i get this: the file couldn't be opened because you don’t have permission to view it.
First, you must sure you're opening the .xcworkspace file, not the .xcodeproj file.
Then, open your project folder and run command pod install and reopen .xcworkspace file it will fix your issue.