IOS showing error "An internal error has occurred. Editing options may be limited" on xcode 7.1

I just created one new cordova ios project through the CLI, and I opened this project in Xcode 7.1, and while working on the simulator I got some error on mainViewController.xib, if we clicked on this error, it will show the xib file and on top of that one warning message is displayed, "Internal error. Editing options may be limited." Therefore, I can not start this project.

I do not know if this is due to an Xcode error or a Cordova error or other settings problems in my Xcode.

enter image description here

+65
ios xcode cordova xib
Oct 31 '15 at 20:44
source share
19 answers

I had this problem and clearing the derived data folder fixed the problem for me

Preferences > Locations > Derived Data > click the arrow to open in Finder > trash it. 
+23
Apr 18 '16 at 10:29
source share

Try it, it works for me

Updated NOTE : Basically, this error occurred when you opened 2 different versions of Xcode at the same time.

Solution : Close Xcode and delete the derived data. Now try using one Xcode again at a time.

OR

Follow the instructions below .

1) Delete data in two ways: command or settings.

 rm -rf ~/Library/Developer/Xcode/DerivedData/ 

OR

 Xcode---> Preferences--->Location--->Derived Data 

derived data

2) In the Xcode menu, go to the product, clean the project.

enter image description here

3) Disconnect the connected device and restart Xcode and the system .

enter image description here

follow the above steps the error will be deleted.

Hope this is helpful to someone.

+20
May 19 '16 at 12:21
source share

A problem has been fixed in my program, I hope this can help someone!

So this is the process of my fix:

  1. I could not understand why I had this problem when everything worked fine.

  2. I tried the following:
    Cleaning project
    Remove DerivedData
    Creating new identical view controllers to see if the problem was only in those specific views. (same problem occurred)
    Uninstall and reinstall Xcode
    Rebooting my computer.
    Asking for StackOverflow.
    (Finally) Dispatch a TSI that has been redirected to Apple Bug Reporter.

  3. I created a new swift file for the View Controller in which the problem occurred, and it compiled, showing that the problem is not related to the View Controller itself.

  4. I began to receive the error message: "The command did not complete because of the signal: Segmentation error: 11" (for the file associated with the broken view), which is actually ambiguous. This error looks as if it was an error that occurs during the transition (switching from one View Controller to another), but the code itself does not compile. Rummaging through the error, I realized that the code stopped compiling into this swift file.

  5. So, I copied the code from the swift file (which causes problems) to the Notes application and deleted the swift file from the application.

  6. Gradually, I began to take the code from a file that did not work (in Notes), and put it in a file that worked before the error:

    Command failed due to signal: Segmentation Error: 11

  7. I started commenting on code snippets to isolate the error.

  8. After finding the error line, I realized that it was only the error that caused all these problems. A simple fix that the debugger did not recognize as a regular error. So, I fixed it and it works!

And for those of you who are less inclined to read

A summary of your problem:

  • A compile-time error in your code that is not recognized by the Xcode debugger!
+9
Jul 12 '16 at 16:49
source share

I am in Xcode 7.3 and had the same problem after opening the file in xCode 8.0. This worked for me:

Made a product / clear in Xcode, then close Xcode and clear all contents in ~ / Library / Developer / Xcode / DerivedData manually.

+8
Apr 08 '16 at 10:28
source share

Close the project from the File menu and restart the project again. The problem is gone.

+2
Apr 20 '16 at 2:15
source share

I uninstalled Xcode 7.1 and installed Xcode 7.0.1.

http://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.0.1/Xcode_7.0.1.dmg

This solved the problem.

0
Nov 05 '15 at 13:04 on
source share

I upgraded Xcode to 7.1.1 and this solved the problem.

0
Dec 01 '15 at 8:02
source share

I changed Xcode - Settings - Text Editing, check "Foldable Code Ribbon" and "Hover Focus Code Blocks".

I cleaned the project and removed the error editing the source code.

0
Apr 04 '16 at 9:30
source share

Yesterday I had this problem too. I remember that I had it before 1 year, and I remember how to fix it. The cause of the error (in my case) was an error in the code in AppDelegate. Sometimes errors in AppDelegate are the cause of this xCode behavior. Therefore, if you want to fix this, first try commenting out the code in the AppDelegate function by function until you find the function with an error. As soon as you find that it begins to split in parts the code in this particular function, until you see which line of code breaks everything. Trust me ... This will save you a lot of time searching the web.

0
Apr 20 '16 at 13:44
source share

Xcode 7.3.1

In my case, the error was caused by the following line:

 print("|" + board[x][y]) 

Changed to:

 print("| \(board[x][y])") 

After that I did Product โ†’ Clean (Command + Shift + K) This fixed the problem.

PS tip: [x] [y] is [[Character]] if that matters. I copied my Java class in Xcode to change it to Swift.

0
May 08 '16 at 9:28 pm
source share

Starting Xcode 7.3.1, the same error message appeared while editing the .xib file. Performance stopped and Xcode often became unresponsive. I filed a bug report and meanwhile came across this line of code in the .m file associated with the most problematic .xib:

NSString * check = [formatter stringFromDate: date]; /

"/" is not flagged as an error, and the project was built and executed many times with this. After removing the "/", the performance improved dramatically, and the error message appeared only a couple of times, briefly, since then and now not for several days.

So far, it seems like a crash in the debugger.

0
Aug 02 '16 at 14:29
source share

For me, the problem was the ternary operator (single line if statement). Version 7.3.1

0
Aug 12 '16 at 16:01
source share

FWIW, here is what I did for me:

I performed an operation on a value in a dictionary:

 _outcomes[key] *= multiplier 

I did not understand that Swift would consider the value as optional, even if the dictionary is not optional in this class.

moving on to the following:

 _outcomes[key]! *= multiplier 
0
Sep 04 '16 at 20:14
source share

I had this problem today and it really made me disappointed for a while. At first I got the error โ€œcould not load the simulatorโ€ and I could not load the simulator, and then my storyboard started to do this, and I got an internal error.

I tried the other solutions mentioned here, including cleaning and restoring, deleting the DerivedData folder, but no one worked. I updated my OS to Sierra and this solved the problem for me.

Hope this helps.

0
Oct 20 '16 at 7:20
source share

This happened to me in Swift 3.1, Xcode 8.3.2 for a month, I encoded everything in order, but it came to the point that all the text was just plain text, no colors, no autocomplete, no indentation, What a torture ... ..

Xcode showed an error for NSAttributedString , but it compiled fine, I could even see the underlined button in the application without problems. When I deleted this code, xcode returned to its normal state. How strange.

It's time to find out. I checked every commit from github until I found a version of my project that does not throw An internal error occurred. The functionality of the source code editor is limited. .

Then I compared the commit versions, and I decided that it started when I edited the UIButton text through code.

Error due to NSAttributedString I wanted to underline the button text as follows

  let titleAttributes:[String : Any] = [NSForegroundColorAttributeName : Constants.forgotPassColor, NSUnderlineStyleAttributeName : NSUnderlineStyle.styleSingle.rawValue] let localizedForgotPass = NSLocalizedString("forgotPassword", tableName: "Localizable", comment: "forgot button text") let titleString = NSAttributedString(string: localizedForgotPass, attributes: titleAttributes) forgetPasswordButton.setAttributedTitle(titleString, for: .normal) 

Removing this resolved. Something is wrong with NSAttributedString in Swift 3.1

0
May 19 '17 at 21:33
source share

Unfortunately, this error is quite general and does not indicate the actual cause. If you look at the error report generated by Xcode, you can get more context to figure out what is going on.

Common causes include:

  • Invalid permissions / ownerships set in files.
  • Manually delete files in ~ / Library / Developer.
  • Installing third-party kexts bugs (especially security software or a firewall).
0
Oct 31 '17 at 18:47
source share

for my part, a problem with RAM. I have to uninstall the application of others. Then it works fine.

0
Apr 15 '18 at 9:57
source share

This happened to me in Xcode 10.2 while editing a .xib file. Trying to clear the data did not help me. Solve the problem - change the device for prototyping in the interface designer, force IB to render again and solve the problem. enter image description here

0
Jul 24 '19 at 16:59
source share

I have the same problem. The only way I found this is to upgrade the Deployment Target target to version 8.1, as well as the Deployment Target project from CordovaLib to 8.1, this allows you to create and run the application without a MainViewController error. However, this is not a great solution, as I believe that it no longer supports devices with ios 7.1 installed.

-one
Nov 02 '15 at 15:30
source share



All Articles