Top iPhone Interview Questions
Q – 1 Which object manage the presentation of apps content on the screen?
Ans- View controller objects takes care of the presentation of app’s content on the screen. A view controller is used to manage a single view along with the collection of subviews. It makes its views visible by installing them in the app’s window.
Q – 2 Which object is create by UIApplicationMain function at app launch time?
Ans- The app delegate object is created by UIApplicationMain function at app launch time. The app delegate object’s main job is to handle state transitions within the app.
Q – 3 How to change the content of your app in order to change the views displayed in the corresponding window?
Ans- To change the content of your app, you use a view controller to change the views displayed in the corresponding window. Remember, window itself is never replaced.
Q – 4 Are document objects required for an application? What does they offer?
Ans- Document objects are not required but are very useful in grouping data that belongs in a single file or file package.
Q – 5 Which app specific objects store the apps content?
Ans- Data model objects are app specific objects and store app’s content. Apps can also use document objects to manage some or all of their data model objects.
Q – 6 What happens if IApplication object does not handle an event?
Ans- In such case the event will be dispatched to your app delegate for processing.
Q – 7 How is the app delegate is declared by Xcode project templates?
Ans- App delegate is declared as a subclass of UIResponder by Xcode project templates.
Q – 8 What is the use of controller object UIApplication?
Ans- Controller object UIApplication is used without subclassing to manage the application event loop. It coordinates other high-level app behaviors.
It works along with the app delegate object which contains app-level logic.
Q – 9 Assume that system is running low on memory. What can system do for suspended apps?
Ans- In case system is running low on memory, the system may purge suspended apps without notice.
Q – 10 An app is loaded into memory but is not executing any code. In which state will it be in?
Ans- An app is said to be in suspended state when it is still in memory but is not executing any code.
Q – 11 Assume that an app is not in foreground but is still executing code. In which state will it be in?
Ans- Background state.
Q – 12 Name the app sate which it reaches briefly on its way to being suspended?
Ans- An app enters background state briefly on its way to being suspended.
Q – 13 When an app is said to be in active state?
Ans- An app is said to be in active state when it is running in foreground and is receiving events.
Q – 14 Give example scenarios when an application goes into InActive state?
Ans- An app can get into InActive state when the user locks the screen or the system prompts the user to respond to some event e.g. SMS message, incoming call etc.
Q – 15 Who calls the main function of you app during the app launch cycle?
Ans- During app launching, the system creates a main thread for the app and calls the app’s main function on that main thread. The Xcode project’s default main function hands over control to the UIKit framework, which takes care of initializing the app before it is run.
Q – 16 List down apps state transitions when it gets launched?
Ans- Before the launch of an app, it is said to be in not running state.
When an app is launched, it moves to the active or background state, after transitioning briefly through the inactive state.
Q – 17 Assume that your app is running in the foreground but is currently not receiving events. In which sate it would be in?
Ans- An app will be in InActive state if it is running in the foreground but is currently not receiving events. An app stays in InActive state only briefly as it transitions to a different state.
Q – 18 How can you respond to state transitions on your app?
Ans- On state transitions can be responded to state changes in an appropriate way by calling corresponding methods on app’s delegate object.
For example:
application Did Become Active method can be used to prepare to run as the foreground app.
application Did Enter Background method can be used to execute some code when app is running in the background and may be suspended at any time.
application Will Enter Foreground method can be used to execute some code when your app is moving out of the background application Will Terminate method is called when your app is being terminated.
Q – 19 When an app is said to be in not running state?
Ans- An app is said to be in ‘not running’ state when:
it is not launched.
it gets terminated by the system during running.
Q – 20 Do you know What is iPhone reference library?
Ans- iPhone reference library is a set of reference documents for iPhone OS.
It can be downloaded by subscribing to the iPhone OS Library doc set.
Select Help>Documentation from X code, and click the subscribe button next to the iPhone OS Library doc set, which appears in the left column.
Q – 21 Name the framework that is used to construct application’s user interface for iOS?
Ans- The UIKit framework is used to develop application’s user interface for iOS. UIKit framework provides event handling, drawing model, windows, views, and controls specifically designed for a touch screen interface.
Q – 22 What are the tools required to develop iOS applications?
Ans- iOS development requires Intel-based Macintosh computer and iOS SDK.
Q – 23 Name the application thread from where UIKit classes should be used?
Ans- UIKit classes should be used only from an application’s main thread. Note: The derived classes of UIResponder and the classes which manipulate application’s user interface should be used from application’s main thread.
Q – 24 Describe the functionality of accelerometer of an iPhone ?
Ans- iPhone responds to motion using a built-in accelerometer.
The accelerometer detects the movement and changes the display accordingly, at the time of rotating iPhone from portrait to landscape.
Q – 25 Explain What is iPhone architecture?
Ans- It is similar to Mac OS X architecture
It acts as an intermediary between the iPhone and iPod hardware an the appearing applications on the screen
The user created applications never interact directly with the appropriate drivers, which protects the user applications from changes to the hardware.
Q – 26 Explain What is iPhone reference library?
Ans- iPhone reference library is a set of reference documents for iPhone OS. It can be downloaded by subscribing to the iPhone OS Library doc set. Select Help>Documentation from X code, and click the subscribe button next to the iPhone OS Library doc set, which appears in the left column.
Q – 27 Do you know What is iPhone sdk?
Ans- iPhone SDK is available with tools and interfaces needed for developing, installing and running custom native applications. Native applications are built using the iPhone OS’s system frameworks and Objective-C language and run directly on iPhone OS. Native applications are installed physically on a device and can run in presence or absence of network connection.
Q – 28 What are the popular apps of iPhone?
Ans- Face book-Social networking
Doodle Buddy-drawing
Pandora Radio-radio on our iPhone
Yelp-restaurant reviews
Q – 29 What are the requirements for developing iPhone Apps?
Ans- Mac OS 10.5/10.6 iPhone SDK (Software Development Kit 3.0/4.0).
IPhone SDK consists of:
IDE to develop iPhone Apps is XCode(This tool is inbuilt in iPhone SDK)
Interface Builder This is used to design GUI of Apps(Inbuilt feature of iPhone SDK)
Instruments This is used to check any memory leaks in our apps (Inbuilt in SDK)
Simulator This is used to test our apps before deploying into real device.
Q – 30 Difference between shallow copy and deep copy?
Ans- Shallow copy is also known as address copy. In this process you only copy address not actual data while in deep copy you copy data.
Suppose there are two objects A and B. A is pointing to a different array while B is pointing to different array. Now what I will do is following to do shallow copy.
Char *A = {‘a’,’b’,’c’};
Char *B = {‘x’,’y’,’z’};
B = A;
Now B is pointing is at same location where A pointer is pointing.Both A and B in this case sharing same data. if change is made both will get altered value of data.Advantage is that coping process is very fast and is independent of size of array.
while in deep copy data is also copied. This process is slow but Both A and B have their own copies and changes made to any copy, other will copy will not be affected.
Q – 31 Tell me What is iPhone OS?
Ans- iPhone OS runs on iPhone and iPod touch devices.
Hardware devices are managed by iPhone OS and provides the technologies needed for implementing native applications on the phone.
The OS ships with several system applications such as Mail, Safari, Phone, which provide standard services to the user.
Q – 32 Which JSON framework is supported by iOS?
Ans- SBJson framework is supported by iOS. It is a JSON parser and generator for Objective-C. SBJson provides flexible APIs and additional control that makes JSON handling easier.
Q – 33 Does iOS support multitasking?
Ans- iOS 4 and above supports multi-tasking and allows apps to remain in the background until they are launched again or until they are terminated.
Q – 34 Where can you test Apple iPhone apps if you don’t have the device?
Ans- iOS Simulator can be used to test mobile applications. Xcode tool that comes along with iOS SDK includes Xcode IDE as well as the iOS Simulator. Xcode also includes all required tools and frameworks for building iOS apps. However, it is strongly recommended to test the app on the real device before publishing it.
Q – 35 Why iPhone apps are popular?
Ans- Give our business a whole new way of transacting business for millions of users.
IPhones are the market leaders in the smart phone segment. The iPhone has become a great device to surf the internet, play games, interact with social networks and transact business.
Q – 36 How many bytes we can send to apple push notification server.?
Ans- 256bytes.
Q – 37 Multitasking support is available from which version?
Ans- iOS 4.0
Q – 38 Introduction to Iphone application Development?
Ans- In 2007, Apple entered the cellular phone business with the introduction of the iPhone, a multi-touch display cell phone, which also includes the features of iPod.
Q – 39 What is an iPhone app?
Ans- An iPhone app is a program that runs on our iPhone/iPod Touch. It enables us to ccomplish a certain task. They could be utility apps, games, enterprise apps, entertainment apps, apps to access our bank account etc.
Q – 40 Whats fast enumeration?
Ans- 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 – 41 Whats a struct?
Ans- 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 – 42 Whats the difference between frame and bounds?
Ans- 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 – 43 Explain about the applications that can be used with iphone?
Ans- Technology, Entertainment and Design(TED): Allows to watch and listen to world’s most fascinating people have to say, all on the iPhone.
Market Watch:
Breaking news about the investments can be seen. To do so, open the Stocks app and rotate.
Trends:
Latest runway shows, videos from Vogue’s fashion library, reviews, exclusive party pictures, fashion news updates can be seen on Style.com.
Q – 44 Describe the functionality of accelerometer of an iphone?
Ans- iPhone responds to motion using a built-in accelerometer.
The accelerometer detects the movement and changes the display accordingly, at the time of rotating iPhone from portrait to landscape.
Q – 45 What are the location services?
Ans- Applications such as Maps, camera and compass are allowed to use the information from cellular, Wi-Fi and Global Positioning System networks for determining the approximate locations.
The location is displayed on the screen, using a blue marker.
Q – 46 What is iphone architecture?
Ans- It is similar to MacOS X architecture
It acts as an intermediary between the iPhone and iPod hardware an the appearing applications on the screen
The user created applications never interact directly with the appropriate drivers, which protects the user applications from changes to the hardware.
Q – 47 What is iphone reference library?
Ans- iPhone reference library is a set of reference documents for iPhone OS .
It can be downloaded by subscribing to the iPhone OS Library doc set.
Select Help>Documentation from Xcode, and click the subscribe button next to the iPhone OS Library doc set, which appears in the left column.
Q – 48 What are the features of iphone 3gs?
Ans- Video:
Videos can be edited, shared. High quality VGA video can be shot in portrait or landscape.
3 Megapixel Camera:
Still photos with greater quality can be taken
Voice control:
It recognizes the names in contacts and recognizes the music on iPod.
Compass:
iPhone 3GS has built-in digital compass, used to point the way.
Internet Tethering:
Internet surfing can be done from anywhere. A 3G connection can be shared on Iphon3 with Mac notebook or laptop..
Q – 49 What are sensors in iphone?
Ans- The proximity sensor immediately turns off the display when the iPhone is lifted to ear. With this sensor the power is saved and accidental dialing is prevented.
The display is automatically brightens the iPhone by the ambient light sensor when the sunlight or bright rooms and dims in darker places.
Q – 50 What is iphone sdk?
Ans- iPhone SDK is available with tools and interfaces needed for developing, installing and running custom native applications.
Native applications are built using the iPhone OS’s system frameworks and Objective-C language and run directly on iPhone OS.
Native applications are installed physically on a device and can run in presence or absence of network connection.
Q – 51 What is iphone OS?
Ans- iPhone OS runs on iPhone and iPod touch devices.
Hardware devices are managed by iPhone OS and provides the technologies needed for implementing native applications on the phone.
The OS ships with several system applications such as Mail, Safari, Phone, which provide standard services to the user.
Q – 52 What is iPhone?
Ans- IPhone is a combination of internet and multimedia enabled smart phone developed by Apple Inc.
iPhone functions as a camera phone, including text messaging, and visual voice mail
iPhone is a portable media player that resembles a video iPod
It has user interface that is built around the multi-touch screen including virtual keyboard.
App Store , which launched in the mid 2008 has over 1,00,000 applications with functionalities including games, references, GPS navigation, advertising, television shows, films, reference, celebrities.