As an ios developer you can code in
Following are the common questions asked to an iOS Developer
1) Explain what is Xcode?
Xcode is Apple’s integrated development environment (IDE) that you use to design apps for Apple products. It provides various tools to manage your entire development workflow from creating your app, to testing, submitting and optimizing it to the App store.
2) Explain what is struct?
A struct is a special C data type that encapsulates other pieces of data into a single cohesive unit.
3) Explain how you can add frameworks in Xcode project?
To add frameworks in Xcode project
- Choose the project file from the project navigator on the left side of the project window
- Choose the target where you want to add frameworks in the project settings editor
- Choose the “Build Phases” tab, and select the small triangle next to “Link Binary With Libraries” to view all of the frameworks in your application
- To add frameworks click on “+” sign below the list of frameworks
- To choose multiple frameworks, press and hold the command key while choosing the framework
4) Mention what is the difference between bounds and frame?
- Frame: The frame of a view is the rectangle, represented as a location (X, Y) and size (width, height) corresponding to the superview it is contained within
- Bounds: The bounds of a view is the rectangle, represented as a location (X, Y) and size (width, height) corresponding to its own co-ordinate system (0,0)
5) Explain what is the difference between Xcode, Cocoa and Objective C?
- Xcode: It is the integrated development environment (IDE) that developer use to write software for IOS or OS X.
- Objective-C: It is the language most preferred by developer to write programs for apple
- Cocoa: It is the application
6) Explain what is Xcode command line tools package?
Command line tools package is a self-contained package available separately from Xcode. It enables you to do command line development in OS X. It consists of two components like command line tools such as Clang and OS X SDK.
7) Mention what are the new features in Xcode 6?
In Xcode 6, new features include
- Support for Swift: Xcode 6 explicitly supports the Swift code, it is very simple and easy to make a brand new app using 100% swift code to existing frameworks.
- Playgrounds: It enables the interactive experience of a scripting language, like you can show variables in a graph, watch an animated SpriteKit Scene or inspect each step when drawing a view. Once you are done with code in the playground, you can move it into your project
- Command Line: You can use Swift syntax to interact and evaluate with your running app or write new code in a script like environment
- Performance Testing: The XCTest framework is extended to support performance test, and is completely synchronized with Xcode and Xcode Server. It also raises alerts for regression when test results change
- View Debugging: Xcode allows easy debugging and includes new debugging tools like debug gauges to monitor I/O usage and enhance iCloud gauge
8) Mention what is the use of PO command in Xcode?
PO command is useful during debug time. In normal scenario, to print the value of a variable, you have to move the mouse pointer there and select print description print value of it. With PO command, you can print value by just writing the “PO variable name” in output window, and press enter.
9) Mention what are the two different smart groups in Xcode?
Simple smart groups are classified into two categories
- Simple filter smart group: It matches files based on file name “globbing” used in the shell
- Simple expression smart group: It matches files using regular expression
10) Explain how you can delete a smart group created in Xcode?
It is not possible to delete smart groups individually, so you can delete smart group in Xcode either by
- Deleting all the smart groups saved in an individual project
- Or by deleting all the global smart groups available in the project
11) Explain how you can migrate to Xcode?
To migrate to Xcode you need to import your ProjectBuilderWO projects into Xcode by following steps
- Select file -> Import project -> Open the import project assistant
- From the import project assistant, select the import projectBuilderWO projects and tap on the next button
- Choose the button to select the project document
- Enter the name you want to use for the new Xcode project in the New Project Name Field and click finish
12) Mention what are the source items used by Xcode?
Xcode uses four different types of source items
- Source File
- Source Group
- Source Folder
13) What is the short cut to open the “Code Snippet Library” in Xcode?
(CMD+OPT+Cntrl+2) is the short-cut to open the “Code Snippet Library” in Xcode.
14) Mention the short-cut to edit variables in Scope?
To edit variables in Scope, you can use the command Cntrl+cmd+E.
15) Mention what are the build phases available in Xcode?
There are three build phases in Xcode that is available by default
- Compile Sources
- Link binary with libraries
- Copy bundle resources
16) Explain how app delegate is declared by Xcode project templates?
App delegate is defined as a sub-class of UIResponder by Xcode project templates.
17) Mention what are all instruments available in Xcode?
To trace and profile Mac OS X and iOS code an application is used referred as Instruments. It allows you to track one or more than one processes and analyze the collected data. It helps you to understand the behavior of both operating system and the user programs.
18) Explain what does @synthesize do?
Keyword @synthesize tell the compiler that it should create the setter or getter for the property if you do not supply them with the @implementation block.
Click here for Swift Interview Questions