Remix.run Logo
armadsen 7 days ago

Right, but you can’t have a single package containing both ObjC and Swift. It’s a limitation of SwiftPM that has prevented me from using it for a few projects (I am using it in several others, though).

einsteinx2 7 days ago | parent [-]

You can mix them, it just has to be released as a binary framework which is a bit annoying as I would prefer a pure source release but it does work.

josteink 7 days ago | parent [-]

Since it clearly wasn’t obvious, I was asking in the context of a package consumer, not publisher.

My involvement with MacOS development is somewhat limited and I have no plans publishing any packages yet ;)

einsteinx2 7 days ago | parent [-]

Oh gotcha, yeah they’re absolutely usable as any maintainer mixing the languages and providing SPM support will handle the binary release part. If anything it’s nicer for the consumer (binary releases in general) as it cuts down on full app rebuild times.

josteink 6 days ago | parent [-]

I kept hitting my head against the wall, and getting a million stupid errors trying to resolve header files. But in the end I got it working, and I will no longer be one of the guys pestering the old Cocoapods servers :)

For whoever comes after me... When ChatGPT suggests changing your Objective-C from this:

   #import package.h
To this:

   #import <package/package.h>
Just skip that rabbithole of inifiny-nested failure, and just do this instead:

   @import package;
And you're done. You can thank me later :)