Xcode 13 : Source Control Commit showing Intermediates Folder --- Auto Build Increment

I just created a new project in Xcode 13. When I go to commit the project the Build/Intermediates/XCBuildData folder keeps showing up. I assume I don't want to commit these but I can't get them ignored. Why are they showing up all the time? It's very annoying.

These files may have shown up after I enabled the Apple Generic for Versioning System under the Versioning section in the Build Settings. I'm then using agvtool next-version -all in a run script in the build phases to automatically increment the build number.

If this is the cause of all these files then I need another way to handle auto build number increment. As tracking that many files just to handle a simple build number is ridiculous.

It seems I can't use the old way of modifying the CFBundleVersion in the info.plist like I had done before xCode 13. Prior to xCode 13 I did this by using the following a run script in Build Phases

#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"

CFBundleVersion doesn't exist anymore in the info.plist file. It seems to be automatically set to $(CURRENT_PRODUCT_VERSION). I've tried changing or removing this but ended up completely breaking my project file, which I had to trash, and recreate. Thankfully I hadn't written any code yet but I've been trying to sort out this simple process for hours now.

Very much welcome any thoughts or suggestions?

  • Additional info here...

    This appears to be caused by adding cocoa pods to the project? I simply did pod init, added CocoaAsyncSocket as a pod, did a pod install, and opened the xcworkspace file. When I try to commit I get all those files...

Add a Comment