pyconfig v1.0

Last night I published the first formal release of a tool I wrote last month for generating xcconfig files. This tool is called pyconfig and is open source and available on Github. This tool was written out of a desire to make handling diffs of the xcconfig files a lot easier.

At work we are in the middle of an effort to migrate many of the third party libraries we use over to being managed by CocoaPods. In addition we are making new work into our own internal Pods for better management of our code. Since we already use xcconfig files in our project, the xcconfig files generated by CocoaPods don't integrate easily into our existing project. As a result I have been having to manage these files heavily.

I am a huge supporter of using whatever build tooling that you need to make your work easier and more efficient. For us, it took git diffs that looked like this:

  PODS_ROOT = ${SRCROOT}/Pods
- HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/CocoaLumberjack" "${PODS_ROOT}/Headers/Public/MBProgressHUD"
+ HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/CocoaLumberjack" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Crashlytics"

And turned them into diffs that look like this instead:

  setting PODS_ROOT {
    for * {
        ${SRCROOT}/Pods
    }
  }

  setting HEADER_SEARCH_PATHS inherits {
    for * {
        "${PODS_ROOT}/Headers/Public",
        "${PODS_ROOT}/Headers/Public/AFNetworking",
        "${PODS_ROOT}/Headers/Public/Mantle",
        "${PODS_ROOT}/Headers/Public/CocoaLumberjack",
        "${PODS_ROOT}/Headers/Public/MBProgressHUD",
+       "${PODS_ROOT}/Headers/Public/Crashlytics"
    }
  }

This has added a huge amount of clarity to our code reviews when build settings need to change, and allows us to make comments with respect to only the part that had to change rather than an entire line of settings. If you would like to install and check it out, there are instructions as part of the readme and there is a wiki that contains a lot of information on how to get started.



If this blog post was helpful to you, please consider donating to keep this blog alive, thank you!

donate to support this blog