How to clean xcode project and set up everything back - ios

My iOS app isn't working anymore, and I have no idea what to do anymore.
I removed all pod addons, removed Podfile.lock made a pod deintegrate, made a rm -rf ~/.cocoapods/repos/trunk/, and a rm -rf /Users/antoinenedelec/Library/Developer/Xcode/DerivedData/*, and removed my .xcworkspace file.
My Podfile contains then:
# Uncomment the next line to define a global platform for your project
# platform :ios, '13.2'
target 'la soundbox' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# FIRE BASE & GOOGLE AD MOB
#pod 'Firebase/Auth'
#pod 'Firebase/Firestore'
#pod 'Firebase/Analytics'
#pod 'Google-Mobile-Ads-SDK'
end
Then I make a pod install, launched the new .xcworkspace file.
I a on deployment Target 13.2 on my target and on my project.
If I compile I have a lot of errors because I have dependencies with those project.
If I add ANY of the pod up there and make a pod install. I have dependencies error, missing package like the following:
framework not found fblpromises
34 duplicate symbols for architecture armv7
gRPC-C++ memory error xcode
Framework not found "googleutilities"...
I never have the same error.. Why can't I simply add all the pods, make a pod update and run my project ?
I'm totally lost right now.. Any Ideas ?

Try to create a new project, copy all your files with code, except pods. And then init and install your pods again.

Related

no such module 'FirebaseDatabase' when importing Firebase [duplicate]

I'm trying to import JSQMessagesViewController:
import JSQMessagesViewController
And it gives me the error 'no such module'. I've seen many people with this problem on the web but I can't find the solution. Here's my podfile:
# Uncomment this line to define a global platform for your project
platform :ios, ‘9.2’
# Uncomment this line if you're using Swift
use_frameworks!
target ‘IXODES’ do
pod 'JSQMessagesViewController'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
end
I've tried cleaning the build, also pod deintegrate and then pod install and pod update. Nothing works and I can see the library in my project like the rest. Any help?
perhaps you tried to import the file and the file is missing by any chance,
a few things you can do.
you can clean the project from cocoapods and re-install cocoapod(this helped me onetime i got the same problem the file were missing) you can do that by
run this code on the terminal
[sudo] gem install cocoapods-deintegrate
once done
cd your file
and then run thispod deintegrate
then you're all set! and re install it
---- another solution ---
try these
1-Adding all of the .frameworks to the Projects Build Phases -> Link Binary With Libraries
2-Selecting each framework and building it. You can do this by selecting your project name next to the run arrow.
3-Cleaning the project and restarting my computer.
hope it helps

IOS - How to Fix the "ld: library not found for -lBolts" Error?

I've got this annoying error for number of days now:
I've tried:
Deleting pods folder & pod file & pod.lock file & .workspace file and reinstalling pods again.
removing all library search paths in pods.xconfig file
this is my pod file :
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
target 'MyApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MyApp
pod 'Firebase'
pod 'Bolts'
pod 'Firebase/Firestore'
pod 'Google-Mobile-Ads-SDK'
pod 'Fabric'
pod 'Crashlytics'
pod 'PersonalizedAdConsent'
pod 'Highcharts', '~> 6.1.0'
pod 'FBSDKCoreKit'
pod 'GoogleToolboxForMac'
pod 'FirebaseAnalytics'
end
This is my problem, If you need any other indications or code about my issue, feel free to leave me a comment and I'll edit the question
Try to run following commands in Terminal (in your project's folder):
pod deintegrate // removes all pod related configurations from your project
rm Podfile.lock //removes the saved reference to the pods
pod install // reinstalls the pods
Clean your project (In Xcode: ⌘+K and ⌘+Shift+K)
And finally make sure you compile the same target from which the error originates (You should be able to see the target it originates from within the issue navigator ⌘+5)

Xcode and Cocoapods "No such module" error

I recently upgraded to Xcode 8 and an existing project to Swift 3. After having a variety of issues with Cocoapods, I decided to start over from scratch. After running pod deintegrate and deleting Podfile, Podfile.lock, and [Project].xcworkspace, I had a blank slate as far as Cocoapods was concerned.
I then took the following actions:
Opened a terminal at the project location and ran pod init, then pod install (using the stub Podfile that pod init creates).
This appeared to be successful, but came with the following two warnings:
[!] The `Xena [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Xena [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
At this point, opening Xcode and building the project gives the "No such module" error, which is entirely expected.
Following the instructions at this question solves this problem and rerunning pod install is a success.
Closed Xcode, added the modules I'm using to the Podfile (see below), the ran pod install again. According to the terminal output, this is successful.
Opened Xcode and built the project. I again receive the "No such module" error, specifically No such module 'ReactiveCocoa'
I have confirmed that the same problem occurs with SnapKit, Hue, KMPlaceholderTextView, KeychainSwift, and Siren, depending on the order of the import statements. For some reason, none of the Google modules are affected by this problem.
My Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Xena' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Xena
pod 'ReactiveCocoa', :git => 'https://github.com/ReactiveCocoa/ReactiveCocoa.git'
pod 'SnapKit', '~> 3.0.2'
pod 'Hue', '~> 2.0.1'
pod 'KMPlaceholderTextView', '~> 1.3.0'
pod 'GooglePlacePicker'
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'KeychainSwift', '~> 7.0'
pod 'Siren'
target 'XenaTests' do
inherit! :search_paths
# Pods for testing
end
target 'XenaUITests' do
inherit! :search_paths
# Pods for testing
end
end
Make sure you are opening .xcworkspace and not .xcodeproj file.
You may further look into this post.
Also under : Target > General > Linked Frameworks and Libraries
Make sure your frameworks are there. Even Pods_Xena.framework is there
Try:
Xcode ->Preferences ->Location ->DerivedData
open the folder DerivedData and move it to Trash
Uncomment the next line to define a global platform for your project
platform :iOS, '9.0'
Uncommenting the second line in your pod file will help you.

Firebase framework not found

I've been trying to migrate my project to cocoapods.
I feel like i'm almost there but I'm stuck in:
ld: framework not found Firebase for architecture x86_64
error: linker command failed with exit code 1 (use -v to see invocation)
I'm trying to compile using my "app.xcworkspace" and the project looks like this:
Also:
I've tried starting other projects and firebase works there so it's a problem with THIS project settings... Any idea?
My podfile looks like this:
# Uncomment this line to define a global platform for your project
# platform :ios, ‘8.0’
target 'Parti' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Parti
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
target 'PartiTests' do
inherit! :search_paths
# Pods for testing
end
target 'PartiUITests' do
inherit! :search_paths
# Pods for testing
end
end
It might be relevant to add that the error happens when xcode tries to "Link /Users/myname/Library/Developer/Xcode/DerivedData/Parti-gsdsljzobcnqjkgutfpjasgrsfck/Build/Products/Debug-iphonesimulator/Parti.app/Parti"
I know it sounds far fetch, but:
Clean the project. Product -> Clean
Restart XCode (not always needed)
Run pod update & pod installfrom the project folder
Update: The Podfile should more like:
use_frameworks!
target 'Parti' do
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
end
target 'PartiUITests' do
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
end
Make sure you have added $(inherited) in your Header Search Paths, Framework Search Paths and Library Search Paths for your project target.
Also make sure that in frameworks folder in your project file(Not in your Pods, click on the Project Name in the Project Navigator), the "libPods-YourProjectName.a" is not red. If yes, delete it and build again.
add $PROJECT_DIR/Pods (make it recursive)
to Framework search paths
for whatever reason only this helped me, maybe you too
Just found the answer. Seems like I had an old geofire version and the new one is not available as a Pod yet...
Github Issue link
Thank you for your answers.
Some hints :
Make sure that your Podfile is correct (did you forget to uncomment the use_frameworks! line ? Have you correctly added the pod ?)
Have you forgotten to run "pod install" ?
Have you tried cleaning the project and the build folder ?
Another possibility is your project name is not ASCII. For example, you may have Chinese characters in the name.
In such case, In "general" -> "Frameworks, Libraries, and Embedded Content", remove "Pods___.framework", and add the one with the right name under "Pods/" would help.

Xcode Architecture issue

I am using xcode 6.4 in my project, it contains cocoapods where Pods are as follows:
pod 'ZXingObjC', '~> 3.0'
pod 'Google-Mobile-Ads-SDK'
pod 'iRate'
pod 'NewRelicAgent'
pod 'GoogleAnalytics'
pod 'Appirater'
pod 'Crashlytics'
But, after I update my pods I am getting the error which I attached to this image: Error is becuase of one pod
Need One project prefix header file
And add in bulid setting this .pch file.
So
FOR OBJECTIVE_C
yes this podfile should work,
FOR SWIFT add,this line too
use_frameworks!
YOU DON'T HAVE TO MENTION THE VeRSION OF ANY LIBRARY IF NOT MENTIONED ON COCOAPODS.
Lastly if you have taken care of all these
then try cleaning project cmd
+ shift+ k and then run project.
If still not working then delete manually the dependencies folders and reinstall them
# if there is problem with Google MobileAds-ios-Sdk, then you are stuck. Because there is some problem with them, and hence it would be better to install Google MobileAds-ios-Sdk manually only

Resources