Varis Darasirikul
Varis Darasirikul

Reputation: 3063

Xcode error while openning file

Today i tried to open .xcworkspace file on my project but i got some error like this

Process:               Xcode [740]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               6.2 (6776)
Build Info:            IDEFrameworks-6776000000000000~11
App Item ID:           497799835
App External ID:       811890240
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [740]
User ID:               501

Date/Time:             2015-04-07 13:45:47.945 +0700
OS Version:            Mac OS X 10.10.2 (14C1514)
Report Version:        11
Anonymous UUID:        97BA685B-5788-8D8E-FA49-9E2A21F38165


Time Awake Since Boot: 7300 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
DVTUndoManager for delegate:<IBStoryboardDocument 0x7f7f5cb6a200>
ProductBuildVersion: 6C131e
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): enableUndoRegistration: IBDocumentUndoManager 0x7f7f6616fe50 is in invalid state, enableUndoRegistration may only be invoked with matching call to disableUndoRegistration

UserInfo: (null)
Hints: 
  0: DVTUndoManager for delegate:<IBStoryboardDocument: 0x7f7f5cb6a200>

enter image description here

I also reinstalled xcode again and clear catch but it didn't work out. Anyone know how to fix this? Thanks!

Upvotes: 1

Views: 1528

Answers (2)

Avaan
Avaan

Reputation: 4699

If above answer did not fix your issue as it did not in my case.

Follow the below steps to fix this issue,(Note:- this will have the Autolayout issues, which you can fix easily)

  1. Edit your storyboard as Source code.
  2. Locate useAutolayout="YES", change its value to useAutolayout="NO" and save the file.
  3. Now open the Storyboard in Interface Builder mode.
  4. You will be shown a pop up dialog with message "The document "Main.storyboard" had xx internal inconsistencies that were found and repaired". click on show details and copy and save the "contrain ids(object ID)" in different file.

    "This constraint is not in the referencing constraints for its first item []: object ID Fo7-pW-aKi

    This constraint's [object ID ElL-p9-pfY] second item is not in the document

    This constraint's [object ID FQa-9e-EhA] second item is not in the document

    This constraint is not in the referencing constraints for its first item []: object ID WPb-Rv-3fE

    This constraint's [object ID 1oW-wk-Zzu] second item is not in the document

    This constraint is not in the referencing constraints for its first item []: object ID 5Px-Ng-H66

    This constraint is not in the referencing constraints for its first item []: object ID iKL-sX-B40

    This constraint's [object ID 6EU-Hv-AiV] second item is not in the document

    This constraint's [object ID ElL-p9-pfY] second item is not in the document

    This constraint's [object ID FQa-9e-EhA] second item is not in the document "

  5. Click on "OK" button.

  6. The storyboard is loaded successfully. 7.Now again open the storyboard in Source code mode. now find and delete all the "contrain ids(object ID)"(saved in step 4) and then save the file.
  7. Now open the Storyboard in in Interface Builder mode. it opens successfully without any issue but in locked mode(u won't be able to modify anything)
  8. To unlock storyboard choose a locking level from the Editor > Localization Locking menu and choose Reset Locking Controls.this will unlock the storyboard.
  9. Fix some of the auto-layout issues and you good to go.

Upvotes: 0

Bharat
Bharat

Reputation: 3198

in his case, open with right Click on .xcworkspace * & click on - Show package Content & then Remove unnecessary things from that opened folder & then try to open again .xcworkspace, you will successfully open it.

Upvotes: 2

Related Questions