Has the Cocoapod of J2ObjC been depricated? - cocoapods

The J2Objc Cocoapods page lists the latest version as 0.9.6.1 and this is what pod update fetches. However, the J2Objc git page indicates that the latest version is 2.0.2.
Has the Cocoapod for J2ObjC been deprecated?

The J2ObjC Cocoapod was created and maintained by external developers who use j2objc in their projects, but who are not members of the J2ObjC team. I suggest directly contacting the people on the pod's "Maintained by" links on the podspec page as to its status.
Since it's open-source you can also make the change yourself and send it to them to update the pod. I'm not a Cocoapods user, but it looks like all that's needed is to change the version and source tag in the J2ObjC.podspec.json file, though updating the minimum platforms to iOS 10 and macOS 10.11 would be good to do, too.

Related

How can I use Swift Package Manager (SPM) and cocoapods together in one project?

I have an existing project which uses Cocoapods, but I would like to switch to SPM; unfortunately I still have dependencies which aren't available in SPM.
Now I would like to move as many dependencies as possible over to SPM and keep the others in Cocoapods as long as necessary - is this possible? Having both, Cocoapods and SPM?
I just tried CocoaPods with SPM on my iOS project and it works fine.
I'm adding Firebase and other Google libs using CocoaPods and the rest using Swift Package Manager.
When adding SPM dependency, put checkmark on your project(s) and not on the Pods project.
Xcode 11.5,
CocoaPods 1.9.3.
After trying it out I found you can actually have a SPM + Cocoapods to play nice. You install your SPM library on the .xcodeproj while you develop on the .xcworkspace. It all works (at least so far for me lol).
If you are using CI, or you launch manually from xcodebuild command some tweaks with the -clonedSourcePackagesDirPath flag
I have had used swift package manager at the beginning and added 4 packages in my project. When I had to integrate admob sdk. I added cocoapod to my project.
but after open the .xcworkspace file. the packages status are display as Missing. I have to add them from SPM one by one. after all 4 packages were added again. the project can be built and executed again.
Considering all the pros and cons, I found it suitable to use CocoaPods as SPM is still at a very nascent stage and not all libraries support it.
Please go through the blog written by Darshan Patel by https://blog.kiprosh.com/preferable-dependency-manager-swift-package-manager-spm-or-cocoapods/ for more details.

somehow get notified when a pod has a new version

I'm using Pods in different iOS projects, now I would like to somehow get notified when a new version is released for one of the pods - no matter if via mail, rss feed or whatever. Does such a possibility exist?
A Podfile will generally semantically constrain the allowed versions of a pod (see semantic versioning):
pod 'Bolts', '~> 1.7'
This example would accept versions from 1.7 up to 2.0 excluded.
So the only way to know if there is a new version that fits your project is to run specifically for your repo:
pod outdated
Knowing that, you can script a Jenkins job to check it periodically.
Try https://www.versioneye.com/ . Not sure how well it works though.

podspec dependencies, best practices

I am building a cocoapod and wanted to add a dependency for Alamofire because my pod will be making some requests.
After trying to integrate my cocoapod (with the Alamofire dependency) into our main app, I got a version conflict because we are also using Alamofire in our app, but a different version.
Seeing this error, it made us wonder.. why havn't we seen a version conflict message like this one before? We have a handful of third-party cocoapods installed. After inspecting a few of our third-party pod spec files, we found that none of them have dependencies defined.
Is this common practice when releasing cocoapods, to have no dependencies?
(..asked by a Node.js developer)
Remember Alamofire now is on version 4.0(there is even a branch for swift 3), so, if you updated your pods, it automatically installed the new version, if this what you want take a look to the migration guide.
Other case, you have to specify the version you wanna wortk with in your pod file

Is there a script/app that allows me to switch between versions of Cocoapods?

I'd like to run alpha/beta versions and current releases alongside older versions.
For instance, I'd like to easily switch between Cocoapods 0.33.1 and 0.34-RC2.
Especially for older apps that we can't invest much time into, that Cocoapods either no longer supports some Podfile formatting, or the Podspec we are referencing uses deprecated directives.
You could use rvm to set up multiple ruby environments. http://rvm.io

How to create spec for new major library version?

I've recently released version 4 of SBJson. This is a new major version that is not backwards compatible. Since SBJson is widely bundled by other popular libraries I renamed all the classes & enums to make sure it can be used in conjunction with prior versions.
However, I'm not sure how to best handle this situation with CocoaPods. I contributed a 4.0.0 spec to the existing SBJson specs, but I suspect it will be impossible to install version 3.2 and 4.0.0 in the same project. Do I have to clone the 4.0.0 spec into a SBJson4 (notice extra major version number in name) spec as well?
Morning.
If you want users to have both versions installed simultaneously they will probably have to be separate pods.
AFAIK you can't have one pod installed twice in a project. I don't even know how you'd get round the linker errors etc. for that to be possible!

Resources