The following list of questions and answers may help you to clear iOS/iPhone interviews.

iOS interview Questions for Freshers

*Q: How would you create your own custom view?

A:By Subclassing the UIView class.

*Q: What is App Bundle?

A:When you build your iOS app, Xcode packages it as a bundle. A bundle is a directory in the file system that groups related resources together in one place. An iOS app bundle contains the app executable file and supporting resource files such as app icons, image files, and localized content.

*Q: Whats fast enumeration?

A:Fast enumeration is a language feature that allows you to enumerate over the contents of a collection. (Your code will also run faster because the internal implementation reduces message send overhead and increases pipelining potential.)

*Q: Whats a struct?

A:A struct is a special C data type that encapsulates other pieces of data into a single cohesive unit. Like an object, but built into C.

*Q: Whats the difference between  NSArray and  NSMutableArray?

A:NSArrayʼs contents can not be modified once itʼs been created whereas a NSMutableArray can be modified as needed, i.e items can be added/removed from it.

*Q: Explain retain counts.

A:Retain counts are the way in which memory is managed in Objective-C. When you create an object, it has a retain count of 1. When you send an object a retain message, its retain count is incremented by 1. When you send an object a release message, its retain count is decremented by 1. When you send an object a autorelease message, its retain count is decremented by 1 at some stage in the future. If an objectʼs retain count is reduced to 0, it is deallocated.

This will explain how the memory management is done in iOS
This will explain how the memory management is done in iOS

*Q: Whats the difference between frame and bounds?

A:The frame of a view is the rectangle, expressed as a location (x,y) and size (width,height) relative to the superview it is contained within. The bounds of a view is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0).

*Q: Is a delegate retained?

A:No, the delegate is never retained! Ever!

*Q:Outline the class hierarchy for a UIButton until NSObject.

A:UIButton inherits from UIControl, UIControl inherits from UIView, UIView inherits from UIResponder, UIResponder inherits from the root class NSObject.

*Q:

What are the App states. Explain them?

A:

  • Not running State:  The app has not been launched or was running but was terminated by the system.
  • Inactive state: The app is running in the foreground but is currently not receiving events. (It may be executing other code though.) An app usually stays in this state only briefly as it transitions to a different state. The only time it stays inactive for any period of time is when the user locks the screen or the system prompts the user to respond to some event, such as an incoming phone call or SMS message.
  • Active state: The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.
  • Background state:  The app is in the background and executing code. Most apps enter this state briefly on their way to being suspended. However, an app that requests extra execution time may remain in this state for a period of time. In addition, an app being launched directly into the background enters this state instead of the inactive state. For information about how to execute code while in the background, see “Background Execution and Multitasking.”
  • Suspended state:The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code. When a low-memory condition occurs, the system may purge suspended apps without notice to make more space for the foreground app.

*Q: Explain how the push notification works.

A:

Push-Overview

 

 

 

 

 

 

 

 

 

 

 

 

 

*Q: Explain the steps involved in submitting the App to App-Store.

A:

image: ../Art/administration_tasks.png

Apple provides the tools you need to develop, test, and submit your iOS app to the App Store. To run an app on a device, the device needs to be provisioned for development, and later provisioned for testing. You also need to provide information about your app that the App Store displays to customers and upload screenshots. Then you submit the app to Apple for approval. After the app is approved, you set a date the app should appear in the App Store as well as its price. Finally, you use Apple’s tools to monitor the sales of the app, customer reviews, and crash reports. Then you repeat the entire process again to submit updates to your app.

Ref: [block]2[/block]
 

*Q: Why do we need to use @Synthesize?

A:

We can use generated code like nonatomic, atmoic, retain without writing any lines of code. We also have getter and setter methods. To use this, you have 2 other ways: @synthesize or @dynamic: @synthesize, compiler will generate the getter and setter automatically for you, @dynamic: you have to write them yourself.@property is really good for memory management, for example: retain.How can you do retain without @property? 

if (_variable != object)

{

    [_variable release];

    _variable = nil;

    _variable = [object retain];

    }

How can you use it with @property?self.variable = object; When we are calling the above line, we actually call the setter like [self setVariable:object] and then the generated setter will do its job.

*Q: Multitasking support is available from which version?

A:

iOS 4.0.

*Q: How many bytes we can send to apple push notification server?

A:

256bytes.

*Q: Can you just explain about memory management in iOS?

A:

Refer: iOS Memory Management

*Q: What is code signing?

A:

Signing an application allows the system to identify who signed the application and to verify that the application has not been modified since it was signed. Signing is a requirement for submitting to the App Store (both for iOS and Mac apps). OS X and iOS verify the signature of applications downloaded from the App Store to ensure that they they do not run applications with invalid signatures. This lets users trust that the application was signed by an Apple source and hasn’t been modified since it was signed.

Xcode uses your digital identity to sign your application during the build process. This digital identity consists of a public-private key pair and a certificate. The private key is used by cryptographic functions to generate the signature. The certificate is issued by Apple; it contains the public key and identifies you as the owner of the key pair.

In order to sign applications, you must have both parts of your digital identity installed. Use Xcode or Keychain Access to manage your digital identities. Depending on your role in your development team, you may have multiple digital identities for use in different contexts. For example, the identity you use for signing during development is different from the identity you user for distribution on the App Store. Different digital identities are also used for development on OS X and on iOS.

An application’s executable code is protected by its signature because the signature becomes invalid if any of the executable code in the application bundle changes. Resources such as images and nib files are not signed; a change to these files does not invalidate the signature.

An application’s signature can be removed, and the application can be re-signed using another digital identity. For example, Apple re-signs all applications sold on the App Store. Also, a fully-tested development build of your application can be re-signed for submission to the App Store. Thus the signature is best understood not as indelible proof of the application’s origins but as a verifiable mark placed by the signer Continue…

Test your iOS skills

This Test will help you to understand yourself in-terms of your strengths and weakness etc.

More…

Page : 2

Want more tech news or development tips and links? You’ll get plenty of both if you keep up with me, by following me on Twitter, subscribing to my Facebook posts, or circling me on Google+.

  • selvkumar

    Most appreciated one. This would be more helpful for iOS folks. Please continue to add more.

  • charan

    awesome

  • Everalda

    nice website you have here…thanks for sharing the information

  • Araci

    beautiful blog with nice informational content. this is a really interesting and informative post. good job! keep it up, hope to read your other updates. thanks for this nice sharing.

  • vikas

    nice one Blog…

  • Susan

    cool!

    • Nitin

      When you creating ocbejts by alloc , don’t forget to release it. But never don’t call dealloc derectly. For more information about memory management: Memory Management Basics Tutorial Video.

      • vinay

        in xcode 4.6.2 there is no need of auto release i think….

  • Nikunj

    it’s very good for understand concept

  • ravikumar

    Usefull stuff. Thanks for sharing.

  • sei un strunzo

  • here

    This really answered my problem, thank you!

  • Sharvan Kumawat

    This is very helppfull greate.

  • Jayashankar

    Thanks, Very helpful…

  • asif

    Really nice collection.

  • Sravan Jinna

    Thanks for the Q and A, It’s simply awesome and I loved reading it.

  • Pingback: ameryyka()

  • Pranjal Bikash

    This is very helpful..Thanks a lot..keep adding new things..this my next place to come everyday..

  • parul gupta

    a very good collection……

  • Mina

    Very helpful!!!

  • Mina

    But Some answers are remaining ..

    • Thanks for comment,Soon i will update them with additional questions in my new post since it to long for reading.

  • Johny Mnemonic

    Who know the answers for the last questions, share it please here.

  • Deepak

    keep posting !!

  • k.bharath kumar

    thank’s sir

  • Vernice Burich

    I chanced upon your post on google and check out a few of your early articles. Stick with the very good posts. Ill likely be by again to read more, thanks for the post!.

  • Ashok

    Very nice.It is very useful.

  • venkat

    Very nice post.really helpful for ios interviews.

  • edu email

    This is an excellent blog i have referred the address over to some friends i hope they find it as informating as i did.

  • Gopal

    hi…..,,,,,,
    Great for beginners……..

    • nilesh patil

      Great for beginners.It is very useful.
      Thank You

  • Yuvraj Pawar

    Thanks Very Good Content !! One suggestion please reduce the font make it more readable also the height of content is more i.e. to go from one question to other one has to scroll a lot to cover the topic, instead if you keep font bit smaller and remove blank lines, it’s easy to grab more material in less time.

    • I appreciate your suggestion, thanks a lot.

  • Piyush

    Nice content coverage.
    Short and useful.

  • ManishankarManishankar

    Nowadays i am reading your articles more.Thanks for the work.

  • Madhav Deva

    Hi Sir, I have been to your site way2ios.com, it’s impressive. I’m an iOS Developer with 9 months experience, the content on your site will definitely help me. I have gone through 80% of your posts, for me it was like revising everything about iOS development. Apart from iOS development, even latest apple updates impressed me. Eagerly looking forward for your iOS technical posts. Glad thing is, this is an Indian site. For iOS, I haven’t found any such technical stuff so far from an Indian site in fact I’m not even aware if there are any sites for iOS from India. Proud of you sir, please continue way2ios I am sure it will be a good resource for me to improve my iOS skills. And finally thanks for this stuff. After going through way2ios I searched for all your public profiles and finally found you on google+(I’ll be active mostly on my gmail account so 🙂 ..) Regards,

  • Pingback: Google()

  • Pingback: iOS Interview Q&A | iOS Interview Questions and Answers()