A protocol that defines the methods for an application delegate. More...
#import <Application/Application.h>
Instance Methods | |
(void) | - applicationDidFinishLaunching: |
Called when the application has finished launching. More... | |
(void) | - applicationWillTerminate: |
Called immediately before the application terminates. More... | |
(void) | - applicationReceivedSignal: |
Called when the application receives a system signal. More... | |
A protocol that defines the methods for an application delegate.
The ApplicationDelegate protocol provides a way for objects to receive notifications about application lifecycle events. Classes that conform to this protocol can be set as the application's delegate to handle these events.
Definition at line 27 of file ApplicationDelegate+Protocol.h.
|
required |
Called when the application has finished launching.
application | The application instance that finished launching. |
This method is called once during the application's lifecycle, after the application has completed its initialization and is ready to begin processing events. This is the appropriate place to perform any final setup or initialization that your application requires.
|
optional |
Called when the application receives a system signal.
signal | The type of signal that was received. |
This method is invoked when the application receives system signals such as termination requests (SIGTERM), interrupt signals (SIGINT/Ctrl+C), or quit signals (SIGQUIT). Implement this method to handle signals gracefully by performing cleanup operations, saving state, or initiating shutdown procedures.
If this method is not implemented, the application will terminate with a -1 exit status when it receives a NXApplicationSignalTerm or NXApplicationSignalQuit signal. Other signals may be ignored.
In the future, this method may be called for power management events, such as low or empty battery conditions, or sleep conditions, allowing applications to respond appropriately to changes in power status.
|
optional |
Called immediately before the application terminates.
application | The application instance that is terminating. |
This method is called just before the application actually terminates. Use this method to perform any final cleanup tasks.