how to fix the warning from installed pods after update Xcode? - ios

I am new in programming, I am sorry if my question seems silly. I am trying to build an iOS app using Firebase.
After updating to Xcode 9.3, there are a lot of warnings show up like the image below:
I suppose this come from the Firebase pods, and maybe the pod hasn't been updated by Firebase. am I right?
so what I have to do? do I have to fix the warning manually or I just have to wait the update from Firebase? and If I still run the program with a lot of warning like that, is the program will run properly ?
here is the pods I use
pod 'SwiftyJSON'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'
pod 'GoogleSignIn'

Warnings are usually just that: warnings. Most likely the code will run just fine and you can just wait for the developers to update their code.
Optionally if you dislike seeing them you can inhibit warnings in your pods within your podfile like this:
platform :ios
# ignore all warnings from all pods
inhibit_all_warnings!
# ignore warnings from a specific pod
pod 'FBSDKCoreKit', :inhibit_warnings => true
You'll have to run a pod install for the change in the project settings to happen.
This will suppress warnings in the pods you pull in and give the developers time to fix the issues.
Source: Ignore Xcode warnings when using Cocoapods

Related

'nanopb/pb.h' file not found. Could not build module 'nanopb'

I know this has been answered previously on Stack.
I am currently running Xcode Version 13.4.1 and using cocoapods-1.11.3 but I got that error and I was trying another solution to change the cocoapods to 1.10.2 based on the https://stackoverflow.com/a/63648164/556617 and still getting this error.
I have done the usual steps to see if the following will solve the issue;
Cleaned Build Folder
Removed derived data
Restarted Xcode
I believe this is a module pulled in along with Firebase/Firestore
pods used:-
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
pod 'Firebase/Analytics'
pod 'FirebaseFirestoreSwift'
pod 'Firebase/Database'
pod 'Firebase/Crashlytics'
and more with came along Firebase

AppAuth not signed at all when adding firebase to xcode project

I'm trying to add firebase to an existing project but I keep getting errors on building and after a couple of days searching the internet I have not yet fixed the issue :(
I've tried adding --deep to the signing flags, locking and unlocking the keychain, switching to use_modular_headers! in the Podfile.
I don't have a physical device to test on.
My Podfile looks like this:
# Uncomment the next line to define a global platform for your project
#platform :ios, '12.0'
target 'EyeArtifact' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
use_modular_headers!
# Pods for EyeArtifact
pod 'Firebase'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'FirebaseUI'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/OAuth'
pod 'FirebaseUI/Phone'
pod 'FirebaseFirestoreSwift'
# Facebook pods
pod 'FBSDKCoreKit', :modular_headers => true
pod 'FBSDKLoginKit', :modular_headers => true
end
and my error is:
/Users/jvines/Library/Developer/Xcode/DerivedData/***-bgaqkzrrqevduaadrswisdyouwqv/Build/Products/Debug-iphonesimulator/***.app/Frameworks/AppAuth.framework: replacing existing signature
/Users/jvines/Library/Developer/Xcode/DerivedData/***-bgaqkzrrqevduaadrswisdyouwqv/Build/Products/Debug-iphonesimulator/***.app/Frameworks/AppAuth.framework: code object is not signed at all
In architecture: x86_64
If I switch between use_frameworks! and use_modular_headers! I get another error: BoringSSL-GRPC.modulemap' not found when building
I've tried disabling the signing script when building but then if I run the app I get this error: dyld: Library not loaded: #rpath/AppAuth.framework/AppAuth
The simulator is running iOS 14.2 and I'm using Xcode 12
I also tried a brand new project and adding the frameworks from scratch but I encountered the same errors.
I'm new to iOS development so any help is greatly appreciated!
Thank you :)
Found the answer to my problem here: https://stackoverflow.com/a/62172769/14828440
In short I was missing the bridging header even though I don't have any swift files.

Firestore installation using Cocoapods

I'm trying to install firestore in my project.
When I'm trying to install that, Xcode displays:
fatal error: module map file '/Users/account/Documents/myapp/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found
or sometimes another errors....
so I've spend so many of times (almost entire 2 days) to solve this problem, but nothing is actually working :/ (deleting derived data and Pods folder, pod deintegrate, pod install and update or cleaning build (Command-shift-k)).
platform :ios, '13.0'
target 'myapp' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
use_modular_headers!
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
#pod 'FirebaseFirestoreSwift'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-posd
end
this is my Podfile. and whenever I delete pod 'Firebase/Firestore', everything's working whereas Firebase/Firestore is not. (surely to recover normal working state, I comment all of pod repositories, (in terminal) type "pod install" and then uncomment top 4 repositories and pod install....)
I really wanna use Firestore, but I can't.
We can also force CocoaPods to not apply modular headers for the troubling pods... in this case:
pod 'BoringSSL-GRPC', '= 0.0.3', :modular_headers => false
pod 'gRPC-Core', '= 1.21.0', :modular_headers => false
Firestore requires latest CocoaPods. As per Google developer
It should get better with CocoaPods 1.9.0 which is adding the
capability to specify dynamic/static linkage for each pod in the
Podfile.
Please check this link https://github.com/firebase/firebase-ios-sdk/issues/3816

Many build errors after pod update

I have many pods installed in my project. Everything worked fine since my last pod update. After last pod update, I have 28 build errors starting with "Could not build module xxx".
Here is my podfile:
target 'projectXXX' do
use_frameworks!
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
pod 'Firebase/Crash'
pod 'TwitterKit'
pod 'Fabric'
pod 'Crashlytics' end
I tried to uninstall - install cocoapods.
I tried to deintegrate pod from project, install, remove .workspace file and deriveData folder... still got these errors.
I'm running out of ideas. Please, any other solution?
Thanks you very much
EDIT
I have just discovered that my Pods.framework is in red state as visible on screenshot below. Maybe this can help?
First try to remove cocoa pods completely
gem install cocoapods-deintegrate
pod deintegrate
gem install cocoapods-clean
pod clean
Then install again like this
pod setup
open -a Xcode Podfile
In Pod file add like this
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'TestProject' do
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
pod 'Firebase/Crash'
pod 'TwitterKit'
pod 'Fabric'
pod 'Crashlytics'
end
target 'ProjectTests' do
end
pod install
Updating Xcode can resolve this issue. Thing is, pods might support multiple swift versions, so pods should be able to specify a range of swift versions.
Before Updating check if PODS_ROOT user-definer value in Build Settings of target is not deleted may be accidently. If so Try to add PODS_ROOT=${SRCROOT}/Pods
It's possible that you use old pods repositories and after update (that was few month ago) you need to specify which pod repository to use. I suggest that you need old one. See how looks my pod file for old project:
source 'https://github.com/CocoaPods/Old-Specs.git'
platform :ios, '9.0'
use_frameworks!
xcodeproj 'SF'
#link_with 'SF'
target 'SF' do
pod 'TransitionKit'
pod 'MBProgressHUD'
pod 'PureLayout'
pod 'UICountingLabel'
pod 'MWPhotoBrowser', :git => 'https://github.com/pash3r/MWPhotoBrowser.git', :branch => 'skyFlyWork'
end
What could cause the issue:
- Breaking changes in Pods/APIs
- Breaking changes due to support/non-support of Swift versions
If you are using a versioning system (Git, etc.).
Retrieve an older version of Podfile.lock.
Read that file (it's a text file, you can do more somePath/Podfile.lock in Terminal.app), and the "explicit" versions of your pods should be there.
You should get something like:
PODS:
- GSKStretchyHeaderView (1.0.3)
- Masonry (1.1.0)
...
PODFILE CHECKSUM: someCheckSum
COCOAPODS: 1.1.1
When you do pod 'Firebase' you don't specify a version, so you should get the last one. But if some versions are not compatible, you can get issues.
So you may add the '~> 1.0.3' (for instance if I take my example of GSKStretchyHeaderView). More informations on how to use it here.
So this way you should get back on a older version when everything was working. Now, you can check the documentation of each pods (and their respective podspec looking for "hidden" dependencies) and update them one by one checking which one is the culprit, and then maybe rising a flag (an issue) on their repo/git if needed.
For next dev, I'd suggest to set "version", to at least majors using the "optimistic operator ~>". If they respect the rules of versions, (major/minor/patch), then at least determine the major/minor, a patch shouldn't break anything, but fix things. A minor may have breaking change, while a major has a lot of probability to not be compatible with previous work (different declaration, classes renames, etc.).
If you don't use a versioning system like Git, I STRONGLY suggest you do now.
But if that's your case and you still have the issue. Remember a date when everything was working fine after a pod update/install. Then, go to each Git of your pods, and read the history to find the version at that date and set that version in your podfile for that pod.
Shen you are doing pod update which update all libraries most of the libraries on swift4 still some of them in swift3
If libraries are in swift 4 and your project in swift 3.2 you have two possibilities
you can migrate project to swift4
(or)
you need to rollback to the swift 3.2 supported pods
If project in swift4 libraries in swift3 you need to migrate those libraries into swift4 to solve current problem

Firebase Unity iOS Problems

I have setup Firebase successfully under my Android build in Unity, but am really battling getting it working in my iOS build.
Unity Firebase project was setup and looks fine:
I have followed all the steps on:
https://firebase.google.com/docs/unity/setup
I have installed CocoaPods:
skywalker:sl leonard$ pod --version
1.2.0
Here is the top level generated iOS project:
skywalker:sl leonard$ ls
Classes Libraries
Data MapFileParser
Info.plist MapFileParser.sh
LaunchScreen-iPad.png Unity-iPhone
LaunchScreen-iPad.xib Unity-iPhone Tests
LaunchScreen-iPhone.xib Unity-iPhone.xcodeproj
LaunchScreen-iPhoneLandscape.png UnityData.xcassets
LaunchScreen-iPhonePortrait.png build
I don't see the GoogleService-Info.plist file being added and also expected a Podfile (but I'm just guessing that it would generate one).
The project generates errors and trying to manually resolve them just creates more errors.
Here is the project right after the first build:
Trying to resolve this modules disabled error:
Then after building this is what I see:
I then tried adding the GoogleMobileAds.framework iOS framework:
After running again I get these errors:
After reading online about these errors there's a lot of mention around CocoaPods, but running pod init just created a blank workspace and didn't resolve my issue.
I had a similar problem and was able to get my app building in XCode by going to the App's Xcode directory and running "pod init". This created the podfile. I then edited that file with SublimeText (apparently some editors cause problems editing this file, I'm not fully clear on why) and adding the pods I needed. My podfile ended up looking like this:
platform :ios, '7.0'target
'Unity-iPhone' do
pod 'Firebase/Analytics', '~> 3.10'
pod 'Firebase/Auth', '~> 3.10'
pod 'Firebase/Core', '~> 3.10'
pod 'Firebase/Messaging', '~> 3.10'
pod 'Firebase/RemoteConfig', '~> 3.10'
end
I then ran "pod install" in the same directory and that created the .xcworkspace file (this took some time, as it installed several prerequisites). Opening the .xcworkspace file, I was then able to successfully build and run my app. I've run into additional run time issues (which is why I was on StackOverflow today), but that at least got the project compiling.
You will need a copy of the GoogleServices-info.plist file into the app's xcode directory. Unity copied it automatically for me, but YMMV.
Hope this helps.
Could you link the contents of you podfile? If you just added
pod 'Firebase/Core'
then that might not be enough: https://firebase.google.com/docs/ios/setup#available_pods
pod 'Firebase/Core' Prerequisite libraries and Analytics
pod 'Firebase/AdMob' AdMob
pod 'Firebase/Messaging' Cloud Messaging / Notifications
pod 'Firebase/Database' Realtime Database
pod 'Firebase/Invites' Invites
pod 'Firebase/DynamicLinks' Dynamic Links
pod 'Firebase/Crash' Crash Reporting
pod 'Firebase/RemoteConfig' Remote Config
pod 'Firebase/Auth' Authentication
pod 'Firebase/Storage' Storage
You might have to add all pods for the features you are using.
Disclaimer: I'm currently trying to get my build to run on ios as well (works like a charm on android). Just realized this issue myself, I also only included pod 'Firebase/Core' before.

Resources