For years I have had a run script (below) that increments my builds for me. I recently switched to using coocapods for my sdk's. Now having the run script makes the build fail with error.
line 3: $(CURRENT_PROJECT_VERSION) + 1: syntax error: operand expected (error token is "$(CURRENT_PROJECT_VERSION) + 1")
Command PhaseScriptExecution failed with a nonzero exit code
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
Thoughts?
Hilarious that I have looked and looked and tried virtually everything for about a month to fix this and the moment I post it in the forums, I figure it out. For whatever reason if your "Bundle Version" entry in your plist contains this: "$(CURRENT_PROJECT_VERSION)" then it won't work. It must contain a number. Then it works fine.