|
|
#1 | |
|
Outline of what Apple does when your app is launched?
I'm wondering if there's a resource where you can see exactly what happens when your app launches. I have a rough idea about several of the big steps (applicationDidFinnishLaunching, awakeFromNib etc.), but I would love to find an article/reference that goes literally step-by-step through the process of all the initial setup in a standard cocoa app.
The reason I started thinking about this is I've been reading "Cocoa Design Patterns" which is quite excellent. In the notifications chapter I came across the line: Quote:
__________________
How to ask good programming questions: Getting Answers
|
||
|
|
0
|
|
|
#2 |
|
The simplest method to finding out what is being run below your application code is to just get the debugger out and step into some Cocoa functions. Eventually you'll get down to the C level stuff and then into Assembly.
Frankly I was amazed when I compared some C programs with a test Objective-C program and the amount of crap that gets run behind the scenes.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development Last.fm Profile | Extreme Metal Reviews MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3 |
|
|
|
0
|
|
|
#3 |
|
Somewhat easier than just stepping through things in gdb would be to use dtrace and/or Instruments to watch calls and allocations.
|
|
|
|
0
|
|
|
#4 |
|
The first, and likely only, thing you do in your main function in a Cocoa app is call NSApplicationMain:
http://developer.apple.com/mac/libra...pplicationMain From there, the most "interesting" piece is loading of the main nib. This page has some information about what happens when you do this: http://developer.apple.com/mac/libra...00051i-CH4-SW8 Stepping through things, watching calls, etc. will certainly be of value/interest but i thought it might be of value to read the documents that detail the process so you have some of the high-level knowledge about the design as well as the low-level knowledge of the actual calls that go on. -Lee |
|
|
|
0
|
|
|
#5 |
|
Thanks for your replies. I was hoping there'd be more info/easier to access than using dtrace or the debugger. I also found this article which didn't have all the detail I was hoping for but was helpful as a general overview. Hopefully someone finding this thread in a search will find it useful.
__________________
How to ask good programming questions: Getting Answers
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| New iPhone App - CollisionCare - What to do when you are in an accident | dpk2019 | iPhone and iPod touch Apps | 1 | Nov 24, 2011 02:09 PM |
| Ipad will only sync and fetch when app is launch | jamesberryjames | iPad | 3 | Sep 17, 2011 01:27 PM |
| OK, your app is on the Mac App Store. Now what ? | monsieurpaul | Mac Programming | 4 | Mar 22, 2011 07:59 PM |
| Code when the app is launched | Blakeasd | Mac Programming | 4 | Jul 19, 2010 07:33 AM |
| When your blood is boiling because of your family. | mymemory | Community | 4 | May 16, 2005 08:23 AM |
All times are GMT -5. The time now is 04:48 PM.







Linear Mode

