Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine which xcode was used to develop from code

Tags:

xcode

ios

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.

like image 229
amar Avatar asked Jan 20 '14 05:01

amar


People also ask

How can I see my Xcode version?

Start Xcode on the Mac. Choose Preferences from the Xcode menu. In the General window, click the Locations tab. On the Location window, check that the Command Line Tools option shows the Xcode version (with which the Command Line Tools were installed).

What version of Xcode do I have Mac?

Open your Xcode up, head to the menu bar and select Xcode > About Xcode.


2 Answers

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.

like image 171
FFFF0H Avatar answered Sep 20 '22 01:09

FFFF0H


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.

like image 38
Bret Johnson - MSFT Avatar answered Sep 19 '22 01:09

Bret Johnson - MSFT