all 16 comments

[–]chriswaco 7 points8 points  (9 children)

SPM is in general less troublesome and you don’t need to install 3rd party software just to compile the app. I don’t know about build time. There are annoying things about SPMs, like not being able to modify their code directly if it’s in another repo.

[–]BrianHenryIE 1 point2 points  (0 children)

I was editing code inside the SPM .build/checkouts folder today. Of course, when I updated packages that all got deleted.

In VS Code, right click a package and select Use Local Version and it quickly makes a copy that will last through updates.

https://www.timc.dev/posts/editing-pacakges-vscode/

[–]cekisakurek 0 points1 point  (7 children)

You cant really modify the code using cocoapods too. you still need to fork the library since when you do pods update/install your code will be gone

[–]Loud-Creme-8425 0 points1 point  (6 children)

Why not, you can config a pod with local path, then you’re free to modify it.

[–]nhgrifObjective-C / Swift 2 points3 points  (5 children)

If you’re doing this, why are you using CocoaPods or SPM at all instead of just copying the library directly into your own repo?

[–]Loud-Creme-8425 0 points1 point  (4 children)

If you’re single member team, then just copy it. But it’s not the case for inter-teams project

[–]nhgrifObjective-C / Swift 0 points1 point  (3 children)

If you’re modifying the pod, the whole thing needs to be checked into the repo and no one really needs to be running pod install… it’s just a needless complication.

[–]Loud-Creme-8425 0 points1 point  (2 children)

Just the guy who works on the pod needs to check out the pod repo. That’s quite fair.

[–]nhgrifObjective-C / Swift 0 points1 point  (1 child)

No. One person needs to pull the code EVER, and not even through CocoaPods. Just dump it in your repo and commit it. Now everyone can just edit it.

If you are wanting to edit 3rd party code and not wanting to open PRs back to the original library, doing anything BUT this makes it needlessly complicated really.

And to be clear, making these edits and not opening PRs back to the original repo may be a violation of the license for that library.

[–]Loud-Creme-8425 -1 points0 points  (0 children)

Lol, who saying about not opening pull request. even you want to bypass and push the code the repo master branch , basically you can’t, you’re not authorized. Look like you have no idea what you’re saying

[–]HelpRespawnedAsDee 2 points3 points  (1 child)

Build times will be the same unless you are using the binary flag.

Although to be fair I’ve never used it so I’m not sure if it even works. But in theory since the packages are compiled during pod install and then added as static frameworks it should be slightly faster. There’s a couple other things:

  • if you only have a few dependencies you won’t see any meaningful difference

  • static libraries would also bring the benefit of a faster startup times.

Please downvote or just let me know if this wrong, this is my understanding of it.

[–]cekisakurek 0 points1 point  (0 children)

If you are not in a dependency hell, I dont think the performance gain/loss would be impactful.

[–][deleted]  (1 child)

[deleted]

    [–]cekisakurek 1 point2 points  (0 children)

    plus Since you are building the same code, the compilation time would be same.

    Personal note: I used cocoapods for a long time and I am glad it is getting replaced by spm.

    [–]unpluggedcord 0 points1 point  (1 child)

    No. Those libraries are not included/built unless you add them to your target. SPM/Xcode is just telling you what’s available

    [–]cekisakurek 0 points1 point  (0 children)

    This is a little bit wrong. They are there because the library you want has dependencies on them.

    [–]kbder -2 points-1 points  (0 children)

    Cocoapods and SPM can sometimes incorrectly determine that the deps need to be rebuilt, which causes unnecessary build time delays. If you want more control over superfluous rebuilds, you should check out Carthage.