Code pipeline library not found for -lGoogleToolboxForMac - ios

I'm getting the library not found for -lGoogleToolboxForMac while running the xcodebuild command from commandline.
Most of the suggestions for this issue is resolving using xcode project. The pipeline calls the Cloud based MacOS agent and doesn't have any physical access to Mac system.
I tried this suggestion command line option but no luck. How do I include lGoogleToolboxForMac part of the build command?
2018-12-10T01:51:35.9852980Z
2018-12-10T01:51:35.9853530Z ▸ Compiling main.m
2018-12-10T01:51:35.9854040Z ▸ Compiling UniversalAnalyticsPlugin.m
2018-12-10T01:51:35.9854790Z ▸ Compiling TouchID.m
2018-12-10T01:51:35.9855390Z ▸ Compiling TextResponseSerializer.m
2018-12-10T01:51:35.9856130Z ▸ Compiling TextRequestSerializer.m
2018-12-10T01:51:35.9856920Z ▸ Linking MyApp
2018-12-10T01:51:35.9857780Z ⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-hjgdkeujtihqvvhkvkijivuagzlb/Build/Products/Release-iphoneos/GoogleToolboxForMac'
2018-12-10T01:51:35.9858710Z ⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-hjgdkeujtihqvvhkvkijivuagzlb/Build/Products/Release-iphoneos/Protobuf'
2018-12-10T01:51:35.9859570Z ⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-hjgdkeujtihqvvhkvkijivuagzlb/Build/Products/Release-iphoneos/nanopb'
2018-12-10T01:51:35.9860760Z ⚠️ ld: directory not found for option '-Liphoneos'
2018-12-10T01:51:35.9861030Z
2018-12-10T01:51:35.9861860Z ❌ ld: library not found for -lGoogleToolboxForMac
2018-12-10T01:51:35.9861920Z
2018-12-10T01:51:35.9862190Z
2018-12-10T01:51:35.9862290Z
2018-12-10T01:51:35.9862870Z ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
My code pipeline includes the below steps:
Install Apple Certificate
Install Mobile Provision file
Install Node JS
Install Ionic
Install Cordova
Install NPM
Install Pod
Ionic Cordova Platform Add ios
Ionic Cordova Build ios
What I'm missing here?

I have the same situation, but I have an extra step between 6 and 7 to install cocoapods.

I had fixed a similar problem by running the command pod install in the platforms/ios/ directory after iOS has been added.

Related

ld: library not found for -lADEUMReactNative

I just create React Native project (0.64.1)
and I install appDynamic (21.4)
This is the version I found in my package.json
"#appdynamics/react-native-agent": "^21.4.0",
"appdynamics": "20.7.0",
How, about when I try to run the application on iOS device,
here is the error message I got:
ld: library not found for -lADEUMReactNative
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried the following method:
remove the Library Search Path
change the path of libADEUMReactNative.a under "Link Binary With Libraries" of "Build Phases"
which method I can tried? thank you
Make sure the pod version and the IOS deployment target is >= 11.
Then do pod install and build your project.

React Native iOS build succeeds locally but fails on CI server

I recently updated a React Native project to version 0.59, and the built-in AsyncStorage is now deprecated. So I installed the #react-native-community/react-native-async-storage package instead as advised, and linked the packages by running react-native link #react-native-community/async-storage.
The build now succeeds when running it in Xcode locally. However, when I try to run the build in my CI pipeline in Azure DevOps, it fails during linking:
# ...
▸ Compiling main.m
▸ Linking MyApp
⚠️ ld: directory not found for option '-L/Users/vsts/agent/2.149.2/work/1/s/ios/MyApp/System/Library/Frameworks'
❌ ld: library not found for -lRNCAsyncStorage
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
▸ Linking MyApp
⚠️ ld: directory not found for option '-L/Users/vsts/agent/2.149.2/work/1/s/ios/MyApp/System/Library/Frameworks'
❌ ld: library not found for -lRNCAsyncStorage
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-asjjausbybqgpsdjodrbvoyzaeqx/Build/Intermediates.noindex/MyApp.build/BetaRelease-iphoneos/MyApp.build/Objects-normal/armv7/MyApp normal armv7
Ld /Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-asjjausbybqgpsdjodrbvoyzaeqx/Build/Intermediates.noindex/MyApp.build/BetaRelease-iphoneos/MyApp.build/Objects-normal/arm64/MyApp normal arm64
(2 failures)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
##[section]Finishing: Xcode build, sign and export
Further up it does look like it has been built:
# ...
▸ Building RNCAsyncStorage/RNCAsyncStorage [(Release)]
▸ Check Dependencies
▸ Building library libRNCAsyncStorage.a
▸ Building library libRNCAsyncStorage.a
▸ Copying RNCAsyncStorage.h
▸ Copying RNCAsyncStorageDelegate.h
# ...
Any ideas what might cause this?
Try setting the Deployment Target to 11.0 in Build Settings / Deployment / iOS Deployment Target.
What might be happening
I was having the exact same issue with a different library and this worked for me.
Adding this ${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage to Library Search Paths worked for me.

ld: symbol(s) not found for architecture x86_64 (realm)

I'm using realm in my react-native project: https://github.com/kdnakt/pixelarn
After running ncu -u on my Mac to update react-native-elements to 1.0.0 and realm to 2.23.0, react-native run-ios would not start my app and I'm getting the following error:
realm::jsc::ObjectWrap<realm::js::CollectionClass<realm::jsc::Types> >::create_class() in libRealmReact.a(jsc_init.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
I saw some Github issues and tried rm -rf ~/Library/Developer/Xcode/DerivedData/ and rm -rf ios/build/ in my project directory, but still failing ... how can I start my react native app with react-native run-ios?
There was some modifications after upgrade to react native 0.58.5 and above versions.
Xcode Archive build failed with react native project
Try to manually link the JavaScriptCore.framework in "Link Binary With Libraries". I had the same problem and it work for me.
Image

Xcode unable to archive react native project

I am getting this error when I try to archive my React Native project.
I am able to run debug/release on iPhone and Simulator. react-native run works as well.
I have read through similar issues and tried:
Make sure I'm opening xcworkspace instead of xcodeproj.
Deleting Podfile.lock and running pod install and cleaning project.
Setting Build Active Architecture Only to Yes
Build output:
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/DoubleConversion'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/Folly'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/Google-Maps-iOS-Utils'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/React'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/glog'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/react-native-google-maps'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/react-native-maps'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/react-native-video'
ld: warning: directory not found for option '-L/Users/mans/Library/Developer/Xcode/DerivedData/teacher-gkqevnksdssljsbrniwvxaoxiwhi/Build/Intermediates.noindex/ArchiveIntermediates/teacher/BuildProductsPath/Release-iphoneos/yoga'
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Did you try turning it off and on again? Try rebooting your Mac, often these problems go away.
Also try deleting the whole contents of DerivedData, in your case:
rm -rf /Users/mans/Library/Developer/Xcode/DerivedData/*
Does it work with some fresh project you get somewhere from GitHub?

Xcode returns linker error "library not found for -lFirebaseAuth"

I wanted to test firebase initial app on Unity. I made a build from Unity in macOS and in Xcode project folder, I have runned the pod command successfully.
pod install
After this I opened Xcode project and I clicked to build button. Before this, I was getting framework not found error. I fixed it and now I am getting
ld: warning: directory not found for option '-L/Users/ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-giljorflztrrychfchrkhcfbqtbh/Build/Products/ReleaseForRunning-iphoneos/FirebaseAuth'
ld: warning: directory not found for option '-L/Users/ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-giljorflztrrychfchrkhcfbqtbh/Build/Products/ReleaseForRunning-iphoneos/FirebaseCore'
ld: warning: directory not found for option '-L/Users/aliavci/Library/Developer/Xcode/DerivedData/Unity-iPhone-giljorflztrrychfchrkhcfbqtbh/Build/Products/ReleaseForRunning-iphoneos/GTMSessionFetcher'
ld: warning: directory not found for option '-L/Users/ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-giljorflztrrychfchrkhcfbqtbh/Build/Products/ReleaseForRunning-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-giljorflztrrychfchrkhcfbqtbh/Build/Products/ReleaseForRunning-iphoneos/nanopb'
ld: library not found for -lFirebaseAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have already added library pathes to library search path. I added some screenshots as attachments.
I solved the error by opening ".xcworkspace" file, instead of ".xcodeproj" file.

Resources