-1

I have an android background . I want to learn XCode . Now i want to understand what does the Appdelegate.h and Appdelegate.m do? As in Android Manifest.xml is the mainFile which launches other Activities . permissions, feature ,broadcast service etc are written in it.

Now can some one explain me the importance of AppDelegate file and explain its component and benefits ?

And where to include permission or Service or BroadCast in app.

I have created an app in Android . Now i am creating it in IPhone which requires permission and services...

Thanks in Advance..

Edit..

According to my study and knowledge. AppDelegate is a controller, it doesn't visually present data (a view) nor does it represent the actual data (a model) but it does determine what view controllers to show etc and manage other views (status bar etc) at the start of the application .it is the launcher class where the first class launches . it consist of some predefined function didFinishLauching and other functions. Is there any detail explanation.

Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300
  • what have you read about _AppDelegate_ before you raised this question? if that answer is _nothing_ or _not much_, then why not? – holex Aug 26 '14 at 07:59
  • I have edit it . see it. – Zar E Ahmer Aug 26 '14 at 08:08
  • @Nepster, please read this, carefully: https://developer.apple.com/library/ios/documentation/uikit/reference/uiapplicationdelegate_protocol/Reference/Reference.html, it seems you just missed that info here. – holex Aug 26 '14 at 08:19
  • @Nepster have a look http://stackoverflow.com/a/35313006/3767017 may it will help u – Anurag Bhakuni Feb 11 '16 at 07:05

1 Answers1

2

From: https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/AppArchitecture/AppArchitecture.html

The app delegate is a custom object created at app launch time, usually by the UIApplicationMain function. The primary job of this object is to handle state transitions within the app. For example, this object is responsible for launch-time initialization and handling transitions to and from the background. For information about how you use the app delegate to manage state transitions, see “Managing App State Changes.”

In iOS 5 and later, you can use the app delegate to handle other app-related events. The Xcode project templates declare the app delegate as a subclass of UIResponder. If the UIApplication object does not handle an event, it dispatches the event to your app delegate for processing. For more information about the types of events you can handle, see UIResponder Class Reference.

jscs
  • 63,694
  • 13
  • 151
  • 195
Zigglzworth
  • 6,645
  • 9
  • 68
  • 107