Ryan von Schwedler
Ryan von Schwedler

Reputation: 63

Xcode Cocoa Simulator Gone?

Haven't found anything about where the Cocoa Simulator went.

I'm trying to simulate an OS X app UI without building/running.

Any way in Xcode 6 to load just the nib file to interact with?

Upvotes: 3

Views: 641

Answers (3)

7stud
7stud

Reputation: 48589

I got the Preview to work in Xcode 6, however as far as I can tell it's useless because you can't resize the window. Here's how:

1) In the Project Navigator pane (on the left side of the Xcode window), select MainMenu.xib. That will display the menu bar in Interface Builder in the middle pane.

2) In the Xcode menu bar, click on View>Assistant Editor>Show Assistant Editor. (Or, you can open the Assistant Editor by clicking on the interlocking rings icon at the far right at the top of the Xcode editor window).

3) At the top of the Assistant Editor pane there are some forward and back arrows. To the right of the arrows is a jump bar, which shows directory and file names separated by right arrows. If you click on the first name in the jump bar(you may see some automatic sliding happen to reveal the first name), the Assistant Editor pop-up menu will be revealed. In the pop-up menu, click on Preview>MainMenu.xib. If you don't succeed in clicking on the first name in the jump bar, you won't see the Preview choice in the pop-up menu.

If you see a completely blank screen for the preview(mine actually displays English in the bottom right corner), then in the Interface Builder pane select the icon that represents your MainMenu.xib file--it's usually the icon at the bottom. The preview should display in the Assistant Editor pane.

It's also possible to navigate to your MainMenu.xib file in the Assistant Editor pop-up menu and select it. If I do that, the Assistant Editor pane still displays a blank window, but with the object icons aligned down the left hand side. In that case, if I select the icon for MainMenu.xib(i.e. I select the icon in the Assistant Editor pane rather than in the Interface Builder pane), the preview appears.

Upvotes: 0

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

Switch to the assistant editor. Use the navigation button in the jump bar to preview xib and storyboard files in the assistant editor.

enter image description here

UPDATE

To get the preview to appear, you must open the xib or storyboard file in both assistant editors. Use the navigation button in the bottom or right editor, depending on how you stack the editors, to preview the interface.

Upvotes: 0

ben
ben

Reputation: 11

in xcode 5 you could simulate your document (editor -> simulate document), seems that this menu item is gone :/

find /Applications/Xcode.app/ -name "*Simulator"

export your xib to a nib file and run:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Interface\ Builder/Plug-ins/CocoaPlugin.ibplugin/Contents/Resources/IBCocoaSimulator.app/Contents/MacOS/IBCocoaSimulator "path to nib-file"

Upvotes: 1

Related Questions