> On Aug 23, 2016, at 4:31 PM, dangerwillrobinsondan...@gmail.com wrote:
> 
> 
> 
>> On Aug 24, 2016, at 2:56 AM, Andreas Falkenhahn <andr...@falkenhahn.com> 
>> wrote:
>> 
>> Is that your personal opinion or is this documented anywhere?
> There's not anything to the contrary I've seen. 

Andreas is right. For you to call NSApplicationMain means you have to have a 
main nib  (or storyboard). But to be clear… NSApplicationMain just initializes 
NSApp (the instance, which is based on NSPrincipalClass), and then calls [NSApp 
run].  The main run loop is in [NSApp run]. You probably can call [NSApp run] 
without actually creating a NIB.

corbin

> Look no further than LSUIElement. 
> There is an info plist key that says you have no UI, and guess what it works 
> even if you included one. 
> There are methods for launching/activating without UI. 
> App templates have evolved over the years. 
> There wasn't always a wired up app delegate in the nib by default. It just 
> happens to be a good starting pattern most of the time. 
> You don't need an app delegate. 
> You don't need a window. 
> You are not required to have any of the default menus. 
> You don't have to provide any icon (the system will provide a default based 
> on the .app bundle UTI). 
> You only really have to have an Info plist but that can be embedded in the 
> binary, so even the app bundle is not required. 
> All this adds up to its not required. It's strongly encouraged and supported 
> because it's a great set of design patterns that facilitate good development 
> and consistent experience within the ecosystem. 
> 
> There are always folks from other language and platform backgrounds who show 
> up wanting to avoid nibs. And they can. But some things are going to be 
> incredibly hard without it. 
> 
> You do need to hang on to that main runloop created by NSApplicationMain() if 
> you want any AppKit views to work right. 
> _______________________________________________
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to