ios interview questions with answers - way 2 ios

8
Your Great Journey Starts here. (m (http:/ g/2a/5 (https://pl (http://www.tw (http://www.facebo WaY 2 iOS (http://way2ios.com/)  (http://way2ios.com/feed/ (mailto:[email protected])  (http://in.linkedin.com/pub/krish-g/2a/561  (https://plus.google.com/109473649914154868748/p  (http://www.twitter.com/krish_gu  (http://www.facebook.com/way iOS interview Questions with Answers The following list of questions and answers may help you to clear iOS/iPhone interviews. iOS interview Questions for Freshers *Q : *Q :  How would you create your own custom view? A: A: By Subclassing the UIView class. *Q : *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 a pp executable file and supporting resource files such as app icons, image files, and localized content. *Q : *Q:  Whats fast enumeration? A: A: Fast enumeration is a language feature that all ows you to enumerate over the contents of a collection. (Your code will a lso run faster because the internal implementation reduces message send overhead and increases pipelining potential.) *Q : *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 : *Q :  Whats the di! erence between NSArray and NSMutableArray? A: NSArray’s contents can not be modified o nce it’s been created whereas a NSMutableArray can be modified as needed, i.e items can be added/removed from it. *Q : *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. Top Posts  (http://way2ios.com) Tips & Tricks (http://way2ios.com/category/tips-tricks-2/) Sample code (htt p://wa y2ios. com/cat egory /sample code/) Conta ct (http ://wa y2ios. com/te ch-su pport /) Devel opmen t (htt p://way2ios. com/cat egory /deve lopmen t/) OS (http ://wa y2ios. com/cat egory /os/) Programming (h ttp:/ /way2i os.com/cate gory/r efern ece/p rogramming/) Refere nce (h ttp: //way2 ios.com/cate gory/r efern ece/) Tech News (http://way2ios.com/category/tech-ne ws/) ww.wpfruits.com/downloads/wp- l i p- _ =way 2i o s.c om) Find us on Facebook Way 2 IOS Like 172 people like Way 2 IOS. Facebook social plugin nokia N95 FROM  3,000 LG Cookie FROM  2,000 Earphones FROM  150

Upload: sworna-vidhya-mahadevan

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 1/8

Your Great Journey Starts here.(m(http:/

g/2a/5

(https://pl(http://www.tw(http://www.facebo

WaY 2 iOS (http://way2ios.com/)  (http://way2ios.com/feed/(mailto:[email protected])

 (http://in.linkedin.com/pub/krish-g/2a/561

 (https://plus.google.com/109473649914154868748/p

 (http://www.twitter.com/krish_gu

 (http://www.facebook.com/way

iOS interview Questions with Answers

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

iOS interview Questions for Freshers

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

A:A: By Subclassing the UIView class.

*Q:*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:*Q:  Whats fast enumeration?

A:A: Fast enumeration is a language feature that allows you to enumerate over the contents of a collection.

(Your code will a lso run faster because the internal implementation reduces message send overhead and

increases pipelining potential.)

*Q:*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:*Q:  Whats the di! erence 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:*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.

Top Posts

 (http://way2ios.com)

Tips & Tricks (http://way2ios.com/category/tips-tricks-2/)

Sample code (http://way2ios.com/category/samplecode/) Contact (http://way2ios.com/tech-support/)

Development (http://way2ios.com/category/development/) OS (http://way2ios.com/category/os/)

Programming (http://way2ios.com/category/refernece/programming/) Reference (http://way2ios.com/category/refernece/)

Tech News (http://way2ios.com/category/tech-news/)

ww.wpfruits.com/downloads/wp-

p-

=wa y2 ios.com)

Find us on Facebook

Way 2 IOS

Like

172 people like Way 2 IOS.

Facebook social plugin

nokia N95

FROM  3,000

LG Cookie

FROM  2,000

Earphones

FROM  150

Page 2: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 2/8

(http://way2ios.com/wp-content/uploads/2013/03/memory_management.jpg)

This will explain how the memory management is done in iOS

*Q:*Q:  Whats the di! erence 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:*Q:  Is a delegate retained?

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

*Q:*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:*Q:

What are the App states. Explain them?A: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:*Q:  Explain how the push notification works.

A:

iOS interview Questions withAnswers(http://way2ios.com/developmedevelopment-2/ios-interview-questions-with-answers/)

iOS Interview Questions &answers for experienceddevelopers(http://way2ios.com/developmedevelopment-2/ios-interview-questions-for-experience/)

iPhone interview questions withanswers part- II(http://way2ios.com/developmedevelopment-2/iphone-interview-question-answers/)

What is iBeacons in iOS 7(http://way2ios.com/developmedevelopment-2/ibeacons/)

Tags

Android (http://way2ios.com/tag/android/)

Apple(http://way2ios.com/Applebyte (http://way2ios.com/tag/applebyte/)

AppStore

(http://way2ios.com/tag/appstoreBeta (http://way2ios.com/tag/beta/) developer

(http://way2ios.com/tag/developer-2/

Enterprise (http://way2ios.com/tag/enterprise/) Free Wif 

(http://way2ios.com/tag/free-wifi/) Google

(http://way2ios.com/tag/google/) Host File(http://way2ios.com/tag/host-file/) iBeacons

(http://way2ios.com/tag/ibeacons/) ios(http://way2ios.com/tiOS 6 (http://way2ios.com/tag/ios-6/)

ios 7(http://way2ios.com/tag/ios-7/) ios7(http://way2ios.com/tag/ios7Ios Interview (http://way2ios.com/tag/ios

interview/) iPa (http://way2ios.com/tag/ipa/) iPad

(http://way2ios.com/tag/ipad/) iPhone(http://way2ios.com/tag2/) iPhone 6 (http://way2ios.com/tag/iphone-6/)

iPhone interview

(http://way2ios.com/tag/iphone-

interview/) iphone unlock

(http://way2ios.com/tag/iphone-unlock/)

Page 3: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 3/8

(http://way2ios.com/wp-content/uploads/2013/03/Push-Overview.jpg)

 

*Q:*Q:  Explain the steps involved in submitting the App to

App-Store.

A:

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 shouldappear 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.

R ef:  App Store Review Guidelines (http://way2ios.com/development/ios-development-2/app-store-review-guidelines/)

 

iTunes store (http://way2ios.com/tag/itunes-store/)

Mac(http://way2ios.com/tag/mac-2/) Memory management

(http://way2ios.com/tag/memory-management/)

Microsoft(http://way2ios.com/tag/microsObj-c (http://way2ios.com/tag/obj-c/) Obj-c

Interview (http://way2ios.com/tag/obj-c-

interview/) Objective-C(http://way2ios.com/tag/obj

c-2/) Rumors(http://way2ios.com/tag/rumors/)

samsung (http://way2ios.com/tag/samsung/)

security

(http://way2ios.com/tag/security-

2/) Support(http://way2ios.com/tag/Surface (http://way2ios.com/tag/surface/) SVN

(http://way2ios.com/tag/svn/) URL Scheme

(http://way2ios.com/tag/url-scheme/) WWDC

(http://way2ios.com/tag/wwdc/) Xcode(http://way2ios.com/tag/xcodeYou tube (http://way2ios.com/tag/you-tube/)

Page 4: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 4/8

(https://developer.apple.com/appstore/resources/approval/guidelines.html)

*Q:*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:*Q:  Multitasking support is available from which version?

A:

iOS 4.0.

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

A:

256bytes.

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

iOS?

A:

Refer: iOS Memory Management (http://way2ios.com/development/ios-development-2/iphone-2/ios-

memory-management-faq/)

*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… (http://way2ios.com/development/ios-development-2/ios-interview-questions-for-experience/)

 

Page 5: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 5/8

Share this: Tweet 1 Like 5   5

« Next iPhone might have fingerprints for added security

(http://way2ios.com/development/ios-development-

2/next-iphone-fingerprints-for-added-security/)

General: Know the Importance of your Feedback or rating

(http://way2ios.com/development/ios-development-

2/importance-of-customer-feedback_01082013/) »

More… (http://way2ios.com/development/ios-development-2/ios-interview-questions-for-experience/)

Page : 2

(http://way2ios.com/development/ios-

development-2/ios-interview-questions-

for-experience/)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 (http://twitter.com/way2ios), subscribing to my Facebook 

(https://www.facebook.com/way2ios) posts, or circling me on Google+

(https://plus.google.com/106891254508857346510/about#106891254508857346510/posts) .

35 comments

Leave a message...

Best Community    ⚙⤤Share

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,

 

ManishankarManishankar  •  

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

 

Piyush  •  

Nice content coverage.

Short and useful.

 

 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.

 

Krish  •  

I appreciate your suggestion, thanks a lot.

 

Gopal  •  

hi.....,,,,,,

Great for beginners........

 

nilesh patil  •  

Great for beginners.It is very useful.

Thank You

 

0★

Share (//pinterest.com/pin/create/b

url=http%3A%2F%2Fway2i

development-

2%2Fios-

-

1

Page 6: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 6/8

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.

 

venkat  •  

Very nice post.really helpful for ios interviews.

 

 Ashok  •  

Very nice.It is very useful.

 

 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!.

 

k.bharath kumar  •  

thank's sir

 

Deepak  •  

keep posting !!

 

Johny Mnemonic  •  

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

 

Mina  •  

But Some answers are remaining ..

 

Rama Krishna Guttha  •  

Thanks for comment,Soon i will update them with additional questions in my new post since it

to long for reading.

 

Mina  •  

Very helpful!!!

 

parul gupta  •  

a very good collection......

 

Pranjal Bikash  •  

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

 

Sravan Jinna  •  

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

 

asif  •  

Really nice collection.

 

Jayashankar  •  

Thanks, Very helpful...

 

Sharvan Kumawat  •  

This is very helppfull greate.

 

here  •  

This really answered my problem, thank you!

 

subhramani  •  

Page 7: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 7/8

What's this?

 —

 —

 —

 —

 

ravikumar  •  

Usefull stuff. Thanks for sharing.

 

Nikunj  •  

it's very good for understand concept

 

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....

 

vikas  •  

nice one Blog...

 

 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.

 

Everalda  •  

nice website you have here...thanks for sharing the information

 

charan  •  

awesome

 

selvkumar  •  

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

 

KRISH(http://gravatar.com/cehchowdary)

(http://images.apple.com/main/rss/hotnews/hotnews.rss)

Latest Apple News

(http://www.apple.com/hotnews/)

MacBook Air the Ultimate Laptop

(http://www.theverge.com/2013/6/17/4436332/macbook-

air-review-13-inch-2013) August 9, 2013

Apple Reports Third Quarter Results

visitors Disclaimer

This website is not owned by, is not

licensed by nor is a subsidiary of Apple I

iPhone is a trademark of Apple Inc. The

content of this website is not supplied o

reviewed by Apple Inc. All articles, imag

logos and trademarks in this site are

property of their respective owners. Plea

follow this link to read the complete

disclaimer

(http://way2ios.com/disclaimer/).

(http://www2.clustrmaps.com/counter/maps.php?

url=http://way2ios.com)

Page 8: iOS Interview Questions With Answers - WaY 2 iOS

8/13/2019 iOS Interview Questions With Answers - WaY 2 iOS

http://slidepdf.com/reader/full/ios-interview-questions-with-answers-way-2-ios 8/8

“Knowing is not enough; we must apply.

Willing is not enough; we must do.”

View Full Profile "

(http://gravatar.com/cehchowdary)

(http://www.apple.com/pr/library/2013/07/23Apple-

Reports-Third-Quarter-Results.html?

sr=hotnews.rss) July 23, 2013

Apple Unveils Logic Pro X

(http://www.apple.com/logic-pro/?

sr=hotnews.rss) July 16, 2013

App Store Marks 5 Years of App-ortunity

(http://www.usatoday.com/story/tech/columnist/talkingtech/2013/07/09/5-

years-of-apple-apps/2499299/) July 11,

2013

Ducati Hits the Road Full Throttle with

iPad

(http://www.apple.com/ipad/business/profiles/ducati/#video-

ducati?sr=hotnews.rss) July 1, 2013

CyberChimps(http://cyberchimps.com/) © WaY