agvtool

Xcode: Increment build number

若如初见. 提交于 2019-12-24 18:48:32
问题 We use a script that creates a time stamp and replaces the apps build number. #!/bin/bash echo "Update Build Number to Timestamp" echo "--------------------------------" # fail on error set -e agvtool new-version -all $(date +%Y%m%d%H%M%S) This changes the build number to something like this: 201703241425 . We introduced an in-house framework to our Project. The command above also replaces the frameworks Build number and Current Library Version . However, the builds fail with the following

AGVTool new-version and what-version do not correspond

孤街醉人 提交于 2019-12-23 08:46:11
问题 When I do: agvtool new-version -all 99 It updates my Info.plist file. However, if I do this: agvtool what-version or agvtool next-version I get this error: There does not seem to be a CURRENT_PROJECT_VERSION key set for this project. Add this key to your target's expert build settings. Why does this not correspond. Do I have to use the plist command line tool in order to retrieve the current version of my app. Curiously agvtool what-marketing-version works fine. Ironically agvtool does not

(iOS, XCode 4.2) Setting bundle version using Git post-commit hook causes my project to turn into a Mac project

谁都会走 提交于 2019-12-22 10:00:13
问题 I've decided to start versioning my project "the Apple way," using "Bundle versions string, short" for the "marketing version" (i.e. 2.0.1 ) of my project, and "Bundle version" as a build number (e.g. 42 ). To that end I've added a Git post-commit hook to call agvtool next-version -all . This does in fact work -- Info.plist is being properly updated with an incrementing version number. However it also has the unfortunate side effect of apparently converting my iOS project into a Mac project -

Is there a way of automatically writing custom values to the bundle's .plist during a build phase?

大城市里の小女人 提交于 2019-12-18 08:39:55
问题 I'm setting up a CI system using Jenkins and am using agvtool to bump and set marketing & technical versions at build time. In addition to setting the versioning at build time it would be very useful to set a couple of of custom values in the .plist. Is this possible? 回答1: You can edit the Info.plist at build time by taking advantage of the "Pre-actions" options to run a script. Here's an example script that increments a Key in the Plist called UserDefinedVersionNumber #!/bin/sh #Grabs info

Run a shell script before build in Xcode

空扰寡人 提交于 2019-11-30 20:33:22
I need to adjust my build and version number for my project before build/archiving. I tried multiple things, but so far to no avail. I added a target with the script to update the numbers and added that as first dependency to my main target. But because I have multiple dependencies as I have extensions in my app and all dependencies are executed by Xcode in parallel (or at least in random order) this does not work. I added a pre-action to my scheme with the same result. Xcode is not waiting for my pre-action to complete before continuing with the build (I added a sleep 100 to test). As I'm

Run a shell script before build in Xcode

杀马特。学长 韩版系。学妹 提交于 2019-11-30 04:54:59
问题 I need to adjust my build and version number for my project before build/archiving. I tried multiple things, but so far to no avail. I added a target with the script to update the numbers and added that as first dependency to my main target. But because I have multiple dependencies as I have extensions in my app and all dependencies are executed by Xcode in parallel (or at least in random order) this does not work. I added a pre-action to my scheme with the same result. Xcode is not waiting

Is there a way of automatically writing custom values to the bundle's .plist during a build phase?

拥有回忆 提交于 2019-11-29 14:53:21
I'm setting up a CI system using Jenkins and am using agvtool to bump and set marketing & technical versions at build time. In addition to setting the versioning at build time it would be very useful to set a couple of of custom values in the .plist. Is this possible? You can edit the Info.plist at build time by taking advantage of the "Pre-actions" options to run a script. Here's an example script that increments a Key in the Plist called UserDefinedVersionNumber #!/bin/sh #Grabs info from plist plist=$SRCROOT"/"$INFOPLIST_FILE currentBuild=`/usr/libexec/PlistBuddy -c "Print

Better way of incrementing build number?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 01:46:20
问题 I have been using a shell script as part of my Xcode build process to increment the build number within the plist file, however it\'s making Xcode 4.2.1 crash frequently (with an error about the target not belonging to a project; I\'m guessing the changing of the plist file is confusing Xcode in some way). The shell script did this so that the build number is only incremented by agvtool when a file is newer than the plist file (so just building didn\'t increment the value): if [ -n \\\"`find

Better way of incrementing build number?

允我心安 提交于 2019-11-25 20:10:50
I have been using a shell script as part of my Xcode build process to increment the build number within the plist file, however it's making Xcode 4.2.1 crash frequently (with an error about the target not belonging to a project; I'm guessing the changing of the plist file is confusing Xcode in some way). The shell script did this so that the build number is only incremented by agvtool when a file is newer than the plist file (so just building didn't increment the value): if [ -n \"`find ProjDir -newer ProjDir/Project-Info.plist`\" ]; then agvtool -noscm next-version -all; else echo \"Version