Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

abcdefg12345

macrumors 6502
Original poster
Jul 10, 2013
281
86
I noticed when creating a new cocoa project in Xcode 8.3 there is no option to pick storyboard or xib, instead the project automatically creates storyboard.

did apple deprecate xib in favour of storyboard? I can't find any information anywhere about this.
 

KALLT

macrumors 603
Sep 23, 2008
5,375
3,411
It looks as though they removed the XIB-based project templates. You can still create new subclasses with accompanying XIB files though.
 
  • Like
Reactions: Madd the Sane

hany

macrumors newbie
Apr 12, 2017
1
1
It looks as though they removed the XIB-based project templates. You can still create new subclasses with accompanying XIB files though.

You can start from a XIB-only clean project with Xcode 8.3.
- create a new macOS cocoa app project
- right click the left column (files tree) and select "New File..."
- select "Main Menu" from the list then click "Next", then click "Create" on the dropdown view
- on left column move to trash two files using right click: Main.storyboard and ViewController.swift
- select the very first item of files tree to display target's general preferences
- find the "Deployment Info" section of your preferences, then change "Main Interface" menu value selecting "MainMenu.xib"
- almost done, now just select your xib then add an empty object to your xib then set its class to AppDelegate.
 
  • Like
Reactions: superscape

25ghosts

macrumors 6502
Jan 31, 2008
279
388
Yes. The option is gone. I believe they removed it by accident. At least it makes no sense to me why they would remove that option on purpose.

Lately the well-known Apple Quality has sunk so deep that Microsoft looks down on it instead of up
 

KALLT

macrumors 603
Sep 23, 2008
5,375
3,411
At least it makes no sense to me why they would remove that option on purpose.

Because they want you to use storyboards, they have been encouraging developers for years. There are other examples where Apple discards the old in exchange for the new. Consider the Core Data template. New projects won’t start with the complete stack anymore, but with an NSPersistentContainer implementation. Likewise, there is no option to start a project without Interface Builder.
 

25ghosts

macrumors 6502
Jan 31, 2008
279
388
Because they want you to use storyboards, they have been encouraging developers for years. There are other examples where Apple discards the old in exchange for the new. Consider the Core Data template. New projects won’t start with the complete stack anymore, but with an NSPersistentContainer implementation. Likewise, there is no option to start a project without Interface Builder.

OK - if this IS intended I'll bow and stand corrected. SBs ARE nice but overkill in many situations.
Given the fact that the Cocoa App is nothing but a Template one could just delete the ViewControllers and SB and set up the app they way one wants to which is what I am doing. Having the SB Option was just a nice convenience thing saving me the developer the time of having to remove it every time I need to create a test project....
 
  • Like
Reactions: superscape

canmor

macrumors newbie
Sep 18, 2017
1
0
You can start from a XIB-only clean project with Xcode 8.3.
- create a new macOS cocoa app project
- right click the left column (files tree) and select "New File..."
- select "Main Menu" from the list then click "Next", then click "Create" on the dropdown view
- on left column move to trash two files using right click: Main.storyboard and ViewController.swift
- select the very first item of files tree to display target's general preferences
- find the "Deployment Info" section of your preferences, then change "Main Interface" menu value selecting "MainMenu.xib"
- almost done, now just select your xib then add an empty object to your xib then set its class to AppDelegate.

I google to here and found it works for me, thank you for your help!
BTW: Do not forget to connect "File's Owner" to "AppDelegate" in "MainMenu.xib" after your mentioned last step.
 

szymczyk

macrumors regular
Mar 5, 2006
187
17
Xcode 9 brings back the Use Storyboards checkbox for new Cocoa application projects. I recommend updating to Xcode 9 if you prefer using xib files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.