Closed lstomber closed 4 years ago
Hi @lstomber,
thanks for bringing this up.
Unfortunately, Accio is designed not to be run from a run script phase within Xcode – I understand that this is annoying for you, but a better Xcode integration isn't feasible as far as I know (apart from creating a plugin, but that's another story): Putting a command like accio install
in a run script phase would cause a dependency checkup on every build, taking much time and possibly failing on no network connection.
Looking at other third-party dependency managers like Carthage and CocoaPods: As far as I have learned, those are also run via the command line and should not be integrated as a run script phase.
But there are good news: With Xcode 12 and Swift 5.3 probably scheduled for release this september, we plan to deprecate Accio in favor of built-in SPM support as SPM will then include most of the stuff that Accio provided as a bridge in the meantime. Then, you will be able to setup a simple clone and build workflow using SPM.
I'm trying to figure out how to have a project that can be cloned, opened in Xcode, and run while integrating with accio. What I have now is a build phase in my project that runs
accio install
to download and build all of the dependencies. The problem that I am encountering is that Xcode stops the build because it detects a change in the project file. This is because accio is touching this file. Git shows that no changes have actually been made. I don't see any options in accio to clone and build the dependencies without touching this file and I don't know of another way to get this to work out of the box without having to execute something on the command line before building in Xcode. Requiring a build step that cant be automated is not really acceptable. What is the recommended way to support a simple clone and build workflow that doesn't require using the command line or switching between schemes?