Fergal Rooney
Fergal Rooney

Reputation: 1390

CocoaPods pod install as a target dependency

I've created an external build system target in my Xcode project and made it a dependency of the main target, so I want this target run before the main target starts building. In this external build system target I simply reference a bash script to run pod install from the SRCROOT dir.

As expected, my new target runs first and pod install runs fine but then the build stops. It does not fail however, it just reports the Build stopped with no issues. The exit code from pod install is 0 so the script should return as successful yet the build stops.

Does anyone know why this may be happening?

Upvotes: 1

Views: 1787

Answers (1)

Fabio
Fabio

Reputation: 3516

I tried to implement the same functionality directly in CocoaPods and experienced the same behavior. I think that Xcode aborts the build as CocoaPods performs changes in the Pods project, which is recreated from scratch at the moment.

This approach might be viable once we start to edit in place the Pods project in CocoaPods.

Upvotes: 3

Related Questions