CocoaPods plugin was failing as pods_project is nil (see here). To fix that, this PR optimistically integrates XCRemoteCache to all targets in the Pods project (adding pre/postbuild scripts,CC, SWIFT_EXEC etc) on a first Pods project generation as the plugin will not have a chance to integrate/deintegrate it in consecutive invocations (cocoapods intentionally leaves Pods project intact to not generate it without need).
There will be just a tiny performance penalty if no artifacts are ready and XCRemoteCache is disabled - xcprebuild will quit early when a global .rc/arc.rc doesn't exist and fallback to the local compilation.
By the way, I revealed that generate_multiple_pod_projects mode is not fully supported (for now). Such setup changes a way the Pods project is configured and each pod has a separate .xcodeproj.
To support it, manually modifying each .xcodeproj to integrate XCRemoteCache (build steps build settings etc.), would be required, but so far CocoaPods Plugins interface does not provide a nice API for that (link).
When
Podfile
has enabled incremental_installation, e.g.CocoaPods plugin was failing as
pods_project
isnil
(see here). To fix that, this PR optimistically integrates XCRemoteCache to all targets in thePods
project (adding pre/postbuild scripts,CC
,SWIFT_EXEC
etc) on a firstPods
project generation as the plugin will not have a chance to integrate/deintegrate it in consecutive invocations (cocoapods intentionally leavesPods
project intact to not generate it without need). There will be just a tiny performance penalty if no artifacts are ready and XCRemoteCache is disabled - xcprebuild will quit early when a global.rc/arc.rc
doesn't exist and fallback to the local compilation.By the way, I revealed that
generate_multiple_pod_projects
mode is not fully supported (for now). Such setup changes a way thePods
project is configured and each pod has a separate .xcodeproj. To support it, manually modifying each .xcodeproj to integrate XCRemoteCache (build steps build settings etc.), would be required, but so far CocoaPods Plugins interface does not provide a nice API for that (link).Standard
generate_multiple_pod_projects
Fixes #18