I'm trying to build a Flutter App. The app works absolutely fine with Andrioid. But, gives the following error in Xcode build :
ld: framework not found
clang error : linker command failed with exit code 1(use -v to see invocation)
I have also observed that, although i have my Flutter.framework and App.framework in my Flutter folder. It is not shown in Xcode.
I have tried the following solutions :
1.
cd ios
pod deintegrate
flutter clean
flutter run
pod deintegrate and pod install/pod update
Changing Run script in Build Phases to
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build
Go to Build Setting and search "Other linker flag".
Delete 2 lines:
"-framework"
""the pub name which is not found""
Related
I'm trying to build my react-native project after upgrading my Xcode but I'm getting an error:
"ld: library not found for -lBVLinearGradient
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Error screenshot in Xcode
I'm pretty sure this error is related to Cocoapods / Xcode because the app was building before the xcode upgrade.
What I have done so far:
Use the .xcworkspace file
Pod deintegrate / pod install (several times)
Uninstall and reinstall the Linear-Gradient npm
Setting the same iOS version in Deployment Target / info.plist
Remove the '.a' files from Build Phases / Link Binary With Libraries
Do you guys have any other suggestion? I'm literally stuck at this bug for 3 days. And the worst part is that I have made everything I could find on internet.
Thanks
Hello Guys I have updated the pod files today in my projects and I saw Crashlytics got updated from 3.8.3 to 3.8.4. After installation I am trying to run the project but I am seeing this error & unable to build the project.
In Terminal
Installing Crashlytics 3.8.4 (was 3.8.3)
In Xcode Issues
Undefined symbols for architecture arm64:
"_FABNetworkMaximumRetryCount", referenced from:
___51-[CLSBetaController loadUpdateWithCompletionBlock:]_block_invoke in Crashlytics(CLSBetaController.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Open Podfile Source code
Remove the fabric & Crashlytics pods
pod 'crashlytics'
pod 'Fabric'
Install pods
pod install
Both Fabric and crashlytics pods will be removed.
Open the Podfile once again and Add both pods as shown below
pod 'crashlytics'
pod 'Fabric'
Install pods once again
pod install
`Finally update Run script
Select Project >> Select Target >> Build Phrases >> Under Run Script
"${PODS_ROOT}/Fabric/run" YOUR_API_KEY YOUR_BUILD_SECRET
Make sure you open the .xcworkspace file not the project (.xcodeproj) file when working with pods. That should solve the issue with linking.
This worked for me.
Follow all the instructions: Bring in the 2 Frameworks, Add to the plist, add the Run Phrase script, but don't add:
Fabric.with([Crashlytics.self])
Clean and Build the project. This time it should work OK. No "_FABNetworkMaximumRetryCount" error
Then add back in:
Fabric.with([Crashlytics.self])
to didFinishLaunchingWithOptions, and now build again. For some reason that worked for me.
I followed the firebase offical guide to set up my podfile.
However I now get this error when I try to run my app:
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You need to open the .xcworkspace file after running pod install or pod update, not the .xcproject.
It should have been generated by the pod command, and will contain both your regular project and the CocoaPods project with the dependencies in.
Xcode version: 7.0.1.
OS-X: Version 10.11 Release.
Project details: Built for iOS 7 or above, CocoaPods: AWSCore (Problematic one, other Pods build fine), other developers are on Xcode 7.0.1 as well but not on El Capitan.
When I try to build, I get "linker command failed with exit code 1 (use -v to see invocation)", along with a few warnings linked to the error.
Warning 1: "ld: warning: directory not found for option '-L/Users/sonny/{PROJECT_NAME}/build/Debug-iphoneos'"
Warning 2: "ld: warning: directory not found for option '-F/Users/sonny/{PROJECT_NAME}/Pods/HockeySDK/Vendor'"
Warning 3: "ld: library not found for -lAWSCore"
Solutions
I've tried: I've tried a complete pod remove master repo, pod setup, pod install. I've tried verifying that the architecture settings are the same for build on both my project target and pods target. I've tried deleting entries on Testing->Debug && Release in Build Settings along with putting $(inherited) in all the linker files and framework search entries.
Other issues that might be related: In the Project Navigator, all of my Frameworks Podfiles are red, indicating an incorrect folder reference. But wouldn't pod install correct this? I simply can't find the pods.a files anywhere in my project folder but I do not know if this is what's causing the build to fail.
Project builds for all other developers but not me or my supervisor. I'm on El Capitan but he isn't.
Solved:
This was my solution and keep in mind, the solution for everyone will be different -
In {Project Name} target, under your specific "General" if you scroll down you'll have a list of Frameworks. You want to delete ALL the Pod listings there "libPods-this or that.a". Those frameworks have been linked in a bash script and in other places during a Pod install, but Pod install didn't delete them from the project build listing.
Once you remove all those, it should build.
I am creating a new iOS project with CocoaPods but have been running into build errors.
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/.../Library/Developer/Xcode/DerivedData/CustomerApp-gicarwczuupvbxarirfljoeveuoc/Build/Intermediates/CustomerApp.build/Debug-iphonesimulator/CustomerApp.build/Script-EBA9FF40759E4567A8222C4B.sh
cd /Users/.../Documents/CustomerApp
/bin/sh -c /Users/.../Library/Developer/Xcode/DerivedData/CustomerApp-gicarwczuupvbxarirfljoeveuoc/Build/Intermediates/CustomerApp.build/Debug-iphonesimulator/CustomerApp.build/Script-EBA9FF40759E4567A8222C4B.sh
Command /bin/sh failed with exit code 2
I have checked
PodsFile.lock and Manifest.lock and they are identical
PodsFile.lock and Manifest.lock have -rw-r--r- permission
PODS_ROOT has been set in xCode Build Settings
Project Configuration has been set to Pods for both Debug and Release
I have also tried to recreate the test project, delete and refresh the PodFile and the Pod dir and no success.
(Obviously) If I remove the build phases related to CocoaPods the project then successfully builds :-s
xCode 5.1 CocoaPods 0.33.1