No such module Crashlytics - Pod seems to be missing - swift

I constantly get an error "No such module Crashlytics" and I usually resolve it with hours of cleaning build folder, reinstalling everything, running pod install, etc, but I'm getting tired of this and want to fix the problem once and for all.
My podfile contains this entry:
pod 'Crashlytics', '~> 3.14.0'
I suspect the issue may be that my project is in an icloud directory and sometimes it doesn't download everything locally in an attempt to save drive space, but either way here is what I am seeing and would like some help:
My pods in navigation tree (notice Crashlytics)
Now what's interesting is that when I go to add the framework directly (Link Binary with Libraries) that all the other modules are there in my Pods location except Crashlytics!
So here you see it's not there in Pods!
Any ideas what's going on? I suspect this is an important reason why it is not seeing this.
Thank you!

Try to do the following:
Delete all 4 pods related files:
Podfile
Podfile.lock
yourprojectname.xcworkspace
Pods folder
Then reinstall everything again with pod init and pod install

Related

Suddenly can no longer compile - No such module 'SDWebImage'

So suddenly my project stopped working and I have no idea why and I'm running out of ideas.
I've found some blogs 1 2 and similar requests 1 2 3 for help but nothing seems to work for me. I may be doing something wrong though.
running xcode 13.4.1
I've got 4 distinct errors
Command EmitSwiftModule failed with a nonzero exit code
error: accessing build database "/Users/myuser/Library/Developer/Xcode/DerivedData/App-btdfdbatbdurmeawknwdwmjrqpsw/Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error
Virtual filesystem overlay file '/Users/myuser/Library/Developer/Xcode/DerivedData/App-btdfdbatbdurmeawknwdwmjrqpsw/Build/Intermediates.noindex/App.build/Debug-iphoneos/App DEV.build/all-product-headers.yaml' not found
/Users/myuser/myapp-ios-app/App/UI/Feed/FeedVC/FeedVC.swift:11:8: No such module 'SDWebImage'
I believe the EmitSwiftModule is related with not being able to handle the pod therefore causing the issue in the "all-product-headers.yaml" which is generated to fetch all the pods headers?
So assuming that all things in derived date are as they should be (because i've deleted it) I tried to focus on why is the pod no longer compiling. To my co-worker is working fine. Maybe he will have the same issue if he deletes the derivedData? Maybe we are using some older version files?
Some things I've tried:
clean the project
reset pods cache
delete derived data folder
update the pods
clean xcode preferences
for this pod they say we should add :modular_headers => true in pod file
re download the project clean to another folder
instead of cocoapods use the package manager for SDWebImage
due "all-product-headers.yaml" issue i read here that i could just add a header to my project
I've tried to create a project from scratch and just use the same pods and the project seems to run fine. But this is not a solution.
Can someone please help me? Any ideas?

How to testflight ios on m1? I still get issue nonzero

I get the major problem cause i can't deploy testflight ios, error said nonzero, i've tried to resolve but still error i don't it is minor or major because i new user on m1, let see pict on below :
This can happen because of many reasons. One common solution is to delete Podfile.lock file, Pods directory and .symlinks folder and run pod install again and build it.

Using firebase framework within cocoa touch framework

I’m developing a framework where I need to use firebase internally.
I added firebase framework manually to my framework as cocoapods didn’t work.
Now, I’m able to build my framework and use it on my local system as expected. But it creates problem when I ship it to other devs and it fails with following errors.
I tried several ways like adding firebase.h in framework's header file. But none of the approaches are working.
Also, apart from this approach, I tried manually adding firebase to main app, where it gave the logs saying duplicate frameworks found.
What am I doing wrong in adding firebase to framework ?
I've already checked some of the related question such as This and this
I suspect, that after transferring the code into the other machine, owner does not runs
pod install
terminal command, so physically the framework does not exist.
I can confirm Aaron answer: be sure to specify a complete, correct path.
I usually avoid as the "evil" cocoaPods (getting worse and worse to use..)
so I downloaded the zip and added all the folder.
I specify ONLY "Framework search path" and "Header search path".
Library search path is empty.
note: as suggested by documentation, I added FireBase.h AND module.modulemap, TOO. (and set -objC flag, too)
Adding one or more search paths for the framework and header file will resolve the issue.
First de integrate pod after try with fresh.
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
CocoaPods 1.5.0 static library feature does not work with FirebaseAnalytics because of the non-modular headers in FirebaseAnalytics.h.
Reported at CocoaPods/CocoaPods#7542.
Workaround is a similar post_install step similar to this.
Because the fix is a breaking change, it is targeted for the next Firebase major release.

How to handle a PBXCp error with EarlGrey?

I keep getting this error recently when I did a pod update, pod install and then executed my test cases using EarlGrey.
And when I try to resolve the path with terminal, I do not have anything in that path, nor do I have a EarlGrey-1.0.0 in my system.
The answer for the same seems to be a simple one.
Although had to struggle a lot to find and a lot of going back and forth with EarlGrey dev team.
First step is to fix the 'podfile'.
Details below:
My podfile used to look like this while I encountered the problem.
And couldn't possibly figure out. Deleted 'Podfile.lock' and 'Pods' folder repeatedly and performed 'Pod update' and 'Pod install'. No luck.
Then I tried changing the path in "EarlGrey Copy Files" in Build Phases by browsing the 'framework' directly from my finder. Although that could solve my problem temporarily, it wasn't permanent. I checked my schemes to make sure if nothing got messed up there!
If all these are intact, then the problem is with podfile. As per the instructions mentioned here: https://github.com/google/EarlGrey/blob/master/docs/install-and-run.md#step-2-add-earlgrey-as-a-framework-dependency
or have a look at my fixed podfile below:
Add this line as mentioned in the post install hook. Then do a pod install and clean build, should fix the problem.
although the above change may fix the problem, but after earlgrey gem 0.2 release, the integration process should be a lot smoother w/o any post_install or require in your Podfile.
for more info here

Target Integrity - The file "Pods-ios.xcconfig" couldn't be opened because its path couldn't be resolved. It may be missing"

I'm trying to utilize the four Examples that ship with RestKit Version 0.20.1 Currently trying to Build RKSearchExample. The Build "succeeds" but no simulator appears and I get two warnings
1st one - Target Intergrity - The file "Pods-ios.xcconfig" couldn't be opened because there is no such file. ....
2nd one - Target Integrity - The file "Pods-ios.xcconfig" couldn't be opened because its path couldn't be resolved. It may be missing"
I assume that this file is missing and even though the Build succeeds with only warnings, it missing is causing the project to not actually complete its Build.
Does anyone have any idea where to find this file? Has one built the Examples included in RestKit successfully?
Thanks!
Came across same problem. Solved it by
Make sure .pch file is updated and missing frameworks are added to Build Phases (See 'Adding Frameworks to the Precompiled Header File' in https://github.com/RestKit/RestKit/wiki/Installing-RestKit-v0.20.x-via-CocoaPods)
Close the workspace, re-run '$ pod install' in the project directory,
Re-open the project (using .xcworkspace), do a Clean and Build.
Hey i had this same problem, I was getting the following error when running pod update however i didn’t realise the update wasn’t working.
$ pod update
Analyzing dependencies
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory
It was because I forgot to run "pod setup" after installing cocoapods.
I ran pod setup from the terminal, followed it up with pod update (or pod install) and everything went to plan.