UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: API, SDK & Framework??

Forums > iOS

Please what are the differences between these three things?


A framework is a system that you use to do something. It can be, e.g., a UI framework, or a framework for accessing user location, or for manipulating images or audio, or whatever. Some frameworks are built into the system and you don't really have to do anything to use them apart from an import statement. Other frameworks are separate things that have to be specifically included in your project.

An API (or Application Programming Interface) is a set of instructions for how you interact with a framework. It tells you the valid function calls you can make and the various data structures available for your use.

An SDK (Software Development Kit) is a collection of tools for developing software. It can include documentation; example code; applications such as compilers, debuggers, profilers, etc; header files for accessing the various frameworks involved; and so on.

Very basically, an SDK gives you the tools to use the APIs to access Frameworks to develop software.


I saw a blog post (or maybe a YouTube video) which gave related explanation which may also help:

A Library is something that you call from your code and it may return a value. It does nothing otherwise.

A Framework is something that you call from your code but it calls your code automatically in order to add functionality to your code.

For example, you might use a maths library to calculate the area of a circle, mortgage terms, the volume of a cube or something like that. You call a method/function with some parameters and it returns you the answer. A Library is never does anything unless you ask it.

A Framework, like UIKit say, is something that you incorporate into your app, just as you would with a library in order to achieve something (draw a circle, display a list or buttons and the like) but in order for it to do that, the Framework will call back into your code as in didSelectRowAtIndexPath for a list to determine if you've tapped a row. A Framework is involved in a two-way conversation with your code and will call your code when an event of some kind happens.


Hacking with Swift is sponsored by Superwall

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.