# How can you manually set the build number for iOS build?

**URL:** <https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998>\
**Category:** Mobile\
**Tags:** Versioning, unreal-engine, iOS, building, UE4, question\
**Created:** [April 22, 2015, 6:01pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998 "2015-04-22T18:01:26Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_fb692cdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fb692cdc](https://forums.unrealengine.com/u/anonymous_user_fb692cdc)\
**Post date:** [April 22, 2015, 6:01pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/1 "2015-04-22T18:01:26Z")

</div>

We used to have to manually increment build numbers because the Mac editor didn’t do it for us automatically. We did it by manually changing the number in the info.plist file, which then copied over to the build.

With 4.7, it appears to auto-increment, but somehow the numbering system is different now. It jumped from build #145 to build 0.6 (which is wreaking havoc with our HockeyApp distribution). I’d like to reset it to the old integer-based build number, but can’t see where I can set the value or the increment amount.

---

<div class="post-metadata">

**Author:** ![Judge\_Axl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Judge\_Axl](https://forums.unrealengine.com/u/Judge_Axl)\
**Post date:** [May 6, 2015, 9:53am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/2 "2015-05-06T09:53:06Z")

</div>

I agree. Whatever automatic versioning is going on must be overridable by automation.

---

<div class="post-metadata">

**Author:** ![TokyoBits](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TokyoBits](https://forums.unrealengine.com/u/TokyoBits)\
**Post date:** [May 24, 2015, 5:56am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/3 "2015-05-24T05:56:50Z")

</div>

I need to know how to get this to work also. A previous build was uploaded to the app store in an older version of UE4. But now the system has changed and I cannot upload a new build via Application Loader as the new build system gives a 0.xxx number which is lower than the previous submissions build number.

So I literally cannot submit a new build for my game in order to get it on the app store…

(oops originally posted this an an answer and not a comment)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fb692cdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fb692cdc](https://forums.unrealengine.com/u/anonymous_user_fb692cdc)\
**Post date:** [May 27, 2015, 3:17pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/4 "2015-05-27T15:17:27Z")

</div>

I don’t know what the official answer is, but I found something that works. In `DefaultEngine.ini` You can add a key called `AdditionalPlistData` and provide plist-compatible XML. For example, to set our build number, we do this:

```
AdditionalPlistData=<key>CFBundleVersion</key><string>206</string>

```

It’s not elegant, as we have to manually increment it, but it does work. It uses this `CFBundleVersion` in the final ipa rather than wherever it normally would pull it from. The same should work with the `CFBundleShortVersionString` value you need to increment for the App Store.

---

<div class="post-metadata">

**Author:** ![Judge\_Axl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Judge\_Axl](https://forums.unrealengine.com/u/Judge_Axl)\
**Post date:** [May 29, 2015, 4:29am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/5 "2015-05-29T04:29:18Z")

</div>

Cheers. However, that’s assuming whatever parses the plist file later will only use the last value, as this would only append the ini-file value after the regular one. I’ll have to dig up the plist documentation to see what it says about duplicate entries.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fb692cdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fb692cdc](https://forums.unrealengine.com/u/anonymous_user_fb692cdc)\
**Post date:** [May 29, 2015, 12:37pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/6 "2015-05-29T12:37:21Z")

</div>

> However, that’s assuming whatever parses the plist file later will only use  
> the last value, as this would only append the ini-file value after the regular  
> one.

That’s not true, actually. The build system does not just append the value. It parses the plist and the additional plist data, then adds the values from the latter to the former.

PList dictionary keys must be unique, so the additional values overwrites the existing value. I confirmed this before making the original reply by taking apart my .ipa file. In the Info.plist in my application bundle, there is only one `CFBundleVersion` key, and it contains the value from the `AdditionalPlistData` entry.

---

<div class="post-metadata">

**Author:** ![Judge\_Axl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Judge\_Axl](https://forums.unrealengine.com/u/Judge_Axl)\
**Post date:** [June 2, 2015, 4:18am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/7 "2015-06-02T04:18:13Z")

</div>

That would be something Xcode is doing then? As far as I can tell, UEDeployIOS.cs just appends all the lines to the file without checking. Anyway, if you say it works, I’ll go ahead and try it out. 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fb692cdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fb692cdc](https://forums.unrealengine.com/u/anonymous_user_fb692cdc)\
**Post date:** [June 2, 2015, 11:14am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/8 "2015-06-02T11:14:56Z")

</div>

That’s interesting. I was going to look to see exactly how it handled the additional plist data, but got lazy once I knew it worked.

There must be something happening in one of the Apple developer tools that consolidates the plist so it only has one entry, but however it does it, the values in additional plist data always gets used. We’ve been using this to increment the build numbers on our Hockey builds for a couple weeks now and haven’t had a single problem. The generated .ipa does not have duplicate keys and it always has the right key.

It’s possible this could stop working at any moment, but so far, I haven’t found any officially supported way to increment the build number on iOS, and Unreal doesn’t autoincrement it like it does for Windows builds, so it’s Hobson’s choice. Having 200 build #20s sitting in Hockeyapp just with different upload dates (our situation before discovering this) gets a little confusing, and once we start shipping to the app stores, we’ll **have** to be able to increase version number.

I’m a little surprised Epic hasn’t given a better option yet or an official answer to this, frankly. They’re usually much more responsive than this when it concern things that will prevent a lot of devs from shipping their apps.

---

<div class="post-metadata">

**Author:** ![wittlief\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wittlief\_1](https://forums.unrealengine.com/u/wittlief_1)\
**Post date:** [June 8, 2015, 7:24pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/9 "2015-06-08T19:24:37Z")

</div>

Hi ,

[Are you looking for something like this?](https://developer.apple.com/library/ios/qa/qa1827/_index.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fb692cdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fb692cdc](https://forums.unrealengine.com/u/anonymous_user_fb692cdc)\
**Post date:** [June 8, 2015, 7:34pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/10 "2015-06-08T19:34:35Z")

</div>

heh… so… funny thing, I’ve been using agvtool for a long, long time. Hell, I’ve written books on Mac and iPhone development. But, we don’t check our Xcode projects in to source control, and Unreal doesn’t seem to copy back changes we make to the info.plist or other non-source project files anyway, so no, this is really not what I’m looking for. I’m looking for a way to increment the build number from within Unreal, either in a config file or in the Editor. When building for some platforms, it will auto-increment the build number, but when packaging iOS from the Unreal Editor, it does not do it, and I can’t find any place to manually set those values other than the additional plist data field (which feels like a hack).

---

<div class="post-metadata">

**Author:** ![Judge\_Axl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Judge\_Axl](https://forums.unrealengine.com/u/Judge_Axl)\
**Post date:** [June 9, 2015, 10:45am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/11 "2015-06-09T10:45:43Z")

</div>

AdditionalPlistData did do the trick wonderfully. Thanks . HockeyApp is happy again.

---

<div class="post-metadata">

**Author:** ![wittlief\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wittlief\_1](https://forums.unrealengine.com/u/wittlief_1)\
**Post date:** [June 9, 2015, 9:04pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/12 "2015-06-09T21:04:10Z")

</div>

sorry it’s not helpful. Good luck in your search.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fb692cdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fb692cdc](https://forums.unrealengine.com/u/anonymous_user_fb692cdc)\
**Post date:** [June 10, 2015, 12:36pm UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/13 "2015-06-10T12:36:59Z")

</div>

Sorry, didn’t mean to be a mean about it. You caught me on a bad morning. ☹

---

<div class="post-metadata">

**Author:** ![Kokaubeam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kokaubeam](https://forums.unrealengine.com/u/Kokaubeam)\
**Post date:** [April 23, 2016, 4:22am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/14 "2016-04-23T04:22:55Z")

</div>

The automatic build number/counter for IOS is stored here:

`[project folder]/Build/IOS/[project name].PackageVersionCounter`

You can set the “last build number” by modifying the value contained in that file.

---

<div class="post-metadata">

**Author:** ![skyphyr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@skyphyr](https://forums.unrealengine.com/u/skyphyr)\
**Post date:** [September 17, 2017, 12:08am UTC](https://forums.unrealengine.com/t/how-can-you-manually-set-the-build-number-for-ios-build/315998/15 "2017-09-17T00:08:42Z")

</div>

Not sure the first version this came in, but under Project Settings-\>iOS-\>Bundle Information, there is Version Info - the value here is used for CFBundleShortVersionString. Definitely present in 4.17+

Cheers,

Alan.
