The other day, I was going through my xcode archive looking for a specific build, and I saw that they all looked the same! The question is pretty simple, but I haven't been able to find any way to do it. Basically, I want to add the build number to either the name description or comment (it doesnt really matter which one) of the archive so I can identify it later. Keep in mind that I don't want the version number which shows up after you click the archive. That wont work because I have incremental builds that are distributed on an ad-hoc network with testflight with the same version number, but different build numbers. For example, 2.0.8.10 and 2.0.8.11 both show up as 2.0.8. Any ideas?
What are you using to build your archives? Are you using the Xcode GUI via Product -> Archive? Or are you using some kind of build script that calls xcodebuild? If you're using the Xcode GUI, I'm not aware of any way to automate the name--you'll just have to copy in the full build number when you make the build.
If you're using a build script, check out PlistBuddy (ships with OSX, but by default isn't in your PATH, usually it's at /usr/libexec/PlistBuddy). You can use PlistBuddy to read the build number from your target's Info.plist and then insert that value into the name/description of the archive you're building.
Related
I have an app with 3 targets:
app target
message app
app extension
I'm trying to update the build number for each build, this number must be equal for all the target or App Store will invalid the build.
I've tried different approach, also this one, but I don't like it because I must hardcode the plist file names into the script, while I would prefer to keep it as general as possible.
Searching for different solutions, I've found this tool from Apple called avgtool.
I was able to create a script that updates the build number at the same value for all the target, but this seems to work only if I add it to the build phases at the top of the list. The issue is that this script must be launched before building.
In order to do that it must be added to the Edit Scheme->Build->Pre-Actions but when I write it here it doesn't have any effect.
#!/bin/bash
buildNumber=$(date +%s)
echo "$buildNumber"
xcrun agvtool new-version -all "$buildNumber"
I have an Xcode Project with three targets:
A Mac app to be distributed on the Mac App Store
The same Mac app, but to be distributed as a demo version on my
website
A login helper app that is a target dependency for the first two
targets
The login helper app is copied on build to the target of the current scheme (let's say the first target), which has a build path of
$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
When I change the scheme to the second target (the demo), I'd like for the build products path of the third target to be the same, except with _Demo attached to it. Basically, the third target's build path should always be the same as the current scheme's target (either target one or two).
Currently, I do it manually before building, but that's tedious.
Is there no way to make the Per-configuration Build Products Path (and the Per-configuration Intermediate Build Files Path, etc) dependent on the current target?
So when I select the first target, no _Demo gets attached to the path, when I select the second target, _Demo does get attached to the path.
Any pointers would be highly appreciated.
Thank you very much,
Matt
As I understand it, you want the login helper’s building to be aware of which “parent target” it’s being built in. Not sure if that’s possible.
What I’d do in this case, is add a separate “Copy” build step into targets 1 and 2. It sounds like copy is currently a part of building target 3, but it works better if it’s part of building targets 1 and 2.
I have a very similar situation with a command-line helper in one of my tools. Here’s the relevant part of my build settings.
I understand that when I run Project -> Build, it does what I set in "Build" part of current scheme. I see my targets there, so I want to choose which target to build. But there are checkboxes near each target. I can't get what do they do..
Here is screenshot:
Analyze performs static code analysis.
Test runs your unit tests.
Run runs your application.
Profile runs a profiling application for measuring speed.
Archive creates an archive of your built app, for installing on devices or for uploading to the App Store.
From what I can tell these allow you to build your project for various purposes, Running, Profiling, Archiving, etc.
Try unchecking the Profiling checkbox then building your project for Profiling Product -> Build For -> Profiling (Shift+Cmd+I). You will get an error stating Your scheme XXX is not configured for Profiling.
So I guess it's just simply a way to enable or disable different types of builds.
I want to add version number and build number to my app in Titanium Studio. How to I can add these two to my apps?
I too was struggling with this. Especially after testflightapp merged with iTunesConnect. The latter needs a strict build number system.
There's a nifty solution.
Let's say your app version is 1.2.3 You will set this in tiapp.xml. Now if you add another number to the end like so 1.2.3.1 then the first three will be used as a version number and the whole 4 numbers will be used as a build number. When you upload next build you just set it to 1.2.3.2 and it'll be a new build.
The version number of your app is set in the project's tiapp.xml file. A build number is usually automatically appended when you build/run the project for iOS.
You can look at the build number by opening the Xcode project file in the project's build directory and going to the build settings.
I've been looking but have no luck. I tried using Edit Schemes and create a "All" target but it resulted in a single bundle combining all items when I create an Archive.
Basically my app uses a single code base but with different localized contents. Each app has its on bundle ID, app name, etc. So I wanted to make releasing easier by using the minimal amount of actions to arrive at multiple IPA files. Ideally this would be a script, a few commands, or just several clicks along the way.
Currently I have 10 languages. So I'll have to select each of the language targets, click Product > Archive, then for each language click Distribute and build the IPA file in the Organizer.
Advice is greatly appreciated! Thanks in advance!
I suggest you start looking at Jenkins to get the job done. It can create an ipa for every target you want... Start automating your build via Jenkins
For automating the distribution process, i received a mail from Apple last week about meta data delivery with Transporter. It's a command line tool. Sounds interesting...