IOS project showing error “An internal error occurred. Editing functionality may be limited” on xcode 7.1

前端 未结 23 2125
春和景丽
春和景丽 2020-12-02 15:34

I just created one new cordova ios project via CLI, and i opened that project in Xcode 7.1 and while running on simulator am getting some error on mainViewController.xib, if

相关标签:
23条回答
  • 2020-12-02 15:44

    I have the same problem. The only way I have found to get round this is to update the target 'Deployment Target' to 8.1 and also the CordovaLib project 'Deployment Target' to 8.1 this allows the app to build and run without the MainViewController error. However this is not a great solution as I assume it no longer supports devices with ios 7.1 installed.

    0 讨论(0)
  • 2020-12-02 15:44

    As for me problem was in ternary operator (single line if statement). Version 7.3.1

    0 讨论(0)
  • 2020-12-02 15:47

    FWIW, here's what fixed this for me:

    I was performing an operation on a value in a dictionary:

    _outcomes[key] *= multiplier
    

    I didn't realize that Swift would treat the value as an optional even though the dictionary is not an optional in this class.

    changing to the following worked:

    _outcomes[key]! *= multiplier
    
    0 讨论(0)
  • 2020-12-02 15:48

    This has been happening to me on Swift 3.1, Xcode 8.3.2 for a month, I was coding okay, But it came to a point that all the text was only plain text, no colours, no auto complete, no indent. What a torture.....

    Xcode was showing an error for NSAttributedString, but it was compiling fine, I could even see the underlined button in the app no problem. When I removed this code xcode went back to normal. How strange.

    Took me days to figure out. I checked out every single commit from github until I found a version of my project that doesnt throw An internal error occurred. Source editor functionality is limited. error.

    Then I compared the commit versions and I figured this started to happen when I edited UIButton text thru the code.

    Error caused because of NSAttributedString I wanted to underline to the button text as following

        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 solved the problem. There is something wrong with NSAttributedString in Swift 3.1

    0 讨论(0)
  • 2020-12-02 15:49

    I updated XCode to 7.1.1 and this resolved the issue.

    0 讨论(0)
  • 2020-12-02 15:51

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

    Preferences > Locations > Derived Data > click the arrow to open in Finder > trash it.
    
    0 讨论(0)
提交回复
热议问题