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

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!

Related

Command PhaseScriptExecution failed with a nonzero exit code - Xcode 13.4.1

I'm using M1 chip and xCode 13.4.1. I get the following React Native error while executing the app in the simulator:
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/Ibra/Library/Developer/Xcode/DerivedData/Mario-girhlsdkqiibhqhflwlyrybpo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E110.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
The problem persists even when I start a brand-new React Native project and try to execute it on iOS. What led to the error and how can it be fixed?
Thank you
Described answers didn't help me, but I started reading error description: and I found out that in error description on the line 2: my folder's name was written partially. Folder name consisted 2 words divided by 1 space example: "My folder" in the error was written just "My". I just changed folder's name to "MyFolder" and it helped me to fix the problem
it has multiple solutions:
to solve this run this command in terminal in ios folder , pod deintergrate and install pod with the commad pod install
Restart your Mac , it is some time due to cache, delete derived data and logs from XCode -> Prefrences and location
I faced same issue and I figured out following solutions:
What worked for me was npx react-native-clean-project and choosing y for all options, this will clean your React Native project by purging caches and modules, and reinstalling them again.
And here're some solutions that worked for others:
If you're using nvm, nvm unalias default could solve the issue.
This error could be due to Xcode can't find your node path, so try sudo ln -s $(which node) /usr/local/bin/node
Delete node_modules then cd ios && pod deintegrate then reinstall node modules and npx react-native start --reset-cache
I solve this issue with below procedure:
Keychain Access > Cetificates > Login
Find any Apple Certificate that has the blue + symbol
Change it to "Use System Defaults" and close it.
You'll see a pop up. Type in your password to update settings.
Close Keychain. Open your project, clean build files and run.
Note: Mac with M1, Xcode 14.1

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!

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

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?

module 'firebase_auth not found"

Hello guys,
I have been trying to run my flutter code in IOS 11 simulator but after integrating firebase into my project i'm getting this error while running for IOS simulator. Is there anything i can do to solve it?
I got the same problem,
First erase your Pods/ and Podfile, then run
$ flutter clean
then
$ flutter run
finally open in xcode Runner.xcworkspace
I met the same problem. These are what I performed to resolve.
At your project folder:
flutter clean
cd ios
rm -rf Podfile.lock
rm -rf Pods/*
flutter build ios
cd ..
open ios/Runner.xcworkspace
if flutter build ios takes a long time u can improve building time by edit Podfile (refer):
...
target 'Runner' do
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.26.0'
...
I hope this is useful.

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'

Resources