Deltroid icon indicating copy to clipboard operation
Deltroid copied to clipboard

[WIP] Switch from CocoaPods to SPM where possible

Open JoeMatt opened this issue 2 years ago • 1 comments

Status

The app will build with the Swift cores (GXGP). Some others build after manually adding linker and header search settings, but others are crapping out. Mostly due to Swift PM not telling me why sometimes it makes a bridge header, and sometimes not.

Also, for some very odd reason, Swift can import the ObjC packages, but can't find the Swift ones in the core projects, depstite being able to link both, @import errors with not found, even though it's def found.

TODO

  1. Import DeltaTypes which is a ObjC framework, works in .swift, but the parent DeltaCore pure swift package, doesn't show up?!
  2. Maybe it's easier to convert the cores to SPM like GXGP rather than mess with ObjC bridges in SPM. Issue would be C++, but you can force modules and next version of Swift will have official Swift <> CPP bridge header support

Changes

SPM

  1. Add all non-Deltroid/Delta dependencies on SPM packages (Firebase etc)
  2. Convert DeltaCore to a better SPM mixed target package
  3. Explicitly link DeltaCore swift module in Core targets
  4. Re-wrote the MuteSwitch listener in Swift since it was the only actual ObjC code (other than .h typealiases for DeltaTypes)
  5. Made JoeMatt forks of all sub-core projects so I could edit the project files and Podspecs.

Non-spm

  1. Use xcconfig for code signing and target names, orgs.

JoeMatt avatar Feb 07 '23 00:02 JoeMatt

I knew if anyone could figure out how to fix this, it was you. This is such amazing research and work. This will massively improve the dev workflow and @TimOliver is working on macOS Simulator support so soon this codebase is gonna be dev friendly which will hopefully give us more of an initial boost with collaborators given I'm announcing the project this week.

Joe, you are both a legend and a life saver. 💜

lonkelle avatar Feb 07 '23 06:02 lonkelle