Search Your Question

What is entry point of iOS Application?

Ans : 

In mostly language, There is having main method in main file which is starting point of project. In iOS, also same approach are there.

Objective-C :

main.m File :

int main(int argc, char * argv[]) {
        NSString * appDelegateClassName;
        @autoreleasepool {
            // Setup code that might create autoreleased objects goes here.
            appDelegateClassName = NSStringFromClass([AppDelegate class]);
        return UIApplicationMain(argc, argv, nil, appDelegateClassName);


Swift : 


import UIKit
import CoreData

class AppDelegate: UIResponder, UIApplicationDelegate {

In Swift, @UIApplicationMain attribute is a replacement of main.m file & and entry point for your application to start.

No comments:

Post a Comment