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?

3      

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.

5      

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.

5      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

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.