35

I created a project in Xcode 9.3, and When I open the same project in Xcode 9.2, it shows "incompatible project version". - I changed deployment target version

It asked to sign in with the team to run the project in Xcode 9.3. Without signing in, it shows error and does not get deployed.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Suresh Mopidevi
  • 919
  • 3
  • 9
  • 24

5 Answers5

77

If you can open the Project

You can simply change your Project Format (like the image)

Click to your Project File in xcode and change it

enter image description here

If you can't open the project (projectName.xcodeproj) normally

Control-click on the project file, select Show Package Contents, and then open your project.pbxproj file and make the change for:

compatibilityVersion
objectVersion

For Xcode 10.0

compatibilityVersion: "Xcode 10.0"
objectVersion :51

For Xcode 9.3:

compatibilityVersion: "Xcode 9.3"
objectVersion :50

For Xcode 8.0-9.2:

compatibilityVersion: "Xcode 8.0"
objectVersion: 48

You can find the project.pbxproj file by right clicking the .xcodeproj file in the project folder, then select Show Package Contents

thedoctori
  • 25
  • 2
  • 11
Quoc Nguyen
  • 2,839
  • 6
  • 23
  • 28
  • 3
    I've been stuck into this, likee...... DAMN.!. this answer is a life saver, I mean apple should get its shit together, Seriously do you build a software, upon which when you throw a new update the files created by new one's stop opening in the old ones .. ?? o.O – Yash Bedi Aug 28 '18 at 19:55
  • 1
    Nice answer, Working fine in Xcode 13 also... – Naresh Nov 12 '21 at 07:59
  • 1
    Xcode 15 syntax: "objectVersion = 51" – Eran Talmor Nov 24 '21 at 16:16
  • Even though compatibilityVersion was correct, objectVersion was not downgraded. Changing it to the suggested value allowed me to open my project in an old version of XCode. – JoeGalind Oct 29 '22 at 16:46
26

I edited Datasun's comment above to include correct info but here is info for other Xcode versions. You must change both compatibilityVersion and objectVersion.

In the project.pbx file you need to make two changes:

  1. compatibilityVersion
  2. objectVersion

For Xcode 9.3+:

  • compatibilityVersion is "Xcode 9.3"
  • objectVersion is 50

For Xcode 8.0-9.2:

  • compatibilityVersion is "Xcode 8.0"
  • objectVersion is 48

For Xcode 6.3-7.3.1:

  • compatibilityVersion is "Xcode 6.3"
  • objectVersion is 47
Abbey Jackson
  • 885
  • 10
  • 20
16

Changing project format is the right way to do it. But this requires you to be able to open the project, which is not the case. Therefore you can manually edit project.pbxproj (you have to open *.xcodeproj to see this file) and look for compatibilityVersion:

compatibilityVersion = "Xcode 9.3";

Then you can set the required version to a lower one. In this case it would be "Xcode 9.2", which requires you to also set the "objectVersion = 50" to 48. This value directly correlates to the Xcode project format.

Important: After this step you should be able to open Xcode and to change project format again from within Xcode to make sure any missing fields are updated accordingly.

Nusatad
  • 3,231
  • 3
  • 11
  • 17
  • 1
    I edited Datasun's comment above to include correct info. The compatibility version needs to be 8.0 (the options are only what is shown in that screenshot) but then also you must change the objectVersion. Below I post the full set of pairings for people for future reference. – Abbey Jackson May 30 '18 at 15:29
  • 1
    Thanks @AbbeyJackson, I've updated the answer. Object version indeed is needed. – Nusatad May 31 '18 at 21:19
2

For some people who are getting problem for searching the compatibilityVersion and objectVersion .Please follow these steps :

1)compatibilityVersion : Click on your .xcodeproj project in upper right (There are two icons) click on first Identity and type. And change the Project format .

2). objectVersion : Select .xcodeproj file with right click, select show package contents, now open the .pbx file with textedit and replace the 50 with a 48 (or something else)

Refernce : https://github.com/pwn20wndstuff/noncereboot1131UI/issues/2

Community
  • 1
  • 1
Priti Kanauziya
  • 265
  • 1
  • 3
  • 13
1
  • Select .xcodeproj file with right click -> select show package contents
  • Now open the .pbx file with textedit / vscode
  • Replace the compatibilityVersion = "Xcode 9.3 with compatibilityVersion = "Xcode 9.2 and objectVersion as 50. objectVersion: 50
Codemaker2015
  • 12,190
  • 6
  • 97
  • 81