Questions 1 to 7 in 50
Page 1
Whats a class, interface and implementation? How they differ from each other?
Unlike conventional programming like java where class is logical expression of objects and interface is a blueprint with static constants
and abstract methods, In IOS/OBJ-C the Class is Combination of interface and implementation where interface is blueprint of the properties
and functions along with access specifiers and Implementation is the functional code corresponding to interface’s methods or properties.
( The difference is due to fact that OBJ-C is derived from C which is Procedure Oriented Programming with an implementation of OOP’s concepts prior to C++. )
Protocall are OBJ-C equivalents of Java Interfaces.
In Simple words OBJ-C has seperate interface and implementation for classes to allow SubClassing and Extensions thus implementing OOP.
( The difference is due to fact that OBJ-C is derived from C which is Procedure Oriented Programming with an implementation of OOP’s concepts prior to C++. )
Protocall are OBJ-C equivalents of Java Interfaces.
In Simple words OBJ-C has seperate interface and implementation for classes to allow SubClassing and Extensions thus implementing OOP.
What’s a struct?
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.
From which version of IOS does Multitasking is supported?
Multitasking is ability to run multiple apps simultaneously while one of application remains in foreground. This supporting is added
From iOS 4.0.
This also means app states active, inactive and background are added from iOS 4.0. Background is also available prior to 4.0 but only for first party apps.
This also means app states active, inactive and background are added from iOS 4.0. Background is also available prior to 4.0 but only for first party apps.
Whats enumeration? How does it differ from the enumerator (enum)?
Enumeration is a language feature that allows us to iterate over the contents of a collection.
When compared to traditional looping, Enumeration will run faster as the internal implementation by first party (Apple) reduces the message send overhead and increases pipelining potential.
It is completely different from enumerator (enum) as enum is a data type and enumeration is an iterator
When compared to traditional looping, Enumeration will run faster as the internal implementation by first party (Apple) reduces the message send overhead and increases pipelining potential.
It is completely different from enumerator (enum) as enum is a data type and enumeration is an iterator
How many bytes we can send to apple push notification server?
- Earlier when standard curl or HTTP/1 is used it used to be 256bytes.
- The limit is raised to 2KiB with iOS 8
- Currently its 4KiB for regular and 5KiB for VOIP respectively.
Explain Application states with respectve occurences.
- Not running : The app has not been launched or was running but was terminated by the system.
- Inactive : 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 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 : The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.
- Background : 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 some more time. Also, an app being launched directly into the background enters this state instead of the inactive state.
- Suspended : 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.
What’s an Application Bundle?
A bundle is a directory in the file system that groups related resources together in one place.
When an iOS application is built, Xcode (or xcodebuild in case of command-line tool) packages the compiled code and resources as one bundle known as the main bundle.
An iOS app bundle contains the app executable file and supporting resource files such as app icons, image files, and localized content.
When an iOS application is built, Xcode (or xcodebuild in case of command-line tool) packages the compiled code and resources as one bundle known as the main bundle.
An iOS app bundle contains the app executable file and supporting resource files such as app icons, image files, and localized content.