ld: library not found for -lDoubleConversion React Native 0.62.2 when "Archive" in Xcode but I can build and run my app with Xcode - xcode

When I do archive build, I got the following error. This has been discussed on stackOverflow before. But most of them are the case that the error happens at debug/build level. I don't have problems with build/run. Also, I tried everything I possibly can but none of them helps.
Here is how I get this error:
1) rm -rf node_modules
npm install
cd ios
pod install
2) open MyAppName.xcworkspace with Xcode.
3) Product -> Archive.
some more info about my setup:
in my Podfile, DoubleConversion lib is there.
pod 'DoubleConversion', :podspec => "#{rnPrefix}/third-party-podspecs/DoubleConversion.podspec"
from Xcode, this lib DoubleConversion is also linked
Does anyone can give me some suggestion?

Related

XCode does not create pod dependencies for React Native Project

Project config:
Xcode # 13.4.1 (13F100)
cocoapods # 1.11.3
React Native # 0.64.0
iOS target # 11.0
I can't build this mobile project and XCode says there's file missing.
fatal error: module map file '/Users/myself/Library/Developer/Xcode/DerivedData/myproject/Products/Debug-iphonesimulator/NextLevelSessionExporter/NextLevelSessionExporter.modulemap' not found
When I run pod install, says its has run without errors, but checking into Xcode/DerivedData/myproject/Build/Products/Debug-iphonesimulator and it does not show all the dependencies folder as it should.
I tried
Removing ~/.cocoapods folder
Deleting ios/Pods/ folder and Podfile.lock
Deleting DerivedData folder completely
No progress so far.
Any guidance will be welcome.
Follow the below steps:
Delete cocoapods folder, ios/Pods/ folder and Podfile.lock file
Deleting DerivedData folder
delete node_modules folder
Run command pod install or pod repo update
Hope it will help you!

fatal error: 'boost/preprocessor/control/expr_iif.hpp' file not found

I have a React Native project. I recently updated to macOS Big Sur 11.3 and XCode Version 12.5 (12E262).
When I build the project in XCode I get the following error:
../ios/Pods/Headers/Public/Flipper-Folly/folly/functional/Invoke.h:22:10: fatal error: 'boost/preprocessor/control/expr_iif.hpp' file not found
#include <boost/preprocessor/control/expr_iif.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
When I browse to Pods folder, expr_iif.hpp file exists.
I tried removing Pods folder, Podfile.lock, .xcworkspace. Deleted npm cache. Then ran pod install.
But no luck.
This build-time error is thrown by Flipper-RSocket and Flipper-Folly.
I can provide further details if requested.
I just had this issue and it happens when you have incompatible versions of Flipper pods.
This worked for me:
Update your Podfile to install Flipper like this:
use_flipper!({ 'Flipper' => '0.93.0', 'Flipper-Folly' => '2.6.7', 'Flipper-DoubleConversion' => '3.1.7' })
Update deployment target on both Podfile and Xcode project o 12.1 or newer:
platform :ios, '12.1'
Remove Podfile.lock
pod install --repo-update
Close and re-open the Xcode project
You may also try fixing permissions if the above is not enough for you:
chmod -R 755 ios/Pods/boost-for-react-native
The error went away after this.
It completely removes Flipper, but here's a workaround I used
disabled Flipper in PodFile (as explained in an answer here: React Native Project is not running on iOS Simulator)
deleted Pods directory
re-ran npx pod-install
started the application (npx react-native run-ios)
Instead of giving him the precise version I used the next line:
use_flipper!
Put it in Podfile and run: pod install --repo-update.
It worked for me!

How to create a native module in React Native

I'm trying to follow this guide here to create a native module in React Native.
https://facebook.github.io/react-native/docs/native-modules-setup
When you create the native module these are the setup instructions.
cd react-native-my-library/example
yarn
cd ios
pod install # required starting with React Native 0.60
cd ..
react-native run-ios
I don't have an example subfolder and there is also no pod file installed in the ios directory so pod install just gives me this error.
[!] No `Podfile' found in the project directory.
It's also creating my project with an older verison of react native. It's using react-native: 0.59.10.
The current version I have installed is react-native: 0.61.5.
I'm on Mac OS X 10.15.3.
I was having this issue as well yesterday, here's one reply from the repo owner. Append the following to podfile will do
pod 'react-native-my-library', :path => '../react-native-my-library.podspec'
At the same time I realized podfile is not really necessary unless your module required other depedendency to be installed? Otherwise, I just build on top of .xcworkspace and link to my project. Ta-da, works fine!
** One thing to keep in mind is that, .xcworkspace is not able to compile due to the complain of missing React/***.h

framework not found GoogleMapsCore Error

I'm using cocoapods in my project and I have googlemaps(2.5.0) and googleplaces(2.5.0) in my podfile(which I've installed with 'pod install').
However, I'm getting this error when I try to build:
ld: framework not found GoogleMapsCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've changed 'Build Active Architecture Only' to NO in my Build Settings. I'm also in my project.xcworkspace NOT my project.xcodeproj file. I've even tried changing my valid architectures but none of this is working.
It might be helpful to note that, inside my workspace Project Navigator, for some reason I have my project.xcodeproj file in red. project.xcodeproj is usually never there let alone red.
Finally a solution:
pod deintegrate
pod install
I had to reclone my Git project(because I had tried too many solutions to backtrack through new warnings and errors) then I just did the above commands in terminal.
Though #Sam King's solution worked for me, I considered it as a hard fix without knowing the actual issue.
The issue for my case was, I had accidentally deleted the GoogleMapsCore framework(Might be from 'Manage System Storage').
So, I just checked out an older version of my app and the issue got fixed.
For those using Ionic Framework,
Remove googlemap plugin and install again. It worked for me.
Had the same problem after deleting GoogleMapsCore by mistake. and here's what worked for me:
From my project podfile , commented out the pods related to google maps, in my case
//rn_maps_path = '../node_modules/react-native-maps'
// pod 'react-native-google-maps', :path => rn_maps_path
// pod 'GoogleMaps'
// pod 'Google-Maps-iOS-Utils'
cd ios && pod install , to remove the pods i commented out
then i uncommented the pods i have commented earlier in step 1
cd ios && pod install to install the pods again
ran a clean build on xcode and it worked.
Remove googlemap related plugin and install again. It worked for me.
Please dont do deintegrate pod, if you do all libraries get install as new, that some how some libraries would not support your platform.
The better solution is to install the google places along with the GoogleMaps pod it will definitely work
Try this
pod 'GoogleMaps'
pod 'GooglePlaces'
if it doesn't work then open the terminal and do this below steps for your project
pod deintegrate
pod install
then
pod 'GoogleMaps'
pod 'GooglePlaces'

CocoaPods integration problems: dyld: Library not loaded: #rpath/Bolts.framework/Bolts

I know that there are almost 1000 questions like this one, but I've tried all the answers on the others and no one could helps me.
I'm creating an app in Swift 2.0 that works with cocoapods. In my podfile I have:
platform :ios, '8.0'
use_frameworks!
target 'TargetName' do
pod 'SinchRTC'
pod 'SinchVerification-Swift'
pod 'Parse'
end
And everything was working fine, at one point I tried to run again the app and I got this error:
dyld: Library not loaded: #rpath/Bolts.framework/Bolts
Referenced from: ...
Reason: no suitable image found.
Did find: ... (lldb)
Then I tried everything like deleting and adding again pods, create a new project, deintegrate and reinstall cocoapods...
Everytime I get the same error and if I remote Bolts.framework I get the error on another framework.
What should I do?
P.S. The app isn't running also in the simulator, not only on device.
I've solved it! I tried everything but then I remember that the problem should also be the certificate signing my project and I run this lines in the terminal:
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
This worked and the app is running right now on my device!

Resources