/ Published in: Bash

1. Click on the **Build Phases** tab.
2. Click on **Add Build Phase** (at the lower right corner) and choose **Add Run Script**.
4. Drag the **Run Script** section to **2nd** position from the top, just below Target Dependencies.
5. **Add snippet code**
6. Ensure, that **Run script only when installing** is __not checked__
7. **Rename** it
2. Click on **Add Build Phase** (at the lower right corner) and choose **Add Run Script**.
4. Drag the **Run Script** section to **2nd** position from the top, just below Target Dependencies.
5. **Add snippet code**
6. Ensure, that **Run script only when installing** is __not checked__
7. **Rename** it
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") bN=$((0x$bN)) bN=$(($bN + 1)) bN=$(printf "%X" $bN) /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE"
URL: http://stackoverflow.com/questions/10091310/heres-how-to-auto-increment-the-build-number-in-xcode
Comments
