bazel-ios / cocoapods-bazel

A Cocoapods plugin for automatically generating Bazel BUILD files
Apache License 2.0
110 stars 21 forks source link

Fix: Resolve CocoaPod environment variables #67

Closed luispadron closed 2 years ago

luispadron commented 2 years ago

Summary

The CocoaPods runtime exposes a few environment variables, two of the most common (that I know of) are:

Currently cocoapods-bazel does inject the value for PODS_TARGET_SRCROOT since this is just the : string (current directory in a BUILD file). However, PODS_ROOT is not injected which should typically resolve to //Pods. Furthermore, we do no injection of these variables in a schemes environment. The PODS_TARGET_SRCROOT env var is only injected when used within an xcconfig.

This PR fixes a few of these issues and should close #13.

The changes are: