I am trying to build a Flutter app that uses Firestore, Cloud Functions, and Auth to upload to the App Store. I can use Flutter to build for iOS without problems, but building in XCode for a generic device fails. The build fails in the link stage with the error after a whole bunch of warnings about not finding the directories of various pods:
ld: warning: directory not found for option '-L/Users/jpsheehan/Library/Developer/Xcode/DerivedData/Runner-dbsrfhxjslbqvrhhrsdoiilfifvz/Build/Products/Release-production-iphoneos/AppAuth'
ld: warning: directory not found for option '-L/Users/jpsheehan/Library/Developer/Xcode/DerivedData/Runner-dbsrfhxjslbqvrhhrsdoiilfifvz/Build/Products/Release-production-iphoneos/BoringSSL-GRPC'
ld: warning: directory not found for option '-L/Users/jpsheehan/Library/Developer/Xcode/DerivedData/Runner-dbsrfhxjslbqvrhhrsdoiilfifvz/Build/Products/Release-production-iphoneos/FirebaseAuth'
...
ld: library not found for -lAppAuth
I have tried the following things without success:
Open Runner.xcworkspace, not Runner.xcproject
Delete Podfile, Podfile.lock, and Pods\
Drag Pods.xcworkspace into Pods folder in XCode
Does anyone have recommendations for how to fix this?
The problem was that my config files were not including the proper Pods-Runner files after I added flavors to flutter. I modified them to point to the correct paths.
Broken Version
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
Working Version
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-production.xcconfig"
#include "Generated.xcconfig"
I spent hours trying to fix this bug. Ultimately this is how I was able to resolve it
Before starting with Xcode Archive, used flutter build iOS
Changed the IOS Deployment Target to a higher target iOS 11.2 . Earlier I had something like 8.0 which was giving all the above errors.
Made sure that the IOS deployment targets in Xcode are same in the Project, Target and Pods
Related
I am getting following error when trying to run a react-native project in xcode simulator
ignoring file ../libDoubleConversion.a, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture arm64: "double_conversion::DoubleToStringConverter::ToPrecision(double, int, double_conversion::StringBuilder*) const"
Here is how my xcode is configured
Also added VALID_ARCHS in pod file and in project
Tried to add Linked Binary with libraries libDoubleConversion.a it didnt help. I also tried to exlude arm64 in Excluded architectures but then the error reverses Simulator-x86_64 -> Simulator-arm64 but on different file, Tried to use Xcode 13 beta same thing. So i got the point i am just going in circles and cant find a solution to successfuly run this project.
I found the answer here
https://stackoverflow.com/a/68273669/1393695
Turns out the newest version of Flipper-Folly (2.6.9) is causing this
issue. Replace that line
use_flipper!({'Flipper' => '0.92.0', 'Flipper-Folly' => '2.6.7'})
With this i got an error in Xcode could not find swiftSwiftOneOnoneSupport..., then i added this lib in Link binary with files. And managed to run the build successfully.
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 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.
I am trying to run flutter on Xcode with simulator But I get this error:
ld: library not found for -lFMDB
Please update all your current pubsec.yaml packages/dependencies that your project uses. Especially anything that uses Firebase or Facebook. If that doesn't work open your project in XCode and add the relevant libraries like so...
I use cocoaPods in my current project.
Because the 'Baidu map iOS SDK' don't have a pod spec so I just create one.
The 'Baidu map iOS SDK' use a '.a' static library and some header files, I add them into my project through cocoaPods
But when I build my project, it always has an error:
ld: library not found for -lBaiduMapApi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I google it then I try to set the Library Path in Xcode.
Both in my project and the target in Pods.
I am sure the path is correct, but the error still there.
Can somebody help me?
It's weird......
I remove whole my project and Recreate a new one.
And config the Podfile, update .....
When I back to the Xcode, build, Success!!!
I can find another way to solve this problems