CocoaPods error on building project - ios

I have a running project which is working fine with pods. I had to copy this project to develop version-2. Now when I try to build project, I encounter following issue in pod's code. I tried removing this specific pod but same type of errors were shown in different pod.
tried all of this: https://guides.cocoapods.org/using/troubleshooting.html ,but it didn't help at all.
Being new to iOS development, I can't figure out, what I am doing wrong.

It seems like you are using the newer version of pod in older Xcode. So either you need to update your Xcode or downgrade your pod to the relevant version supporting Xcode. From image i can guess you might be using Xcode 7.2 or down and pod is in swift 2.3 or 3

Related

Cannot find type 'SKAdImpression' in scope

I'm trying to implement MoPub into my Swift app, but in some of the files that are provided by the MoPub pod there are errors saying Cannot find type 'SKAdImpression' in scope. I also cannot import MoPub in my own documents. I tried running pod update restarting xcode, and making sure I am using the .xcworkspace file
Edit: I just re-read the apple documentation, and noticed that it says SKAdImpression is an iOS 14.5+ feature. The version of Xcode I have is for iOS 14.4, so it makes sense as to why it cannot be found. My only concern is, does this mean that my app will only work on iOS 14.5+?
Edit 2: My mac does not support the latest MacOS which is required for the latest Xcode for 14.5. Is there anything I can do to get MoPub working anyway?
The version of Xcode I have is for iOS 14.4
My mac does not support the latest MacOS
Bad news is that is there is no other way around this error, as far as I can see.
What did not help:
Removing the version, pod 'mopub-ios-sdk' and running pod install of pod update again.
Cleaning Build Folder.
Cleaning the /DerivedData folder.
What did help:
Updating Xcode to the 12.5 version.
Take the version out.
pod 'mopub-ios-sdk'
run pod install
Alternatively you can follow this from their guide:
simply import MoPubSDK/MoPub-Bridging-Header.h to your project and
ensure that the Objective-C Bridging Header build setting under Swift
Compiler - Code Generation has a path to the header.
They also have a sample program, take a look at that as well. You can find it here:
https://github.com/mopub/mopub-ios-sdk/tree/master/Canary
Also, make sure you have the project closed out before you run pod install. I have seen issues in the past when this happens.

CocoaPods not Installing properly

my project was working fine until I installed the pushNotifications pod. It gave me an error that it is compatible with only ios 10.0 so I forced my pods version from global 9.0 to 10.0. After that I am unable to get my app to work. I have tried clean pods and reinstalling. I even tried by cleaning pod cache.
I don't know how to explain this error. So, any help will be appreciated. thnx
Looks like 'pushNotifications' pod needs iOS 10+ to run and I think your project supports lower versions of iOS(i.e iOS 9). Because a pod global version specifies a minimum version to your pod to run which means, in your case, that the pods you add must support iOS 10+ otherwise your cocoapods won't be able to compile. And looks like you're using some pod that doesn't support iOS 10+(i.e AppAuth) that's why you're having this issue.
I don't know which framework you're using but I really recommend you to take a look on it and find which one doesn't support iOS 10+ replace or update it because they need to support iOS 10+ otherwise it will be a huge problem for you in the future.

Xcode: pod showing wrong Swift version after updating pod

When I ran "Build", Xcode showed me the error "SWIFT_VERSION '3.2' is unsupported..." for one of my Pods, which, sure enough, was using Swift version 3.2.
I updated the problem Pod to a newer version that specifies Swift 5.0 in its .swift-version file, but when I run "Build", Xcode still shows me the same error, which claims that the problem Pod is using Swift 3.2.
I've tried cleaning the build folder, deleting the Pod cache and reinstalling all CocoaPods for the project, and quitting and restarting Xcode, but none of that solved this problem. How do I get Xcode to recognize the Swift version in the Pod folder?
The solution was to open the Project Navigator, click on "Pods", select the problem Pod, and in "Build Settings", change the Swift Language Version.
Thank you, #Claus Jørgensen for pointing me to the answer!

Swift version required by a Pod?

I am trying to install a Pod in my IOS/iPhone project using Xcode 9.3.1.
My target app is configured to use Swift 3.3.
After adding the following line to my podfile...
pod 'Concorde'
I ran...
pod install
The pod installed normally. However, upon compilation, I receive a mess of compiler warnings and errors like "NSUrlResponse was obsoleted in Swift 3". It seems the Swift version I have (3.3) is too new.
The Swift version configured for the build target is also 3.3.
It looks like an older Swift is required for this Pod. However, is there a simple way to determine which Swift version is required for the pod?
I checked the CocoaPods.org web site and the page does not show the Swift version required for the library.
I also checked the podspec, where I expected to find that version number requirement.
You can try terminal command,
pod try "pod name"
this will clone the repo automatically for you to test the framework on the fly
there you can check out whatever you need.
Plus reading the description on GitHub helps too
Also i recommend using highly popular pods, as they tempt to be more stable.
read the reviews about the framework, and try to find other alternatives for it.
New update: You can try to preview .podspec file inside the Repo on github sometimes you can find the Swift Version of that Pod example : here

Using SVProgressHUD fails to build in Xcode

I have installed SVProgressHud to my Xcode project via cocoa pods but I am getting an error during build time. I have posted an image of the error I am getting. I am using swift 3 and Xcode 8. I have searched everywhere for a solution but can't find anything. The only issue I can think of is the SVProgressHud cocoa pod that I have installed is not compatible with swift 3 and Xcode 8. I tried to install an earlier version of SVProgressHud but it automatically updates to the latest. I really don't know where to go from here. Help would be very much appreciated! Thanks in advance
Edited:
If you would like to try an older version of the pod, you can visit here for list of versions/changelogs: https://cocoapods.org/pods/SVProgressHUD#changelog
and then in your podfile you can set the version like so:
pod 'SVProgressHUD', '2.2.1'
I was able to install the pod and build without issues on Xcode 9.2, so not sure if its and issue with xcode 8 or something else. If its an option, why not update to 9.2?

Resources