Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is a Private API, and why will Apple reject an iOS App if one is used?

I've read several articles about this, and I just want to see if I understand this correctly:

Apple will reject your app if you use a Private API...

  1. What is the main difference between a "Private API" and a "Non-private API?"

  2. Are the "Non-private" APIs only the APIs provided and verified by Apple?

  3. Isn't an API just a way of interacting with a Framework, and a Framework is just a set of encapsulated classes/headers that people can use for trivial purposes?

  4. Wouldn't this mean that I cannot reuse anyone's code (other than Apple's) at all in my app?

  5. If this is true, whenever a programmer makes his or her own custom classes and methods, isn't he technically designing a mini Framework just for his specific purpose? So wouldn't this mean that he is using his own private API?

  6. What would even be the difference between using someone else's classes/methods alongside my classes/methods, how could they even tell the difference, and why would this be a problem?

My understanding of this sounds absurd, and don't believe I am understanding what a "Private API" is correctly. I did read that it was to protect against any changes in the API that could render your App dysfunctional. Does this mean APIs are linked during run time (as opposed to compile time) and can be updated automatically without you knowing or something? (See, I was originally thinking of APIs/frameworks as being set in stone whenever you compile, maybe this is where I am wrong)

Can someone please help me out? I'm really confused about this policy. Thank you!

like image 783
giant91 Avatar asked Jul 10 '13 20:07

giant91


People also ask

What is a private API Apple?

Private APIs provide a way of accessing parameters or functions that aren't documented in a publicly released software development kit (SDK) or a related project. Developers working for Apple can use its private APIs as needed, but the company's App Store rules disallow third-party developers from doing the same.

Why would Apple reject an app?

As per Apple, bugs and unfinished or undercooked apps with broken functionality and hyperlinks, inaccurate or misleading information are the top reason for app rejection, contributing to over a fifth of total rejections.

How does a private API work?

A private API is an application programming interface that has its application hosted with in-house developers. Private APIs act as front end interfaces to back end data and application functions. The interface provides a point of entry for developers or contractors that are working to develop those functions.

How do I stop App Store rejection?

To avoid rejection, make sure that your privacy policy is easily accessible both within your app and app page in the App Store. It should explain how you use the specific data that you collect: how it's stored, and whether or not you share it with other third-party entities.


1 Answers

Q. What is the main difference between a "Private API" and a "Non-private API?"

  • Private is one that isn't publicly defined (there isn't much to it)

Q. Are the "Non-private" APIs only the APIs provided and verified by Apple?

  • Private and Public APIs are both 'provided' by Apple but only public APIs are provided for you to use.
  • The private APIs are for use by Apple only

Q. Isn't an API just a way of interacting with a Framework, and a Framework is just a set of encapsulated classes/headers that people can use for trivial purposes?

  • Yes

Q. Wouldn't this mean that I cannot reuse anyone's code (other than Apple's) at all in my app?

  • No

Q. If this is true, whenever a programmer makes his or her own custom classes and methods, isn't he technically designing a mini Framework just for his specific purpose? So wouldn't this mean that he is using his own private API?

  • No (a framework is different to an app)

Q. What would even be the difference between using someone else's classes/methods alongside my classes/methods, how could they even tell the difference, and why would this be a problem?

  • It usually wouldn't

The point you need to get is that when referring to private APIs you should only be thinking about private Apple supplied APIs.
Other APIs from 3rd parties are different (and Apple doesn't care so long as that 3rd party code doesn't use Apple private APIs).

like image 180
Wain Avatar answered Sep 23 '22 18:09

Wain