soundscape-community / soundscape

An iOS application/service that aids navigation through spatialized audio
https://soundscape.services
MIT License
18 stars 17 forks source link

Dependency `cocoapods-patch` incompatible with newest version of `cocoapods` #64

Closed 2kai2kai2 closed 10 months ago

2kai2kai2 commented 11 months ago

Issue

We depend on cocoapods-patch which requires cocoapods ~> 1.11.0 (that is, some version 1.11.x, no higher or lower) where the latest version is 1.12.1 and therefore incompatible (issues sometimes arise when both versions of the gem are installed at the same time, and cocoapods-patch naturally will not work without cocoapods ~> 1.11.0).

We use cocoapods-patch to patch the dependency iOS-GPX-Framework which has not been updated since Nov 2016 (last release Dec 2014).

Workarounds

The current workaround is just to force cocoapods to be version 1.11.x (latest is 1.12.1) and if necessary, uninstall all other versions. However, this is probably not a good long-term solution.

An alternate workaround is described in a pull request https://github.com/doublesymmetry/cocoapods-patch/pull/26 which provides an update for cocoapods-patch, though it has not been merged (the project may have been abandoned; no changes have been made since Dec 2021).

Possible Long-Term Solution

It's probably best to get a newer version of iOS-GPX-Framework. These are two different Swift ports of the original: https://swiftpackageindex.com/isklikas/iOS-GPX-Framework https://swiftpackageindex.com/vincentneo/CoreGPX If one of these works, we will be able to replace the old iOS-GPX-Framework and eliminate cocoapods-patch, which will then allow us to use more recent versions of cocoapods


As an additional note on the proposed long-term solution, both of these GPX replacements would probably allow for cocoapods to be completely removed, which would simplify dependencies to just using the Swift Package Manager.

The only two dependencies imported using cocoapods are iOS-GPX-Framework and TBXML, where TBXML appears to only be used as a dependency for iOS-GPX-Framework. It is also not required for the replacements, since they both use the XMLParser included with Foundation


transferred from https://github.com/soundscapeforeveryone/soundscape/issues/11

jchudge commented 11 months ago

What are the implications of doing this for a longer term cross-platform strategy where we have Soundscape on both iOS and Android?

steinbro commented 11 months ago

All of this (CocoaPods, cocoapods-patch, iOS-GPX-Framework) is very iPhone-specific, so not much relevance to any future Android port.

Also, IIRC, iOS-GPX-Framework is just for testing (loading a GPX file to replay a recorded route in the simulator), so we could technically drop all of this without breaking the app itself.

But to the extent this is still a useful testing feature, I'm all for updating iOS-GPX-Framework and dropping CocoaPods entirely.

steinbro commented 11 months ago

Correcting my above comment -- the iOS-GPX_Framework appears to also be a critical part of using routes from the authoring tool. So, not safe to just rip out, but it seems like there are friendlier replacements like CoreGPX that @2kai2kai2 is already incorporating.