• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Run Script with agvtool canceled build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run Script with agvtool canceled build


  • Subject: Re: Run Script with agvtool canceled build
  • From: Bernie Maier <email@hidden>
  • Date: Fri, 05 May 2017 22:48:51 +1100

Gerriet M. Denkmann:

> You are potentially modifying the project file while Xcode is still in the
> middle of building from it. Xcode quite possibly doesn't like that.
>
> - Bernie

Ok. This makes sense. agvtool does indeed modify the Info.plist and some
Xcode variables (e.g. CURRENT_PROJECT_VERSION).

But how to make this RunScript before Xcode starts building? Running it va
Terminal is a solution, but not a very good one.

Are there other ways to increase the version automatically with each build?

There are probably other solutions, but in my day job formal builds (i.e. anything that goes out to testers and certainly anything that is formally released) is built on a build server via a continuous integration system that maintains unique build numbers. The script invoked by the CI system feeds in that build number as a build variable that can be used in a variety of ways. The work project uses it in a post-build script that uses plistbuddy to modify the info.plist, but if I were doing it from scratch I'd probably use the build number more directly.

One popular alternative is to somehow use a number from you version control system, but depending on your system uniqueness may become a problem.

For my personal projects, the public release and version numbers are much less frequent, and it's easier just to maintain them manually. Though I can appreciate that's not viable for larger scale projects, hence the CI approach I first mentioned.

What I certainly don't use is agvtool. I was going to mention that I my first reply, but I decided that wasn't strictly relevant to my original answer. But for the kinds of projects I work on, I just don't find agvtool to be a useful enough tool given those project's workflows. Partly for the very reasons that you are encountering here. Relying on an external but authoritative source for a build number just seems to work better for me.

- Bernie

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Run Script with agvtool canceled build (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Run Script with agvtool canceled build
  • Next by Date: Re: Xcode refuses to add embedded library
  • Previous by thread: Re: Run Script with agvtool canceled build
  • Next by thread: Text location cursor location sometimes on wrong line
  • Index(es):
    • Date
    • Thread