Reputation: 430
Recently I've been looking around for commonly used frameworks in Swift. I haven't found anything too specific and I'm wondering if maybe instead I should be searching for APIs.
The problem is, I don't know how well I can distinguish the two, or explain the differences to someone else. I understand frameworks. But I'm a bit iffy on APIs; most of what I found said that API's are the "interface" of a framework, or that it defines how software components interact. Like what? I don't understand what the "interactions" are, or how they can be defined.
Question is: Is it possible to elaborate on what an API does? Maybe give an example? Thanks in advance, I hope this question doesn't sound too vague.
Upvotes: 1
Views: 105
Reputation: 267
I think the best way to go with an API is to get one specific part about your app. For example the conversion rate in a currency converter, or the TouchID API, which allows you to access that specific part without importing a whole other framework.
Frameworks are often more complex than APIs and allow you to implement functions into your own code where APIs take care of one specific aspect.
Upvotes: 2