Swift version required by a Pod? - ios

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

Related

cocoa touch framework missing symbol called

I have a framework that depends on a couple of pods such as IQKeyboardManagerSwift, It used to work fine when I generate framework file and integrate it in a project that has the required pods installed. however, after updating cocoapods to version 1.11.2 the app that has the framework crashes with signal sigabrt from the framework on the first line that uses any of the pods, and the console prints
I've tried to revert back to cocoapods 1.10.1 but the crash keeps happening! I tried to change the linker flags options, framework path, header path, and it didn't work
Any ideas how to solve this issue or how to investigate it?
For me this was an issue with the RealSwift pod, going back to version 10.20.0 solved it for me
This occurs when any pods code implementation syntax changes in new version or pod name changes, you need to check migration of that pod for code level changes or you can also downgrade the particular pod if you don't want to change the current code.

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.

iOS- Build failed due to obsolete method names in pod dependency files

I was trying to make a demo project which uses a POD dependency of this URL PageMenu POD install correctly but gives me many errors on building this dummy app as many methods' are renamed in latest iOS SDK and swift 4.2. I have solved this problem before on my office project but can't remember right now. Any help will be appreciable. I am attaching a screenshot with this project.
Reasons for the problem: Swift version of my project is 4.2 and I am using a library which was built in swift version 4. So some of the method's name in latest iOS SDK is renamed from Swift 4.
Solution: I need to set Swift version 4 for that pod dependency and recompile this project.
Note: Any third party pod that doesn't support the latest swift must be compiled with the supported version of swift for pod dependency

Warning coming from a pod depending on another one

I am using CoreBitcoin with Pod. It comes with two other pods, one is OpenSSL-Universal v(1.0.1.16). according to OpenSSL-Universal Github, many people was facing some warning like
`ld: warning: object file (/Users/me/projet/myProject/ios/Pods/OpenSSL-Universal/lib-ios/libcrypto.a(cversion.o)) was built for newer iOS version (9.2) than being linked (8.0)
`
as mentionned here
I already tried disabling all warning from pod project, it does disable all warning from the pod I did install, but not from the ones coming as dependencies of some pod.
I tried to install newer OpenSSL-Universal pod myself, but as you can imagine, it didn't solved my problem. It's just a warning problem so what I'm looking for :
Can I find a way with my podfile to install CoreBitcoin with a newer version of OpenSSL-Universal, so new people working on the project would just have to clone it and won't have tons of warnings
or
What kind of settings could I set to disable those warnings once for all
I am using Xcode v8.3.3 & pod v1.2.1
Give, please, more info about Pods. My solution is:
target 'YOURAPPLICATIONNAME' do
pod 'CoreBitcoin'
end
And others dependencies I install with add pod 'NameOfPod'
For use in Swift-project, you must be create bridging header and import CoreBitcoin to file, than you can use any methods from library.

CocoaPods error on building project

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

Resources