IOS 프로젝트에서“내부 오류가 발생했습니다. xcode 7.1에서 편집 기능이 제한 될 수 있습니다.
방금 CLI를 통해 하나의 새로운 cordova ios 프로젝트를 만들었고 Xcode 7.1에서 해당 프로젝트를 열었고 시뮬레이터에서 실행하는 동안 mainViewController.xib에서 오류가 발생했습니다. 해당 오류를 클릭하면 xib 파일이 표시되고 맨 위에 표시됩니다. 경고 메시지 "내부 오류가 발생했습니다. 편집 기능이 제한 될 수 있습니다.". 그래서이 프로젝트를 실행할 수 없습니다.
이것이 Xcode 버그 또는 Cordova 버그 또는 내 Xcode의 다른 설정 문제로 인한 것인지 모르겠습니다.
이 문제가 있었고 파생 데이터 폴더를 지우면 문제가 해결되었습니다.
Preferences > Locations > Derived Data > click the arrow to open in Finder > trash it.
이것을 시도해보세요.
업데이트 된 참고 : 대부분이 오류는 두 가지 버전의 Xcode 를 동시에 열 때 발생했습니다 .
솔루션 : Xcode를 모두 닫고 파생 데이터를 지우십시오. 이제 다시 시도하고 한 번에 하나의 Xcode를 사용하십시오.
또는
아래 언급 단계를 따르십시오 .
1) 파생 된 데이터를 명령 또는 기본 설정에 따라 두 가지 방법으로 폐기하십시오.
rm -rf ~/Library/Developer/Xcode/DerivedData/
또는
Xcode---> Preferences--->Location--->Derived Data
2) Xcode 메뉴에서 제품으로 이동 하여 프로젝트를 지 웁니다 .
3) 연결된 장치를 분리하고 Xcode 와 시스템을 다시 시작 합니다 .
위의 단계를 수행하면 오류가 제거됩니다.
누군가에게 도움이되기를 바랍니다.
내 프로그램의 문제를 수정했습니다. 이것이 누군가를 도울 수 있기를 바랍니다!
그래서 이것은 내 수정 과정입니다.
모든 것이 잘 작동했을 때 왜이 문제가 발생했는지 알 수 없습니다.
I tried the following:
Cleaning project
DeletingDerivedData
Creating new, identical View Controllers to see if the issue was just in those particular views. (the same issue occurred)
Deleting and Reinstalling Xcode
Restarting my Computer.
Asking on StackOverflow.
(Finally) Submitting a TSI, which got redirected to Apple Bug Reporter.I made a new swift file for the View Controller that was having the issue, and it compiled, showing that is was not an issue with the View Controller itself.
I started getting an error: "Command failed due to signal: Segmentation fault: 11" (on the file associated with the View that did not work), which is really ambiguous. This error looks as if it would be an error occurring in a segue (jumping from one View Controller to another) but the code itself would not compile. After digging into the error, I realized the code stopped compiling at that swift file.
So, I copy-pasted the code from the swift file (the one causing problems) into the Notes application and I deleted the swift file from the Application.
Little by little, I started taking code from the file that did not work (in Notes) and putting it into the file that did work until the error came up:
Command failed due to signal: Segmentation fault: 11
I started commenting out snippets of the code to isolate the error.
After finding the error line, I realized it was just an error that caused all of these issues. A simple fix that the debugger did not recognize as a routine error. So, I fixed it and it works!
And for those of you less inclined to read
Summary of what your problem may be:
- Compile-time error in your code that is not recognized by the Xcode debugger!
I'm in Xcode 7.3 and had the same issue after opening file in xCode 8.0. This worked for me:
Made a product/clean in Xcode, then quit Xcode and clean out all the content in ~/Library/Developer/Xcode/DerivedData manually.
Close project from File menu and Reopen the project again, the issue is gone.
I have deleted XCode 7.1 and installed XCode 7.0.1.
This solved the problem.
I updated XCode to 7.1.1 and this resolved the issue.
I changed Xcode - Preferences - Text Editing, ticked on 'Code Folding Ribbon' and 'Focus code blocks on hover'.
Cleaned the project and it removed the source editing error.
Yesterday I had this problem too. I remember I've had it before 1 year too and I remember how to fix it. The reason for the error (in my case) was an error in the code in AppDelegate. Sometimes errors in AppDelegate are the reason for this behaviour of xCode. So if You want to fix it, first try commenting Your code in AppDelegate function by function, until you find the function with the error. Once you find it start uncommenting piece by piece the code in that particular function until you see which code line is breaking everything. Believe me ... This will save you lots of time searching the internet.
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 a Product -> Clean (Command+Shift+K) That fixed the issue.
PS: board[x][y] is a [[Character]], if that matters. I copy-pasted my Java Class into Xcode to edit it into Swift.
Running Xcode 7.3.1, I had the same error message appear while editing a .xib file. Performance would stall, and Xcode often became unresponsive. Filed a bug report, and in the meantime came across this line of code in the .m file associated with the most problematic .xib:
NSString *check = [formatter stringFromDate:date];/
The "/" was not being flagged as an error, and the project had built and run many times with this in place. After removing the "/", performance improved dramatically, and the error message has only appeared a couple of times, briefly, since then and by now not for several days.
So far, this seems to be a case of a glitch in the debugger.
As for me problem was in ternary operator (single line if statement). Version 7.3.1
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
I just had this issue today and it really got me frustrated for awhile. First I got the error "unable to boot the simulator" and I couldn't load the simulator and then my storyboard started doing this and I got an internal error.
I tried the other solutions mentioned here including cleaning and rebuilding, deleting the DerivedData folder but none worked. I upgraded my OS to Sierra and that solved the problem for me.
Hope it helps.
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
Unfortunately, this error is pretty generic and doesn't point to an actual cause. If you look at the error report generated by Xcode, you might be able to get more context to figure out what is going on.
Common causes include:
- Incorrect permissions / ownership set on files.
- Manually deleting files in ~/Library/Developer.
- Installing buggy 3rd party kexts (especially security or firewall software).
from my side, its RAM issue. I have remove others application.Then it works normally.
This happened to me in Xcode 10.2, while editing .xib file. Trying to clear de derived data didn't help me. What solved the problem was change the device for prototyping in the interface builder, it forced the IB to render again and solved the problem.
나도 같은 문제를 안고있어. 이 문제를 해결하는 유일한 방법은 대상 '배포 대상'을 8.1로 업데이트하고 CordovaLib 프로젝트 '배포 대상'을 8.1로 업데이트하는 것입니다. 이렇게하면 앱이 MainViewController 오류없이 빌드 및 실행될 수 있습니다. 그러나 이것은 더 이상 ios 7.1이 설치된 장치를 지원하지 않는다고 가정하기 때문에 훌륭한 솔루션이 아닙니다.
'code' 카테고리의 다른 글
JSON.stringify에 해당하는 jquery (0) | 2020.11.12 |
---|---|
5 백만 개 이상의 레코드에 대한 MongoDB 쿼리 성능 (0) | 2020.11.12 |
Windows의 git-svn. (0) | 2020.11.12 |
사용자 지정 예외 메시지 : 모범 사례 (0) | 2020.11.12 |
obj.nil? (0) | 2020.11.12 |