amar
amar

Reputation: 4345

How to determine which xcode was used to develop from code

I have iOS app source code i want to determine which version of xcode was used to develop the project.

In project.pbxproj when i go to section /* Begin PBXProject section */ it says

compatibilityVersion = "Xcode 3.2";

so my guess is it has been developed on some 4.x version not on xcode 5. Please suggest.

Upvotes: 23

Views: 12808

Answers (4)

LyrePyre
LyrePyre

Reputation: 461

I discovered that the answer here referring to LastUpgradeVersion doesn't seem entirely correct.

Perhaps it works fine enough for projects that still use their original version, but after upgrading our project to build with Xcode 14.3 (was 10.3), the LastUpgradeVersion entry in *.xcscheme remained the same ("1030").

However, the LastUpgradeCheck entry in */project.pbxproj updated accordingly.

If ye got Git, then

git grep -F LastUpgradeCheck -- '*/project.pbxproj'

(for you speed runners out there)

Upvotes: 2

Amir Khorsandi
Amir Khorsandi

Reputation: 3708

On Xcode 11-12, This works for me:
in your schema file it mentioned the last used Xcode version.

YourProject.xcodeproj/xcshareddata/xcschemes/YourSchema.xcscheme

LastUpgradeVersion = "1160" means Xcode 11.6

Xcode changes this value when you click on Update to recommended settings warning!.
Even if you uncheck all recommended settings and click done it still changes the number.

Upvotes: 7

FFFF0H
FFFF0H

Reputation: 683

If you have .xcarchive or .ipa file that is associated with the project then you can determine the version of Xcode that was used to build it. Xcode adds, among other things, a "DTXcode" key to the info.plist upon build.

So open your .xcarchive file with Finder or rename the .ipa file to .zip and open that with Finder.
Navigate to find the app bundle file - that's the one with the .app extension. Right click and "Show Package Contents." Find the info.plist and open that with a text editor.

You will see something like:

<key>DTXcode</key>
<string>0611</string>

In this case, 611 is Xcode 6.1.1.

Alternatively, if you have access to iTunesConnect, you can see the details of a binary that was uploaded. Look for "Build Details" and find a key called "Build SDK." It will be an alphanumeric string, e.g. 12B411.

Since Apple usually only bundles one version of the SDK with Xcode, you can use this site to find the version of Xcode that corresponds to the SDK: https://en.wikipedia.org/wiki/Xcode

In the case of 12B411, I see that is was iOS 8.1 final, which was bundled with Xcode 6.1 build 6A1052d.

Upvotes: 19

Bret Johnson - MSFT
Bret Johnson - MSFT

Reputation: 594

If you open the project.pbxproj file and search for CreatedOnToolsVersion, it looks like that will give you what you want here, at least with newer versions of Xcode.

I see it set to 7.3.1 in one of my projects and 8.3.2 in another, created with that version of Xcode.

Upvotes: 17

Related Questions