Error installing AFNetworkActivityLogger with AFNetworking 4.0 - Cocoapods - github

I get this message after submitting my app to App Store Connect.
ITMS-90809: Deprecated API Usage — Apple will stop accepting
submissions of apps that use UIWebView APIs When upload myApp
It tells me that my project is using WebView (deprecated library). I found the problem in AFNetworking library, after going to this page they report that version 4.0 this problem was corrected, so when I update my pod and run the pod install I receive the following error.
[!] CocoaPods could not find compatible versions for pod "AFNetworking/NSURLSession":
In snapshot (Podfile.lock):
AFNetworking/NSURLSession (= 4.0.1)
In Podfile:
AFNetworkActivityLogger (from `https://github.com/AFNetworking/AFNetworkActivityLogger.git`, branch `3.0.0`) was resolved to 3.0.0, which depends on
AFNetworking/NSURLSession (~> 3.0)
Specs satisfying the `AFNetworking/NSURLSession (= 4.0.1), AFNetworking/NSURLSession (~> 3.0)` dependency were found, but they required a higher minimum deployment target.
I really don't understand why or how to fix it, I already checked the AFNetworkActivityLogger Git project since here the cocoapods indicates that problem. On their page they mention that the problem is resolved in an update, however I cannot update this library so I got stuck at this point. I hope you help me, thanks in advance.
I share my pod so they can review it.
platform :ios, '10.3'
inhibit_all_warnings!
use_frameworks!
end
def common_pods
pod 'AFNetworking', '~> 4.0'
pod 'AFNetworkActivityLogger', :git => 'https://github.com/AFNetworking/AFNetworkActivityLogger.git', :branch => '3.0.0'
end
target 'PardosChicken' do
common_pods
end
target 'PardosChickenTests' do
pod 'OCMock'
pod 'Specta'
pod 'Expecta'
end

The PR you reference with the fix has not yet been merged. To point to the PR directly do:
pod 'AFNetworkActivityLogger', :git => 'https://github.com/ToshMeston/AFNetworkActivityLogger.git'

Related

Trying to install GeoFire through Cocoapods, but getting Objective-C Module error

So there is an odd build issue I’m encountering.
I have an existing Xcode project where all my packages have been added through Xcode itself (I think Xcode basically uses Swift Package Manager underneath).
I came to a point where I needed to now use GeoFire . But Geofire needs to be installed through Cocoapods. But my Xcode project never used cocoapods.
So to integrate Cocoapods I did the following:
brew install cocoapods
opened terminal and navigated to root directory of iOS app (where <app-name>.xcodeproj exists)
pod init
opened the generated Podfile and added the following:
…
platform :ios, '11.0’
…
pod 'GeoFire', '~> 4.0’
…
pod install
opened <app-name>.xcworkspace
Then when I went to build the project, the following failure occurred (see image attached to question)
None of the workarounds suggested have helped me thus far. Any thoughts?
NOTE: I am doing all this on an M1 Macbook.
Wow, strange issue.
What ended up fixing it for me was to go to my pod file and replace:
pod 'GeoFire', '~> 4.0'
With:
pod 'GeoFire/Utils'
Now I can use GeoFire in my file as I wish.

CocoaPods could not find compatible versions for pod "Sentry"

[!] CocoaPods could not find compatible versions for pod "Sentry":
In Podfile:
sentry_flutter (from .symlinks/plugins/sentry_flutter/ios) was resolved to 0.0.1, which depends on
Sentry (~> 7.11.0)
None of your spec sources contain a spec satisfying the dependency: `Sentry (~> 7.11.0)`.
I am just trying to install sentry_flutter plugin in my futter project. Currently i am testing in ios device. But it gives the above error.
The error message seems straight forward enough. But i cannot manage to include this plugin in my project.
you can run pod repo update to update your local cache bcause it may be outdated.
If it doesn't fix the issue for you, you can delete your Podfile.look file on ios folder and run pod install

Trying to install Mapbox pods for xCode breaks existing pods

I am playing with a navigation app in swift to learn mapbox. I ran into an issue while adding a Textbox which is supposed to use the MapboxSearchUI pod, because I can't install it. My Terminal gives me some errors, I am thinking the versions could be incompatible. Somehow, the pod install lines from mapbox itself don't work together. The Pods I used to use and which worked fine:
pod 'Mapbox-iOS-SDK', '~> 6.3.0'
pod 'MapboxNavigation', '~> 1.4.2'
The Pod I am trying to add which breaks my pod install:
pod 'MapboxSearchUI' , ">= 1.0.0-beta.9", "< 2.0"
I copied it straight from their website. Terminal gives me this:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "MapboxMobileEvents":
In snapshot (Podfile.lock):
MapboxMobileEvents (= 0.10.8, ~> 0.10.2, ~> 0.10.4)
In Podfile:
MapboxSearchUI (< 2.0, >= 1.0.0-beta.9) was resolved to 1.0.0-beta.9, which depends on
MapboxSearch (< 2.0, >= 1.0.0-beta.9) was resolved to 1.0.0-beta.9, which depends on
MapboxMobileEvents (~> 1.0.2)
Specs satisfying the `MapboxMobileEvents (= 0.10.8, ~> 0.10.2, ~> 0.10.4), MapboxMobileEvents (~> 1.0.2)` dependency were found, but they required a higher minimum deployment target.
Does anyone know what causes the issue and maybe what version I could use? I usually don't use the terminal therefore can't really use trial and error. Removing the version behind the Maobox Search didn't work though.
Thanks!
So for everyone having the same Issue, here is how I ended up fixing the installation 5 days later, having still not gotten any answer from the support...
Even though on many Installation guides (From mapbox themselves) the pod line is always stated as
pod 'MapboxSearchUI', ">= 1.0.0-beta.9", "<2.0"
this leads to version issues, because of the beta.9 part.
Solution:
pod 'MapboxSearchUI', ">= 1.0.0-beta", "<2.0
This works as it should. This has taken me significantly longer than I'd like to admit. Hope this helped someone.
I also ran into the same issue and removing the explicitly declared Pod versions from the Podfile resolved the issue.
In your Podfile, remove the versions in front of the pod name.
pod 'Mapbox-iOS-SDK', '~> 6.3.0'
pod 'MapboxNavigation', '~> 1.4.2'
i.e. It should be updated as follows.
pod 'Mapbox-iOS-SDK'
pod 'MapboxNavigation'

cocoapods Google Mobile ads does not generate .xcworkspace file

I am exporting a project from Unity3d to xcode that uses the last GoogleMobileAds package.
I have installed and updated cocoapods and also have the famous podfile containing de following lines:
source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, ‘8.0’
target ‘MyProject’ do
pod 'Google-Mobile-Ads-SDK', '~> 7.14’
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
and I run
pod install
and
pod update
successfully
dependancies are downloaded alright, as you can see the results below:
Updating local specs repositories
CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Installing Google-Mobile-Ads-SDK (7.14.0)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 8 total pods installed.
According to both cocoapods and google mobile ads documentation, I will need to continue with "MyProject.xcworkspace" but the file is nowhere to be found.
any suggestions?
When using install! 'cocoapods', :integrate_targets => false Cocoapods will not create an xcworkspace for you.
That's the intended behaviour. You'll even notice this if you follow the command prompt. This line is telling you that no integration is taking place.
Skipping User Project Integration
If you want to get an xcworkspace just remove :integrate_targets => false
It seems the problem comes from editing the Podfile using TextEdit.
As it warns you that you should not continue using TextEdit, one could falsely suppose that the program is intelligent enough to understand and correct these unwanted modifications.
This is the solution I have found:
delete the Podfile and Podfile.lock from your working directory
create a new Podfile using pod init
install SublimeText and use it to open the Podfile
add the necessary pods for the project
(I also included the line "use_frameworks!" although it may not be
needed.)
run "pod install" and "pod update"; this time I get
[!] Please close any current Xcode sessions and use Orbit.xcworkspace for this project from now on.
and the file is now available in project directory
You was used this guide for install pod?
In addition to Radu Dita's message. If you do not want that line to be added (so you do not need to delete it later), you need to disable cocoapods integration in "iOS Resolver Settings" by selecting "None", build project and then enable it back "Xcode Workspace". I found this with try and error. I hope my message will save save someone's time

Cocoapods pod file install not working "Unable to find a specification for `RealmSwift (~> 0.97)`" swift

I'm attempting to install Realm for swift, expect terminal keeps giving me this error: Unable to find a specification for RealmSwift (~> 0.97). My pod file has been laid out exactly as they recommend. This is my pod file:
target 'AppName' do
use_frameworks!
pod 'RealmSwift', '~> 0.97'
end
target 'AppName Tests' do
use_frameworks!
pod 'RealmSwift', '~> 0.97'
end
target 'AppName UITests' do
end
target 'AppName Keyboatd' do
end
target 'AppName Keyboard' do
end
I just tried it with Realm Objective-C and it worked fine for me. That's strange.
It's possible that since the version is actually called '0.97.0', maybe it's necessary to include that extra '.0'.
Alternatively, is it completely necessary to include the version specifier in there? You can just leave it off, and you'll still get the latest version of Realm (0.97.1 was released a few days ago!)