Static Vs Dynamic libraries in iOS

A library is a set of resources and also the code itself, compiled for a couple of architectures. Apple provides 2 kinds of library architectures that acts differently on building our program. They become a part of the executable, and therefore are statically connected to client programs. Therefore, it (notably big executable libraries) makes programs slower to load and operate, even launching time of the programs.

Apple revealed the design of static libraries below:

The libraries aren't a part of this executable file. Thus reduces the memory footprint to your program.
Clearly lively frameworks has more benefits over static frameworks. Especially, it isavailable to get iOS 8 and over.

Apple revealed the design of dynamic libraries below:

Developer participation:
Xcode generates two files when Dynamic libraries are construct -

    Simulator Architecture document
    Apparatus file

We will need to change files whenever program needs to alter production and test style.

Notice: The target structure of the customer and also the dynamic library has to be exactly the same. Otherwise, the dynamic loader does not load the library.

So what exactly do programmer need to do to utilize our lively frameworks?
We may add them to our job through the Embedded Binaries segment (project overall tab) and prior to deploying program to the Apple store, simply add a customized script (copy and paste out of the documentation) for your program's Build Phases, construct it, along with the simulator architecture is going to be eliminated from the frame as Apple needs.

For make programmer life easier, it's highly urge CocoaPods. All the build script and settings is automatically managed by CocoaPods, which means you don't have to do anything in any way.

Subscribe to receive free email updates:

0 Response to "Static Vs Dynamic libraries in iOS"

Posting Komentar