How do I hide or remove warnings for a specific pod dependency? - swift

I am using the Firebase/Remote config pod and that pod depends on a pod called Protobuf
Which has a lot of warnings.
My pod file
platform :ios, '10.0'
target 'AppeeUITests' do
use_frameworks!
pod 'Alamofire', '4.4'
pod 'SwiftyJSON', '3.1.4'
pod 'Firebase/Core'
pod 'Firebase/RemoteConfig'
end
target 'AppeeUITests' do
inherit! :search_paths
pod 'Firebase/Core'
pod 'Firebase/RemoteConfig'
end
target 'AppeeUITests' do
inherit! :search_paths
end
Here are the warnings that it yields:

Please don't worry for the warnings if you are using FirebaseRemoteConfig (2.0.0) and Protobuf (3.3.0) version. This is already updated and you are using the latest release, so you have to wait for the next release from Google firebase for removing the warning, it means that Firebase team have to work for the updations.

It should be solved by updating your pod.
Steps to update the pod:
1. open terminal and come to your project directory
2. run 'pod update' command
It'll update your all pods framework.
If you received pod command not found then try using 'sudo gem install cocoapods' or follow these steps simply.

Related

Trouble with pod file version control

When I am installing my pod file, the terminal gives me this message:
"[!] Automatically assigning platform iOS with version 15.5 on target PirateForum because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform."
I am new to Xcode and I don't know much about the version and things like that, I feel like I am a bit messed up here.
My pod file:
target 'PirateForum' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for PirateForum
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'GoogleSignIn', '~> 5.0.0'
pod 'FirebaseFirestore'
pod 'Firebase/Storage'
end
What should do to my pod file in order to eliminate the warning?
There are a lot of targets in my pod and they all have different deployment targets, mainly 8 or 9, is that going to matter?
enter image description here
Thanks in advance!

Xcode Build Errors After Pod Update

I just did a pod update and tried to build my project; getting the following errors:
And here is my podfile:
# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'changelater' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for changelater
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'FirebaseUI/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Functions'
pod 'ProgressHUD'
pod 'Kingfisher', '~> 5.0'
pod 'Stripe', '15.0.1'
pod 'Alamofire'
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'GooglePlacesSearchController'
pod 'GooglePlacePicker'
end
Any idea why I am getting this error after update? and how I can fix it? I already did shift+command+K but it's not helping.
Cleaning your project is a good practice after updating your pod dependencies.
I had similar issues in the past after updating cocoapods.
Try
In Xcode menu: Product -> Clean build folder (shift+command+K)
Build your project again (command+B)
I simply had to update my xcode to the latest version and the errors disappeared.
It was just because I didnt have the latest xcode. So I had to update my xcode and update my podfile versions. Everything was fine after that!

xcode PhaseScriptExecution failed with a nonzero exit code

/Users/xerasy/Library/Developer/Xcode/DerivedData/Opensoul-azlrvihpzjmefgdiufcpnucguxbp/Build/Intermediates.noindex/Opensoul.build/Release-iphonesimulator/Opensoul.build/Script-11B6BEDD1EFAB15300438DBB.sh: line 2: swiftgen: command not found
Command PhaseScriptExecution failed with a nonzero exit code
my podfile :
platform :ios, '10.0'
use_frameworks!
inhibit_all_warnings!
def shared_pods
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Database'
pod 'Result'
pod 'Reusable'
pod 'PureLayout'
pod 'ObjectMapper'
pod 'Swinject'
end
target 'Opensoul' do
shared_pods
pod 'Fabric'
pod 'Crashlytics'
pod 'Toast'
target 'OpensoulTests' do
inherit! :search_paths
end
end
# target 'PlaygroundFramework' do
# shared_pods
# end
i tried
Go to keychain access -> right click on login -> lock & unlock again
-> clear Xcode project and make build again.
pod install
pod update
but nothing helped, how i can solve this problem ?
Currently my build is working. Here you are the steps I tried until it finally worked:
Search in the whole project the word CommonCrypto.
If you have a Pod containing that header import, remove this Pod from the Podfile and perform a pod install. Clean and build the project. Add again the Pod to the Podfile and perform a pod install.
Clean and build the
project again using a real device if possible.
And If you don't have that Pod, maybe you can try by making the same steps with some old Pod that you may encounter in your project.
Added information: also If you have some code error inside a Pod, first you need to solve that code problem and then try to compile again the project.
I'm going to copy the changes made in my project.pbxproj. I know it's not very helpful but it's the only thing that have changed in the git difference commit:
Removed: BDC9821B1E9BD1B600ADE0EF /* (null) in Sources */ = {isa = PBXBuildFile; };
Added: BDC9821B1E9BD1B600ADE0EF /* BuildFile in Sources */ = {isa = PBXBuildFile; };
Hope this is helpful for you...!

No such module 'Alamofire' when archive the project swift4

Hello everything is working fine now, but when ever i try to archive the my project i am facing this error "No such module 'Alamofire" i don't know what happend followed many post on stack overflow but still facing same issue
my pods
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'WithinRider' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for WithinRider
pod 'SwiftyJSON', '~> 4.0'
pod 'Alamofire', '~> 4.7'
pod 'MRProgress'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'SwiftGifOrigin'
pod 'SDWebImage', '~> 4.0'
pod 'Toast-Swift', '~> 3.0.1'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'AKMaskField'
pod 'Socket.IO-Client-Swift', '~> 13.2.0'
pod 'BadgeSwift', '~> 5.0'
pod 'SwiftyGif'
pod 'PagingTableView'
pod 'AlamofireObjectMapper', '~> 5.0'
target 'WithinRiderTests' do
inherit! :search_paths
# Pods for testing
end
target 'WithinRiderUITests' do
inherit! :search_paths
# Pods for testing
end
end
error
No such module 'Alamofire'
Have you tried the standard routine?
1. Clean the project
2. Close Xcode, reinstall the missing pod, reopen Xcode
3. Build the project
I got the same error while archiving. Here is a link for proper way of doing that. Sometimes it won't solve your issue. It didn't solve my issue as well. So I had to Edit scheme. Under Achieve I changed Build Configuration as I have several build configurations. And then try to re-archive the project.
I have solved the issue by changing the POD and Project target deployment target as same.

Unable to download Library using cocoaPods

I am new in swift programming . I am trying to download libraries for the project . I have installed cocoa pods : sudo gem install cocoa pods, created pod file with all libraries which I need : pod 'GoogleMaps'. After pod install I got an error:
Unable to satisfy the following requirements:
- `GoogleMaps` required by `Podfile`
- `GoogleMaps` required by `Podfile`
- `GoogleMaps (= 2.3.1)` required by `Podfile.lock`
Specs satisfying the `GoogleMaps, GoogleMaps (= 2.3.1)` dependency
were found, but they required a higher minimum deployment target.
[!] Automatically assigning platform ios with version 7.0 on target
Taxi for rider because no platform was specified. Please specify a
platform for this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.
My pod file:
# Uncomment the next line to define a global platform for your
project
# platform :ios, '9.0'
target 'Taxi for rider' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
# Pods for Taxi for rider
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'GoogleMaps'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GooglePlacesAPI'
pod 'GooglePlacePicker'
pod 'SwiftyJSON'
pod 'Firebase/Core'
pod 'Firebase/Storage'
end
Replace your podfile text with below text:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Taxi for rider' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Taxi for rider
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'GoogleMaps'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GooglePlacesAPI'
pod 'GooglePlacePicker'
pod 'SwiftyJSON'
pod 'Firebase/Core'
pod 'Firebase/Storage'
end
Below is wrong line in your code:
# Uncomment the next line to define a global platform for your
project
Which should be:
# Uncomment the next line to define a global platform for your project
And you have added pod 'GoogleMaps' multiple times.
You should define a platform for your project in your Podfile. Append this to the beginning of your Podfile:
platform :<ios, macos, tvos etc.>, '<version of the OS>'
Example:
platform :ios, '9.0'
Step Of Install Cocoa Pods.
Step 1 - Close your Xcode project which you install pod file. and Open terminal.
Step 2 - type cd command and Drag your project path.
Step 3 - press Enter and type pod init conmmand then open your project folder, now you can see pod file
Step 4 - open pod file and write pod name which you install
Step 5 - save and close pod file and again open terminal and write pod install command and wait few minutes to install pod
After install pod go to your project folder and open .work space file and enjoy.
now pod is installed enjoy and used.