Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

1458279

Suspended
Original poster
May 1, 2010
1,601
1,521
California
I've seen the term used before and the 1st thing that came to mind was developing a library. Then I read this post on SO:

http://stackoverflow.com/questions/7122192/creating-an-objective-c-api

The OP said: "I have never made an API in objective-c, and need to do this now."
The answer given was: "It sounds like what you want to do is build a static library. This is a compiled .a file containing object code that you'll distribute to a client along with a header file containing the interface."

Along with this link about how to build a static library in ObjC for the iPhone:

http://blog.stormyprods.com/2008/11/using-static-libraries-with-iphone-sdk.html

If you do a Google search, the returns are about making custom classes.

Q. what does API development mean?

It seems that it means making custom classes and/or extending current classes more than anything to do with a static library because a static library is nothing more than code in a different form of storage.

Also, does API development include documentation and is that standardized? I didn't see anything covering that.
[doublepost=1460172574][/doublepost]Here's a bit more on the subject:
http://www.sitepoint.com/do-you-need-an-api/

Which seems to be geared towards web services more than iPhone Dev.
 
Yeah, my understanding would be you're developing an interface for other people to interact with some part of your app. So, let's say you had some interesting data that you wanted other developers to be able to consume. You would build an API to allow them access to that data. I've only ever heard of the term used in terms of web services.
 
  • Like
Reactions: 1458279
Application Programming Interface

I use an API that was developed to access BT and ANT devices. What I am doing is allowing others to develop the parts I need and save me some time. I use the objects in the API to do the work.

Think of it this way, in Object C when you use an object you are taking it from an API library built for the device being coded for.
 
Application Programming Interface

I use an API that was developed to access BT and ANT devices. What I am doing is allowing others to develop the parts I need and save me some time. I use the objects in the API to do the work.

Think of it this way, in Object C when you use an object you are taking it from an API library built for the device being coded for.
So the difference between that and getting the code from someone that does the same thing is that they've built an interface into the code for you.

In other words, the BT/ANT device code could have been given to you in the form of an example program. You could have adopted the example code into your program.

With the API, you don't need to get into the code, you just follow the instructions of the API and it's ready to use.
 
Yes kind of.

The API is already compiled and in a library, so one includes the import header files and then codes in the objects of the API to their code. For the developer it makes it so we don't have to have a huge list of files to compile and link. Apple calls the libraries "Frameworks," but they are essential the same as the old .lib files we used in the straight C days. The best part is in addition to the actual compiled objects there are header files in the Frameworks.

If you do any sort of programming in Xcode you will use APIs /Frameworks built by Apple. UIKit for example.

Essential APIs are your pre-designed, tested and built objects for the developer to use. In the BT/ANT API(from Wahoo BTW) I use pre-built objects to find, connect to, and access BT devices for sports instead of building those objects from Apple's lower level BT myself.

Does this help or make you more confused?
 
Yes kind of.

The API is already compiled and in a library, so one includes the import header files and then codes in the objects of the API to their code. For the developer it makes it so we don't have to have a huge list of files to compile and link. Apple calls the libraries "Frameworks," but they are essential the same as the old .lib files we used in the straight C days. The best part is in addition to the actual compiled objects there are header files in the Frameworks.

If you do any sort of programming in Xcode you will use APIs /Frameworks built by Apple. UIKit for example.

Essential APIs are your pre-designed, tested and built objects for the developer to use. In the BT/ANT API(from Wahoo BTW) I use pre-built objects to find, connect to, and access BT devices for sports instead of building those objects from Apple's lower level BT myself.

Does this help or make you more confused?
It helps :D
 
An API is a form of contract, or promise. It says that even though the library code can and will be changed and updated, any app that uses the documented API calls to call the library code will keep working (until those APIs are deprecated) when built with new library versions/updates/releases.

To keep this contract, an API developer has to plan for the future (enhancements, new features, bug fixes, and more, etc.) to make sure these future changes won't break apps that use the API as documented. A library without an API? Maybe the next release of the lib will be completely incompatible, requiring a complete app rewrite to use it. Undocumented API use? Fair game for the library dev to scr*w any app devs who use those.
 
Last edited:
  • Like
Reactions: dejo
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.