Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode "The file couldn't be opened" [closed]

I am using ionic to develop an app and everything had been working fine for some time.

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

enter image description here

The file couldn't be opened.

The file can open just fine in xcode 6.x

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

Side note: I have searched for answers to this issue but in other cases the error message is more descriptive. The error message I get does not give a reason why it cannot be opened, be it permissions or parsing issues or otherwise, so I am stumped as to how to fix this. I have tried deleting (null) lines in files and deleting my <user>.xcuserdatad files as suggested in these answers anyway to no avail.

  • Cordova 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 I can fix it?

like image 344
Harry Avatar asked Dec 07 '15 03:12

Harry


2 Answers

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

Curious...

like image 118
Harry Avatar answered Sep 21 '22 13:09

Harry


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

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

Alternatively, maybe ionic CLI has some option to select which Xcode it should use.

like image 33
Enrique Oriol Avatar answered Sep 23 '22 13:09

Enrique Oriol