Xcode "File cannot be opened"

I use ionic to develop the application, and everything has been working fine for some time.

However, I recently upgraded to xcode 7.x, so I can compile for iOS 9. Now, when I run ionic prepare ios to create ios platform files and click on the *.xcodeproj file, I get the following error:

enter image description here

 The file couldn't be opened. 

File can only be opened in xcode 6.x

I need it to work in xcode 7.x for a build application with later versions of the SDK

Side note. I was looking for answers to this problem, but in other cases the error message is more visual. The error message that I get does not give a reason why it cannot be opened, whether it is permissions or problems with the analysis or otherwise, so I do not understand how to fix it. I tried deleting the (null) lines in the files and deleting the <user>.xcuserdatad files as suggested in these answers, to no avail.

  • Cordoba CLI: 5.4.1
  • Gulp version: CLI version 3.9.0
  • Gulp local: Local version 3.9.0
  • Ionic version: 1.1.0
  • Ionic CLI version: 1.7.12
  • Ionic App Lib Version: 0.6.5
  • ios-deploy-version: not installed
  • ios-sim version: 5.0.4
  • OS: Mac OS X El Capitan
  • Node Version: v4.2.4
  • Xcode Version: Xcode 7.2 Build Version 7C68

Question: why am I getting this error message and how to fix it?

+8
ios xcode xcode7 ionic
source share
4 answers

I reinstalled El Capitan, xcode 7.2 and the required libraries (ionic, gulp, ..), and now everything works fine.

Curious...

+5
source share

I had the same problem and it was caused by a different Xcode project file format. If the project is compiled with the old Xcode, the new one cannot open it.

I suggest that you delete any build file to make sure that the project is really compiled the next time, and if the problem persists, also delete the old version of Xcode, because it looks like it is used to compile the project.

Alternatively, perhaps the ionic CLI has the ability to choose which Xcode it should use.

+1
source share

2 possible solutions:

1. Ionic configuration value

It seems that somewhere in your project, the configuration value makes ionic still assume that you are using Xcode 6 because you used it before and therefore continues to generate the project file accordingly.
What happens if you start again in a different directory from the starter project file:

 ionic start myApp tabs ionic prepare ios 

Can you open the generated Xcode project file? If so, I suggest you copy this starter project to all the files from your original project.

2. Update node Js to the latest version

I see that you are using node 4.xx, try upgrading to 5.xx

+1
source share

I had something similar after updating Xcode, the git command line tool will not work after the update, it turns out I had to open Xcode and accept the license for the new Xcode after everything works fine.

+1
source share

All Articles