Firebase Messaging error while installing pod file - swift

I was trying to install Firebase's pod for messaging and I got this error in terminal....
"Specs satisfying the Firebase/Messaging dependency were found, but they required a higher minimum deployment target."
This is what I have in my podfile
"# Uncomment this line to define a global platform for your project
# platform :ios, ‘8.0’
# Uncomment this line if you're using Swift
# use_frameworks!
target 'PZPlayer' do
pod ‘Firebase’
pod ‘Firebase/Messaging’
end
"
How can I fix this problem?

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'PZPlayer' do
pod ‘Firebase’
pod ‘Firebase/Messaging’
end
This should be your podfile. Try it.

I did more or less than the guy told us
but my steps were a little different:
1) on the Terminal:
go to your project folder:
1.1) cd Desktop/YourApp
1.2) YOURMAC:YourApp Fernanda$ sudo pod init
2) change your file Podfile to:
` # Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
end `
3) on the Terminal: pod install
4) Now, change your file Podfile again to:
`# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
pod 'Firebase/Messaging'
end `
5) on the Terminal: pod update
Sorry my about my English,
Good Look!

Related

No such module OneSignal

I have an issue with OneSignal module. It keeps giving me No such module OneSignal and I installed it by cocoa pods and have use_frameworks! in my pod file. I really have no clue what else I should configure to make it work
I tried other solutions here like:
Getting error No such module using Xcode, but the framework is there
pod file
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'Jaee2' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Jaee2
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
Are you seeing the same error in AppDelegate as well when you import OneSignal there? If no, ensure that in your pod file you added pod 'OneSignal', '>= 2.5.2', '< 3.0' for the target OneSignalNotificationServiceExtension. So your pod file should look like:
target 'OneSignalNotificationServiceExtension' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for OneSignalNotificationServiceExtension
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
target 'test' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for test
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
If you dont want use cocoapods. Swift Package Manager available.
Swift Package Manager

Linker Issue Xcode Cocoapods

Installed three pods but for some reason can't get it to work
I tried reinstalling, updating, deintegrating but nothing does it.
I get the following errors. Tried creating the folders manually but the Linker Error remains always
Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Clima' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Clima
pod 'SwiftyJSON'
pod 'Alamofire'
pod 'SVProgressHUD'
end
The frameworks aren't being built. Just open {Yourproject}.xcworkspace generated after adding cocoapods instead of {Yourproject}.xcodeproj - that should help.

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.

Cocoapod - [!] Unable to find a specification for 'Analytics'

I am trying to install pod for Analytics. It installs the pod successfully if I have Analytics pod only in the Podfile. The Podfile is below:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TestSDK' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
pod 'Analytics'
end
But if I add private source for another pod in the same Podfile, it gives the above error. The new Podfile is below:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'XXXXXX Private Repo XXXXXX'
target 'TestSDK' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
pod 'Analytics'
pod 'pod_from_the_private_repo' , '=1.0.0'
end
The above Podfile successfully install the pod_from_the_private_repo but it shows error for the Analytics only which was installing successfully in the previous case.
Configuration should look something like this:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
# Private pods Spec repository
source 'https://path to your private repo'
# Public spec repository
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'ProjectName' do
# Pods for ProjectName
pod 'Crashlytics'
# Private pods
end

How to add a module in Swift app via cocoa pod?

I am trying to add a module (SwiftyJSON) in my app but getting error. I followed https://www.raywenderlich.com/97014/use-cocoapods-with-swift tutorial for installing cocoapod on my Mac OS and it got installed successfully. I also got the module installed successfully. However, when I am trying to load the module in my swift file using the import SwiftyJSON statement I am getting error that says No such module SwiftyJSON.
Documentation for SwiftyJSON: https://github.com/SwiftyJSON/SwiftyJSON#integration
Podfile
platform :ios, '9.0'
target 'ApplePaySwag' do
use_frameworks!
# Pods for ApplePaySwag
pod 'SwiftyJSON'
pod 'AEXML'
target 'ApplePaySwagTests' do
inherit! :search_paths
# Pods for testing
end
end
Am I missing anything?
1) try putting use_frameworks! outside of target (under platform)
2) pod install
3) if import doesn't work try cleaning application (cmd + shift + k)
4) also clean derived data from the project -> xcode -> window -> projects -> derived data (delete)
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'TestingModules' do
use_frameworks!
# Pods for TestingModules
pod 'SwiftyJSON'
pod 'AEXML'
target 'TestingModulesTests' do
inherit! :search_paths
# Pods for testing
end
target 'TestingModulesUITests' do
inherit! :search_paths
# Pods for testing
end
end
Add this in your podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
use_frameworks!
def common_pods
end
target 'ApplePaySwag' do
common_pods
pod 'SwiftyJSON'
pod 'AEXML'
end
target 'ApplePaySwagTests' do
common_pods
end
and Run pod install,
then clean your project..
after that close the ApplePaySwag.xcodeproj and open ApplePaySwag.xcworkspace