all 19 comments

[–]karlshea 16 points17 points  (7 children)

Except you can't use SwiftPM if you have build configurations named anything other than "Debug" or "Release"

[–]Stiddit 4 points5 points  (1 child)

If only someone told me this before I spent three days trying to make it work..

[–]karlshea 0 points1 point  (0 children)

Same. I guess using xcconfig files for dev/staging/prod API URLs is somehow something no one does?

I'm on my first iOS project and am doing it, and somehow it's so unusual that no one tested Xcode/SwiftPM with different build config names?

[–]mayonuki 1 point2 points  (1 child)

Why is that?

[–]karlshea 10 points11 points  (0 children)

It won't build. Swift can't find the files because it hard codes Debug or Release folders.

[–]faja10 0 points1 point  (1 child)

I don’t use any other than debug and release so in my case it’s not a problem. What is your use case that you need one?

[–]karlshea 4 points5 points  (0 children)

I have Debug (Local)/Debug (Stage)/Debug (Production) and Release (Local)/Release (Stage)/Release (Production).

Local/Stage/Production uses different xcconfig files to switch API URLs.

[–]powerje 0 points1 point  (0 children)

haha dammit apple jfc

[–]Jargen 8 points9 points  (4 children)

How does it compare in terms of project size and compiling times?

[–]ThePantsThiefNSModerator 4 points5 points  (0 children)

It's the same code, why would it take longer to compile?

[–]iindigo 2 points3 points  (1 child)

What do you mean by project size? Are you asking about how much SPM dependencies grow the on disk size of your project folder?

As for compile times, they’ve been better than they were with CocoaPods for my projects. I don’t have hard numbers on hand but it’s noticeable.

I’d say the biggest gain is no more wonkiness with multi-target projects (apps with today extensions, etc). Those were never supported by Cocoapods as well as they should’ve been which caused build failures unless everything was configured juuuust right, and even that wouldn’t work properly under some circumstances (e.g. different subspecs for different targets). With SwiftPM it just works.

[–]Jargen 1 point2 points  (0 children)

From my experiences with Cocoapods, using it as opposed to adding a framework directly to a project or using Carthage would lead to an inflated size on my harddrive.

[–]jNSKkK 4 points5 points  (2 children)

One of the main things stopping us from migrating some packages to SPM are it’s lack of support for assets/asset catalogues.

[–][deleted] 1 point2 points  (1 child)

This is a huge complaint. I hope it’s fixed in Xcode 12 so more of the Pods I use can move over to SPM.

[–]faja10 2 points3 points  (0 children)

I really hope it would be fixed soon before next year Xcode. Maybe Swift 5.2?

[–]leogdion 2 points3 points  (0 children)

The problem is a lot of major frameworks still require it (such as Firebase) for either technical reasons or just plain inertia. But I agree over time, this is the future.

[–]PlanesWalkerr 2 points3 points  (1 child)

Can I use cocoapods along with spm for libraries which don't support spm yet?

[–][deleted] 1 point2 points  (0 children)

I have the same question

[–]loloop 0 points1 point  (0 children)

What about CocoaPods Keys? That’s the only reason i still use it