swift Firestore 'absl/numeric/int128_have_intrinsic.inc' file not found - swift

I just recently installed an extension to Firebase called Trigger Email which uses a Cloud Firestore Collection. I was trying to Firestore to my iOS project to use it, and got the following error:
'absl/numeric/int128_have_intrinsic.inc' file not found
Error in Xcode
Here are the contents of my podfile as well:
platform :ios, '10.0'
target 'FRC Lookout' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FRC Lookout
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'Firebase/Database'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift'
pod 'MMDrawerController', '~> 0.5.7'
pod 'SwiftyJSON', '~> 4.0'
pod 'Alamofire'
pod 'SVProgressHUD'
pod 'SpreadsheetView'
pod 'CollapsibleTableSectionViewController', '~> 2.0.1'
pod 'JTAppleCalendar', '~> 7.0'
pod 'PageControls'
pod 'SwiftKeychainWrapper'
end
It also looks like the file does exist, but either the wrong path or something.
Any help would be much appreciated.

I got it to work finally after doing a
pod deintegrate
then redoing my
pod install

So I have the same issue as you are having. Well different Pods of course. Did some research...
I've notice when updating or installing Pods, there was a message that says there is an update for CocoaPods. (Just now it's 1.8.4)
So I ran the command > gem install cocoapods
after everything was updated, my project can compile!
I hope this can work for ya and same with everyone else...

For me the other answer did not work. There's also another piece to the puzzle as with the Version 6.13.0 - November 14, 2019 release we see this note
Removed Firestore's dependency on the Protobuf CocoaPod. If you're
manually tracking dependencies, you may be able to remove it from your
build (note, however, that other Firebase components may still require
it).
Added a dependency on the abseil CocoaPod. If you're manually tracking
dependencies, you need to add it to your build.
So even after updating etc, I had the same error as the OP. To correct that, I removed CocoaPods from my project by quitting XCode and then using the cocoapods app. File->Remove Cocoapods from a project.
I then dropped into terminal an updated cocoapods manually
sudo gem install cocoapods
and then navigated to the project folder and then
pod install
to reinstall updated pods in the project. Then when running the project the OP's error was resolved but I was left with
Framework not found Protobuf
so there was some reference to protobuf hanging around. In the project I went to
Target->Build Settings
and using the find field, search for Protobuf which should find it in the Other Linker Flags.
In the Other Linker Flags option, you may see a highlighted section in the middle of that line. Double click to open those frameworks in a popup window and scroll down the list until you find
-framework
"protobuf"
Select those two lines, hit the minus sign at the bottom of that popup window to delete that link, clean and rebuild.
That worked for me.

Deleted the pod files from the project and all files related to pods. Then installed once more in the same project folder and compiled. This worked for me. Used pods with its version number
Ex:
pod 'Firebase/Core', '6.1.0'
pod 'Firebase/Auth', '6.1.0'
pod 'Firebase/Firestore', '6.1.0'
pod 'Firebase/Storage', '6.1.0'
pod 'Firebase/Functions', '6.1.0'

The way to fix this error is to go into your podfile and remove firebase firestore. Then check that you have completed setting up your database on the firebase website. After removing firebase firestore run pod install. This will remove Firebase Firestore. Then go back in to your podfile and re-add Firebase Firestore. This worked for me!

This is caused by a cocoapods environment bug.
To fix it, completely uninstall and reinstall cocoapods.
1)
gem uninstall cocoapods
gem uninstall cocoapods-deintegrate
gem uninstall cocoapods-downloader
2)
sudo gem install cocoapods
3)
pod install

As some others have mentioned the correct answer is to use an updated version of cocoapods.
To check the version of cocoapods use pod --version.
If you see 1.5.0 you need to be on a higher version such as 1.8.4.
sudo gem install cocoapods -v 1.8.4
If after installation you are still not seeing an updated version when you do pod --version then you could be running the wrong pod file.
You'd need to correct that in your ~/.bash_profile.
You can type pod env to see more info about the pod file.
The executable pod that I use is in ~/.rbenv/versions/2.4.1/bin/pod.
Side note. If you have openssl errors you can use one of the following commands.
Use version 1.0.0 (most likely will need this)
brew uninstall --ignore-dependencies openssl
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Upgrade to the latest
brew uninstall --ignore-dependencies openssl
brew install openssl

Related

Error of 48 duplicate symbols for architecture x86_64

I had error:48 duplicate symbols for architecture x86_64:
when I followed the tutorial: https://firebase.google.com/docs/cloud-messaging/ios/client#analytics-enabled, after install required libraries in cocoapods, it started to pop me this error message:
Then I followed my discussion to remove -ObjeC in other linker flags in this StackOverflow discussion: Duplicate symbols for architecture x86_64 under Xcode, but I did it in my project IFTTT rather than pods, should I do remove -ObjeC in other in Pods or my project? I did it on my project page, and after removing it, it still displays -ObjeC on the setting page, and I still got the same error message:
does anyone know why? Yea I was totally in a mess, can someone please help me with this? thank you!
Update:
I came out the solution in my case, I had cocoapods and some libraries installed before, I am trying to set up firebase, so if you encounter these problems when installing firebase, definitely reference this post. I followed the answer below, and before that, I added:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = "NO"
end
end
end
and then did following command:
$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod cache clean --all
$ pod install
as answer shows, then everything worked out, I did delete some duplicate files when there was file.c and file 2.c, but I didn't delete all to try, I just did what I had above and fix this problem, hope this will help future developers, don't freak out! trust yourself and other people from StackOverflow!
Sometimes that happens with me when I try to update pods. What happens is a duplicate of some files in pods gets added in. It will look something like this:
Firebase.h
Firebase 2.h
You could just go through all the pods you installed and delete the duplicates, or you can deintegrate and install again.
$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod cache clean --all
$ pod install

Pod Install: Unable to find source ref for target

In macOS terminal I keep getting the [!] Unable to find source ref ... error message whenever I try to run pod install for any Xcode project. I have installed CocoaPods.
Full Error Message Examples:
[!] Unable to find source ref for CLTypingLabel.swift for target CLTypingLabel.
[!] Unable to find source ref for SVIndefiniteAnimatedView.m for target SVProgressHUD
[!] Unable to find source ref for NSButton+WebCache.m for target SDWebImage.
podfile:
platform :ios, '13.0'
target 'Myapp iOS13' do
use_frameworks!
pod 'CLTypingLabel'
end
I figured out how to get CocoaPods working! It seems there might be an issue installing pods on a secondary macbook account even though the account has full admin privileges. I logged into the primary or initial account created on the macbook, installed CocoaPods and pod install was able to install dependencies. I will also need to work on my project on the primary account instead.
My solution, brew must be uninstalled first:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
and
brew uninstall cocoapods
brew uninstall ruby
and
sudo gem install ffi
sudo gem install cocoapods
later remove (#) (#platform :ios, '15.0') and change ('15.0'):
# Uncomment the next line to define a global platform for your project
platform :ios, '15.0'
target 'Myapp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'CLTypingLabel'
end
finally
pod install

"Use of undeclared identifier '__BYTE_ORDER' " error after updating pod

Getting these two errors, after updating pods:
Use of undeclared identifier '__BYTE_ORDER'
Use of undeclared identifier '__LITTLE_ENDIAN'
Using Xcode Version 11.2.1 (11B53)
Well, I have solved my problem. I have done the following steps:
1) Uninstall pod:
To remove pods from a project completely you need to install two things.
a) Cocoapods-Deintegrate Plugin
b) Cocoapods-Clean Plugin
To install those, open your terminal and type
sudo gem install cocoapods-deintegrate
(Press enter)
sudo gem install cocoapods-clean
Now go to your project directory by typing this on your terminal
cd (path of the project) //Remove the braces after cd
Then press enter and type
pod deintegrate
to deintegrate pod. Then type
pod cache clean --all
to clean the cache. Now type
pod clean
to clean pod directory.
After completing the above tasks there should be the Podfile still remaining on your project directory. Just delete that manually or use this following command on the terminal.
rm Podfile
Then delete the DerivedData from Xcode by typing
rm -rf ~/Library/Developer/Xcode/DerivedData
Or follow the link to delete it manually.
Now remove Cocoapods from the system
sudo gem uninstall cocoapods
That's it. Now you have your project free from Pods & Cleaned.
2) Install pod:
After that, install a fresh pod to your project by following:
sudo gem install -n /usr/local/bin cocoapods
For MacOS, Catalina
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 seem not working. More info is here. Then give your project path
cd /your project path
Now type
pod setup
Init the Pod
pod init
Open Pod file and add Pod list into it
For example
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
Then install those pods.
pod install
Now open your-project.xcworkspace. The errors should be gone.
Thanks
A clean installation of Firebase pods worked for me:
1) Comment out or temporarily remove all Firebase related pods from the Podfile
2) Update pods - this will remove all previously installed pods - run:
pod update
3) Uncomment or add back the Firebase related pods and run 'pod update' to install them.

Cocoapods ReactiveKit swift compiler error

I am trying to add ReactiveKit To my Xcode project with CocoaPods.
That is my pods file:
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
target '<my-proj-name-here>' do
use_frameworks!
pod 'SideMenu'
pod 'ReactiveKit'
pod 'Bond'
end
I ran the following lines from command line:
pod cache clean --all
pod deintegrate
pod install
Tons of errors are shown:
I wasn't enough familiar with cocapods.
The following commands have solved it:
Reinstalling:
sudo gem install cocoapods
Updating Packages ("pod install" doesn't install the latest)
pod update

Any ideas how to install 'ReachabilitySwift' for swift 3?

I have tried to install :
pod 'ReachabilitySwift', '~> 3'
into my Podfile, but I get this error:
[!] Unable to satisfy the following requirements:
ReachabilitySwift (~> 3) required by Podfile
None of your spec sources contain a spec satisfying the dependency: ReachabilitySwift (~> 3).
You have either:
* out-of-date source repos which you can update with pod repo update.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
Any ideas how can I install it , I also tried manually, but it didn't work too.
P.S I am using CocoaPods
after updating:
CocoaPods 1.1.0.rc.2 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.rc.2
Analyzing dependencies
Pre-downloading: SwiftyJSON from https://github.com/BaiduHiDeviOS/SwiftyJSON.git, branch swift3
Downloading dependencies
Installing ReachabilitySwift 3 (was 2.3.3)
Using SVProgressHUD (2.0.3)
Installing SwiftyJSON 2.3.2 (was 2.3.2)
Generating Pods project
Integrating client project
Pod installation complete! There are 3 dependencies from the Podfile and 3 total
pods installed.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
Ivans-Air-2:popo IvanDosevDimitrov$
Just run sudo gem install cocoapods and then pod updateafter that.