Posts

Shipping a Library/Framework in iOS

Image
Uyuni salt lake - Bolivia                       In this article we will discuss all about Framework/Libraries in iOS, from choosing between framework/library, designing, architecture, security measures, testing and publishing.. Before we start, lets understand what is an module, how they are beneficial  What is an module > encapsulates code and data to implement a particular functionality.   > has an interface that lets clients to access its functionality in an uniform manner. > is easily pluggable with another module that expects its interface. > is usually packaged in a single unit so that it can be easily deployed. More on Modular architecture in iOS Modules in iOS ecosystem In iOS we can ship an module as an library or as an framework, lets see how they differ from each other  Library library is an pre compiled binary in swift IR format, it can be in any executable format like .a, unix execut...

Gateway to Multithreading in iOS with GCD and OperationQueue

Image
This article revolves around api’s available in swift for achieving concurrency and advanced thread handling techniques. Before we jump-in, it is better to brush-up few basics understandings of concurrent programming lets start with concurrent vs parallel running of jobs... Concurrency vs Parallelism  Concurrency   means executing multiple tasks at the same time but not necessarily simultaneously . Parallelism is when multiple tasks OR several part of a unique task literally run at the same time, e.g. on a multi-core processor. Parallelism must require hardware with multiple processing units. In single core CPU, you may get concurrency but NOT parallelism. more on concurrency and parallelism Task / work item /  block  Piece of code/task which needs to executed  Process  A process is the instance of a computer program that is being executed by one or many threads Processor  The hardware within a computer that executes a program Threads   A th...