Interview with me - Imtiaz211/interviews GitHub Wiki

@nonescapting Closure?

When passing a closure as a function argument, the closure gets executed with the function’s body and returns the compiler back. As the execution ends, the passed closure goes out of scope and has no more existence in memory.

@autoclosure Closure?

The @autoclosure attribute can be applied to a closure parameter for a function, and automatically creates a closure from an expression you pass in.

  1. Parameter in a function can be replaced with a closure that takes no parameter and returns back a value of the same type as the parameter.
  2. Such closure parameters can be marked with an @autoclosure attribute.
  3. No need to put braces around such @autoclosure-d parameters. Value, another function or an expression passed is wrapped with braces automatically.
  4. Another function used as that marked closure parameter is not executed until it will be called explicitly from the function body.
    func printTest2(_ result: @autoclosure () -> Void) {
    print("Before") // 1
    result() // 2
    print("After") // 3 Without {} this will work
    }
    printTest2(print("Imtiaz Ahmad"))

@escaping Closure?

When passing a closure as a function argument, the closure is being preserved to be executed later and the function's body gets executed, returning the compiler back as the execution ends, the scope of the passed closure exists and has existence in memory, till the closure gets executed.

What is trailing Closure?

If the last parameter to a function is a closure, Swift lets you use special syntax called trailing closure syntax.

Difference between closure & Blocks?

The main difference is that a block simply groups instructions together (for example the body of a while statement), while a closure is a variable that contains some code that can be executed. If you have a closure usually you can pass it as a parameter to functions

Difference between closure & Callback?

A closure is a function that captures local variables to be used in a scope outside of the local scope. A callback is a hook for a function to be attached to so that when an action is needed the function can be called to provide a result or affect.

Design Pattern?

  1. Creational: Singleton.
  2. Structural: Decorator, Adapter, Facade.
  3. Behavioral: Observer, and, Memento

What is a keychain?

Keychain is an API for persisting data securely in an IOS App.The keychain is the best place to store small secrets, like passwords and cryptographic keys. You use the functions of the keychain services API to add, retrieve, delete, or modify keychain item

What is protocol?

A protocol is used to define a list of required, optional methods that a class needs to implement. If a class adopts a protocol, it must implement all the needed methods in the protocols it adopts. Cocoa uses protocols to support interprocess communication through objective c messages.

Explain formal Protocols?

Formal protocols enable defining an interface for a set of methods without any implementation. It is useful with distributed objects as they allow defining a protocol for communication between objects.

Explain Informal Protocols?

An informal protocol is a category on NSObject, which implicitly makes almost all objects adopters of the protocol. Implementation of the methods in an informal protocol is optional. Before invoking a method, the calling object checks.

Delegates and Callbacks?

The difference between delegates and callbacks is that with delegates, the Network Service is telling the delegate “There is something changed.” with callback, the delegate is observing the Network Service.

Explain if let structure?

If_let is a special structure in Swift that allows you to check if an Optional rhs holds a value, and in case it does — unwraps and assigns it to the lhs.
if let courses = student.courses {
Print(“Yep, Courses we have”)
}

Explain what is defer?

defer keyword which provides a block of code that will be executed in the case when execution is leaving the current scope. To perform manual resource management such as closing file descriptors, and to perform actions that need to happen even if an error is thrown. execution order is revers order.

Use of self (“s” small letter)? and Use of Self (“S” Upper letter)?

self refers to the current instance of the type in which it occurs. if it compiles without self then omit it. self refers to the value inside that type, e.g. “hello” or 556.

With a capital S, Self refers to the type that conforms to the protocol, e.g. String or Int.

Type casting operator in Swift is at runtime?

It returns true or false as compile time
as? perform a conditional cast of the expression to the specific type,
as! performs a force cast of the expression.

guard statement?

used to transfer program control out of a scope if one or more conditions aren’t met. The other benefit is providing an early exit out of the
function using break or using return.
guard condition else {
statements...
return
}
There are three big benefits to guard statements.
(1) Avoiding the pyramid of doom.
(2) Early exit out of the function using break or using return.
(3) Safely unwrap optionals.
(4) variable use outside of the guard statement.

What is a Run loop?

A runloop is an abstraction that provides a mechanism to handle system input sources (sockets, ports, files, keyboard, mouse, timer, etc). Each NSThread has its own runloop, which can be accessed via the currentrunloop method.

What is the category?

Categories allow you to add functionality to already existing classes without extending them. It is a way to split a single class definition into multiple files. Their goal is to ease the burden of maintaining large code bases by modularizing a class. This prevents your source code from becoming monolithic 10000+ line files that are impossible to navigate and makes it easy to assign specific.

Extensions?

Extensions are similar to categories in that they let you add methods to a class outside of the main interface file. But, in contrast to categories, an extension’s API must be implemented in the main implementation file—it cannot be implemented in a category. private, fileprivate property is not accessible in extension, only internal propery will be accessiable.

Extensions in Swift can:

Add computed instance properties and computed type properties
Define instance methods and type methods Provide new initializers
Define subscripts
Define and use new nested types
Make an existing type conform to a protocol

What is NSUserDefaults?

NSUserDefaults is a class that allows simple storage of different data types. NSUserDefault is allowed and supports up to 500kb. It is ideal for a small bit of information you need to persist between app launch or device start.

UUID?

Universal Unique Identifier is on a peer-app basis. Identifies an app on a device as long as the user doesn’t completely delete the app. then this identifier will persist between app launches and atleast let you identify the same user using a particular app on a device. Unfortunately, if the user completely deletes and then reinstall the app then the ID will change.

UDID?

Universal Device Identifier a sequence of 40 hexadecimal characters that uniquely identify as iOS device. This value can be retrieved through iTunes, or found using UIDevice - uniqueidentifier. Derived from hardware details like MAC address.

Is a delegate retained?

No, the delegate is never retained! Ever!. The reason that objects weakly retain their delegates is to avoid retain cycles. Imagine the following scenario: object A creates B and retains it, then sets itself as B delegate. A is released by its owner, leaving a retain cycle containing A and B. This is actually a very common scenario.

What is the difference between raw and associated value in swift?

raw values are compiling time-set values assigned to every case within an enumeration. associate value allows you to store values of other types alongside case value.

What is a reusable Identifier?

reusability of an already allocated object.

What are three triggers for local Notification?

Location, Calendar and Time Interval.

Explain the throw?

We are telling the compiler that it can throw errors by using the throws keyword. Before we can throw an error, we need to make a list of all possible errors you want to throw.
func fucnName() throws -> String
func fucnName() throws -> String {
guard value != 0 else {
throw "DividingErr.InvalidNumber"
}
return "20" / value
}

How many different ways to pass data in Swift?

There are many different ways, such as delegate, KVO, segue, NSNotification, Target-Action, Callbacks.

Any and AnyObject?

Any refers to any instance of a class, struct, or enum – literally anything at all. AnyObject can represent an instance of any class type.

Explain subscripts?

classes, structures, and enumerations can define subscripts, which are shortcuts for accessing the member elements of a collection, list or sequence.
struct TimesTable {
let multiplier: Int
subscript(index: Int) -> Int {
return multiplier * index
}
}

What is the difference between a delegate and an NSNotification?

delegates and NSNotification can be used to accomplish nearly the same functionality. However, delegate are one to one while NSNotifications are one-to-many.

Why is everything in a do-catch block?

In Swift, errors are thrown and handled inside of do-catch blocks.

What is the Observer Pattern?

In the Observer pattern, one object notifies other objects of any state changes. Observer is a behavioral design pattern that allows some objects to notify other objects about changes in their state. The Observer pattern provides a way to subscribe and unsubscribe to and from these events for any object that implements a subscriber interface.

How to use higher order functions?

Functions that take other functions as parameters, or return a function, as a result, are known as higher-order functions.

What is deep linking?

Deep linking is the use of a hyperlink that links to a specific, generally searchable or indexed, piece of web content on a website.

What is Universal linking?

Universal links are Apple's way of launching apps on their operating system from a website, also known as a webview. When a user opens a web page which is matched as described, iOS automatically redirects the user to the app.

Type Annotation?

A type annotation explicitly specifies the type of a variable or expression. Type annotation begins with a colon (:) and with a type. Example let someTuple:(Double, Double) = (3.14159, 2.71828)

What is dataSource?

A datasource is an outlet held by NSView and UIView objects such as tableviews and outline views that require a source from which to populate their rows of visible data. The data source for a view is usually the same object that acts as its delegate, but it can be any object.

What is the First Responder and Responder chain?

The first object in the responder chain is called the first responder. A responder chain is a hierarchy of objects that can respond to the events received.

What is a collection?

A collection is a foundation framework class that is used to manage and store the group of objects. The primary role of a collection is to store objects in the form of either a set, a dictionary or an Array.

Explain plist?

plist represents Property list; it is a key-value for the application to save and retrieve persistent data values. This is specifically used for iPhone development. It is basically an XML file. Size is 10MB.

What is a static library?

A static library is a package of classes, functions, definitions and resources, which you can pack together and easily share between your projects.

What is Notification?

Notification provides a mechanism for broadcasting information within a program, using notification we can send messages to other objects by adding an observer.

What is the difference between Protocol and delegates?

protocol is used to declare a set of methods that a class adopts (declares that it will use this protocol) will implement. delegate are a use of the language feature of protocols. The delegation design pattern is a way of designing your code to use protocol where necessary.

How do you usually persist data on iOS?

NSUserDefaults, CoreData, disk file storage, p.list.

Fall through?

A switch statement completes its execution as soon as the first matching case is completed instead of falling through the bottom of subsequent cases like it happens in C and C++ programming languages. Following is a generic syntax of switch statement in C and C++.

What's the difference between using a delegate and notification?

Both are used for sending values and messages to interested parties. A delegate is for one-to-one communication and is a pattern promoted by Apple. In delegation the class raising events will have a property for the delegate and will typically expect it to implement some protocol. The delegating class can then call the delegate protocol methods.


Notification allows a class to broadcast events across the entire application to any interested parties. The broadcasting class doesn't need to know anything about the listeners for this event, therefore notification is very useful in helping to decouple components in an application.

Explain what Lazy stored properties are and when it is useful?

Lazy stored properties are used for a property whose initial values are not calculated until the first time it is used.

1.declare a lazy stored property by writing the lazy modifier before its declaration.
2.Lazy properties are useful when the initial value for a property is dependent on outside factors whose values are not known until after an instance’s initialization is complete.
They are also useful when the initial value for a property requires complex or computationally expensive setup that should not be performed unless or until it is needed.
3.You can’t use lazy with let .
4.You can’t use it with computed properties. Because, a computed property returns the value every time we try to access it after executing the code inside the computation block.
5.You can use lazy only with members of struct and class .
6.Lazy variables are not initialised atomically and so is not thread safe.

Explain blocks?

blocks are a way of defining a single task or unit of behavior without having to write an entire class. They are anonymous functions.

What is a Delegate?

A delegate is an object that will respond to pre-chosen selectors (function calls) at some point in the future, and need to implement a protocol method by the delegate object.

Optional binding?

optional binding is a term used when assigning a temporary variable form optional in the first clause of if or while block. When the property courses have not yet been initialized. Instead of runtime error, the block will gracefully continue execution.

Optional chaining?

optional chaining is a way of querying properties and methods on an optional that might contain nil. This can be regarded as an alternative to forced unwrapping.

What is the difference between Delegate and KVO?

Both are ways to have relationships between objects. delegation is a one to one relationship where one object implements a delegate protocol and another uses it and sends messages assuming that those methods are implemented since the receiver promised to comply with the protocol.


KVO is many-to-many relationships where one object could broadcast a message and one or multiple other objects can listen to it and react.

What is a tuple?

A tuple is a group of different values in a single compound value. It is an ordered list of elements. There are two ways to access the object data in a tuple i.e by name or by position.

What is an init()?

initialization is a process of preparing an instance of an enumeration, structure or class for use. initializers are also called to create a new instance of a particular type.

Explain generics in Swift?

Generics create code that does not get specific about underlying data types. Generics allow us to know what type it is going to contain. Generics also provides optimization for our code.

What are the differences between Exceptions and Errors?

Exceptions are the programmer-level bugs like trying to access an object that doesn’t exist. They are designed to inform the developer that an unexpected condition occurred. Since they usually result in the program crashing, exceptions should rarely occur in your production code.


Errors are user-level bugs like trying to load a file that doesn’t exist. Because errors are expected during the normal execution of a program, you can manually check for these kinds of conditions and inform the user when they occur. Most of the time, they should not cause your application to crash. Errors are represented by the NSError class.

What is dependency injector?

Dependency injection means giving an object its instance variables. Classes often require references to other classes. For example, a Car class might need a reference to an Engine class. These required classes are called dependencies and in this example the Car class is dependent on having an instance of the Engine class to run.

There are 3 types of dependency injection:

  1. Setter injection. -> Initilizer Injection.
  2. Constructor injection. -> Property Injection.
  3. Interface injection. -> Method Injection. protocol EngineProtocol {
    func start()
    func stop()
    }

    protocol TransmissionProtocol {
    func changeGear(gear: Gear)
    }
    final class Car { // Car is called Client {
    private let engine engine: EngineProtocol
    private let transmission transmission: TransmissionProtocol


init(engine: EngineProtocol, transmission: TransmissionProtocol) { // engine and transmission is called service {
Self.engine = engine
Self.transmission = transmission
}
}.transmission = transmission
}


Dependency Injection is one of a few patterns that helps apply principles of Inversion of Control

What is sandbox?

For security reasons, iOS place each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to file, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox director, which acts as the home for the app and its data.

Explain App Bundle?

During iOS application development, Xcode packages it as a bundle. A Bundle is a file directory that combines related resources together in one place. It contains the application executable file and supports resource files such as localized content, image files and application icons.

App ID?

It is primarily used to identify one or more apps from a Unique Development team. It consists of a string divided into two parts. The string includes a Team ID and a Bundle ID Search String with a separator as a period . The Team ID is allocated by Apple and is different for every development team. A Bundle ID Search String is supplied by App Developer.

What is app thinning?

App thinning is the whole process of delivering a tailored binary to the devices. It includes App Store + Operating System, both together works towards enabling the download and use the thin binaries. It manages future updates too. app thinning support target 9 or latest.

What is Slicing?

Slicing is the process of creating and delivering variants of the app bundle for different target devices. A variant contains only the executable architecture and resources that are needed for the target device.

What is Bitcode?

Bitcode is an Apple technology that enables you to recompile your app to reduce its size. The recompilation happens when you upload your app to AppStore Connect or export it for Ad Hoc, Development, or Enterprise distribution.

What is the use of UIApplication class?

The UIApplication class implements the required behaviour of an application.

What compilers do Apple use?

The Apple compilers are based on the compilers of the GNU (Operating system) Compiler Collection. LLVM GCC.

Reason to use Swift?

  1. Swift is easier to read.
  2. Swift is easier to maintain.
  3. Swift is faster.
  4. Swift is unified with memory management.
  5. Swift requires less code.
  6. Fewer name collisions with open source projects.
  7. Swift supports dynamic libraries. (Dynamic libraries are not statically linked into client apps; they don’t become part of the executable file. Instead, dynamic libraries can be loaded (and linked) into an app either when the app is launched or as it runs.)
  8. Swift playground encourages interactive coding.
  9. Swift is a future you can influence.
  10. Swift is a more approachable, full featured language.

Characteristics of Switch in Swift are?

It supports any kind of data, and not only synchronise but also checks for equality when a case is matched in the switch, the program exists from the switch case and does not continue checking next case. So you don’t need to explicitly break out the switch at the end of the case. Switch statement must be exhaustive, which means that you have to cover all possible values for your variable. There is no fall through in switch statements and therefore break is not required.

How could we get device token?

There are two steps to get device token. First, we must show the user’s permission screen, after we can register from remote notifications. If these steps go well, the system will provide device token.

What is size classes?

  1. The user resizes the window (OS X).
  2. The user enters or leaves Split View on an iPad (iOS).
  3. The device rotates (iOS).
  4. The active call and audio recording bars appear or disappear (iOS).
  5. You want to support different size classes.
  6. You want to support different screen sizes.
  7. Auto resizing mask (Springs & Struts), Auto layout (Constraints).

Types of notifications?

There are two types of notifications:

  1. Remote
  2. Local.
    Remote notification requires connection to a server. Local notifications don’t require server connection. Local notifications happen on devices.

Which programming language is used for iOS Development?

  1. SwiftUI
  2. Swift
  3. Objective-C
  4. .NET
  5. C
  6. HTML5
  7. JavaScript

What is the Swift main advantage?

  1. Optional Types, which make applications crash-resistant.
  2. Built-in error handling.
  3. Closures.
  4. Much faster compared to other languages.
  5. Type-safe language.
  6. Supports pattern matching

Please explain Swift’s pattern matching techniques?

  1. Tuple patterns are used to match values of corresponding tuple types.
  2. Type-casting patterns allow you to cast or match types.
  3. Wildcard patterns match and ignore any kind and type of value.
  4. Optional patterns are used to match optional values.
  5. Enumeration case patterns match cases of existing enumeration types.
  6. Expression patterns allow you to compare a given value against a given expression.

Please explain SOAP and REST?

SOAP (Simple Object Access Protocol) is definitely the heavyweight choice for Web service access.

REST (Representational State Transfer) provides a lighter weight alternative. Instead of Using XML to make a request, REST relies on a simple URL in many cases. REST can use four different HTTP 1.1 verbs (GET, POST, PUT and DELETE) to perform tasks.

Media Framework?

AVFoundation, Core Audio, Core Image, Core Graphics, Quartz Core, Core Text, ImageI/O, Media Player, Metal, OpenGLES, Photos.

How do you debug and profile things on iOS?

Every iOS developer should be able to explain how he would use breakpoints and logs to get the runtime data, but things about and Crash Logs.

Core Services Framework?

Accounts, Address Book, CFNetwork, Core Data, Core Foundation, Core Location, Core Motion, Event Kit, Foundation, Health Kit, Home Kit, Newsstand, Pass kit, Quick Look, Social, Store Kit,System Configuration.

What is Core Text?

Core Text is a text engine found in iOS 3.2+ and OSX 10.5+ that gives you fine-grained control over text layout and formatting. Core Text lies right between the two. You have complete control over position, layout, attributes like color and size, but Core Text takes care of everything else for you – from word wrap to font rendering and more. Core Text is especially handy if you are creating a magazine or book app – which works great on the iPad.

What is Enterprise Application?

An enterprise application (EA) is a large software system platform designed to operate in a corporate environment such as business or government. EAs are complex, scalable, component-based, distributed and mission critical.

What is Xcode?

Xcode is a combination of Software Development Tools developed by Apple for developing applications. It is an integrated Development Environment. It is primarily used for development of iOS and OS X applications.

How is it possible to improve battery life during execution of an application?

An application is notified whenever the operating system transfers the application between background and foreground. It helps in extended battery life by determining the exact functionalities in the background and thereby also helps in better user experience with the foreground application.

Which JSON Framework is supported by iOS?

SBJSON is the framework that is supported by ios. It is a generator and a JSON parser of objective-c. SBJSON provides a flexible api and also makes JSON handling easier.

What is JSON?

JSON stands for JavaScript Object Notation; it provides a straightforward, human-readable and portable mechanism for transporting data between the two systems.

What is Garbage Collection?

Garbage collection is a Memory Management feature. It manages the allocation and release of the memory to your applications. When the garbage collector performs a collection, it checks for objects in the managed heap that are not executed by the applications.

What is HTTP?

The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, and hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web. Hypertext is structured text that uses logical links (hyperlinks) between nodes containing text.

How do you test network requests?

There is a situation that we would like to monitor all http incoming requests on the web server side but we can't change configuration on the browser or application client side. In this scenario, we can setup reverse proxy on web server side to monitor all incoming/outgoing requests on web server side.

Explain xib?

.xib is a file extension that is associated with interface builder files. It is a graphics software that is used to test, develop and design the user interfaces of different software products. Such extension files also contain development time format files that include interface files created with the interface builder software.

What is a storyboard?

A storyboard is a visual representation of the user interface of an iOS application, showing screens of content and the connections between those screens. In addition, a storyboard enables you to connect a view to its controller object, and to manage the transfer of data between view controllers.

What are layer objects?

Layer objects are data objects which represent visual content and are used by views to render their content.

How is base-class defined in Swift?

In Swift the classes are not inherited from the base class and the classes that you define without specifying its superclass, automatically become the base-class.

What is IPA?

IPA stands for iOS App Store Package. An ipa file is an iPhone application archive file which stores an iPhone app. It is usually encrypted with Apple's FairPlay DRM technology. Each .ipa file is compressed with a binary for the ARM architecture and can only be installed on an iPhone, iPod Touch, iPad.

Difference between Foundation and Core Foundation Framework in iOS?

Core Foundation is a general-purpose C-level API which provides CFString, CFDictionary etc. It is an open source framework. Core Foundation is the common base of Foundation and Carbon.

Foundation is a general-purpose Objective-C framework which provides NSString, NSDictionary, etc. It is a closed-source framework.

What is the difference between object and instance?

Instance refers to reference of an object. Object is actually pointing to the memory address of that instance. A single object can have more than one instance. Instance will have the both class definition and the object definition whereas in object it will have only the object definition.

The basic concept of OOP is this: Class >> Object >> Instance. Objects and instances are mostly the same. But the word instance can also mean structure instance also. But the object is only for classes. All of the objects are instances. Not all of the instances must be objects. Instances may be structure instances or objects. An instance of a class is traditionally known as an object. But it is better to use the term Instance as we are dealing with struct and enum as well.

What are the major purposes of Frameworks?

Frameworks have three major purposes Code encapsulation, code modularity, Code reuse.

Cocoa Touch Framework?

UIKit, MapKit, GameKit, Notification Centre, iAD, Message UI, Address Book UI / Event Kit UI, Photos UI.

Difference between class and object?

  1. Class
    • A class is a blueprint from which you can create the instance, i.e., objects.
    • A class is used to bind data as well as methods together as a single unit.
    • Classes have logical existence.
    • A class doesn't take any memory spaces when a programmer creates one.
    • The class has to be declared only once.
  2. Object
    • An object is the instance of the class, which helps programmers to use variables and methods from inside the class.
    • Object acts like a variable of the class.
    • Objects have a physical existence.
    • An object takes memory when a programmer creates one.
    • Objects can be declared several times depending on the requirement.

What is app extension

App Extensions are an iOS feature that allows developers to extend the functionality and content of their app beyond the app itself, making it available to users in other apps or in the main operating system.

What is heap?

Heap is just an area where memory is allocated or deallocated without any order.

What is the question Mark?

The ? Is used during the declaration of a property, as it tells the compiler that this property is optional. The property may hold a value or not. In later cases it’s possible to avoid runtime errors when accessing that property by using.

What is the use of double quotation marks??

To provide a default value for a variable. This is called the nil coalescing operator and it works to provide fallback value.

What is the use of! Mark?

The ! Is used to tell the compiler that I know definitely, this variable/constant contains a value and please use it. (I.e. please unwrap the optional).

What is Data Handling?

Data handling is the process of ensuring that search data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project.

What is the difference between CollectionView and TableView?

TableView displays a list of items, in a single column, a vertical fashion, and limited to vertical scrolling only. CollectionView also displays a list of items, however, they can have multiple columns and rows.

What is Cocoa and cocoa Touch?

Cocoa is an Application Development Environment for Mac OS X Operating System and iOS. It includes Compilations of a Runtime system, object oriented software libraries and an integrated development environment.
Cocoa Touch is for apple touch devices that provide all development environments.

What is let?

Let is a keyword to declare or initialize a constant variable.

What is var?

Var is a keyword to declare or initialize a variable.

What is KVC and KVO?

KVC Stands for Key-Value Coding. It’s a mechanism by which an object’s properties can be accessed using strings at runtime rather than having to statically know the property names at development time.

KVO Stands for Key-Value Observing and allows a controller or class to observe changes to a property value. In KVO, an object can ask to be notified of any changes to a specific property, whenever that property changes value, the observer is automatically notified.

What is UIStackView?

UIStackView provides a way to layout a series of views horizontally or vertically. We can define how the contained views adjust themselves to the available space.

Xcode new changes

  1. Refactoring in Swift
  2. Smarter Fix its
  3. Simulators
  4. Wireless Debugging
  5. Source Control PonyDebugger is a remote debugging toolset. It is a client library and gateway server combination that uses Chrome developer Tools on your browser to debug your application's network traffic and managed object contexts.
  6. All New Editor
  7. Super fast Search
  8. Debugging
  9. Xcode Server Build
  10. New Playground template
  11. New build System

Why an app on IOS device behaves differently when running in foreground that in background?

Because of the limitation of resources on iOS devices.

How would you create your own custom view?

By subclass of UIView class.

If I call ""performSelector:withObject:afterDelay"":-is the object retained?

Yes, the object is retained. It created a timer that calls a selector on the current thread's run loop.

What is the syntax for external parameters?

The external parameter precedes the local parameter name.
Example:
func imtiaz1(value1:Int, value2:Int){} Internal Value is value1.
func imtiaz1(externalValue value1: Int, externalValue value2: Int){} externalValue is external parameter.

What is the super class for UIButton?

UIButton->UIControl->UIView->UIResponder-> NSObject.

What is the difference between SVN and GIT?

SVN (Subversion) relies on a centralized system for version management. It’s a central repository where working copies are generated and a network connection is required for access.

GIT relies on a distributed system for version management. You will have a local repository on which you can work, with a network connection only required to synchronize.

What is test Flight?

Test Flight is beta testing is an apple product that makes it easy to invite users to test your iOS, watchOS and tvOS apps before you release them into the app store. It will take 2 days for review and validity is 89 days.

What is the de-initializer in swift?

If you need to perform additional cleanup of your custom classes, it’s possible to define a block called deinit.
Deinit{
your statement for cleanup here.
}
A de-initializer is called immediately before a class instance is deallocated. You write de-initializers with the deinit keyword, similar to how initializers are written with the init keyword. De-initializers are only available on class types.

Why do we use availability attributes?

Apple wants to support one system version back, meaning that we should support iOS 9 or iOS 8. Availability lets us support previous version ios.

What is a pointer?

A Pointer is a direct reference to a memory address.

If I have deleted the app, is the keychain store password or not?

In iOS 10.3 beta, keychain info for an app is removed when the app is uninstalled, but this behaviour seems to have been removed in the final 10.3 version. At Apple Documentation It is suggested that this is about to change and we should NOT rely on keychain access data being intact after an app uninstallation.

What kind of JSONSerialization has ReadingOption?

MutableContainers Specifies that arrays and dictionaries are created as variable objects, not constants. MutableLeaves specifies that leaf strings in the JSON object graph are created as an instance of variable string. AllowFragments specifies that the parser should allow top-level objects that are not an instance of Array Dictionary.

What is Alamo fire doing?

Alamo fire provides chainable request/response methods, JSON parameter, response serialization, authentication, and many other features.

⚠️ **GitHub.com Fallback** ⚠️