私有 API 到底是什么,如果使用了一个 iOS 应用程序,为什么 Apple 会拒绝它? [英] What exactly is a Private API, and why will Apple reject an iOS App if one is used?

查看:27
本文介绍了私有 API 到底是什么,如果使用了一个 iOS 应用程序,为什么 Apple 会拒绝它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了几篇关于此的文章,我只是想看看我是否理解正确:

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

如果您使用私有 API,Apple 将拒绝您的应用...

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

  1. 私有 API"和非私有 API"之间的主要区别是什么?

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

非私有"API 是否只是 Apple 提供和验证的 API?

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

API 不只是与框架交互的一种方式,框架只是一组封装的类/头文件,人们可以将它们用于琐碎的目的吗?

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?

这是否意味着我不能在我的应用程序中重用任何人的代码(Apple 除外)?

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

如果这是真的,那么每当程序员制作他或她自己的自定义类和方法时,他在技术上不就是为了他的特定目的而设计一个迷你框架吗?那么这不是说他在使用自己的私有 API 吗?

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?

将别人的类/方法与我的类/方法一起使用会有什么区别,他们怎么能分辨出区别,为什么会出现问题?

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?

我对此的理解听起来很荒谬,并且不相信我正确理解了私有 API"的含义.我确实读过它是为了防止 API 中可能导致您的应用程序功能失调的任何更改.这是否意味着 API 在运行时(而不是编译时)是链接的,并且可以在您不知情的情况下自动更新?(看,我最初认为 API/框架在你编译时是一成不变的,也许这就是我错的地方)

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!

推荐答案

问.私有 API"和非私有 API"之间的主要区别是什么?

  • 私有是一种没有公开定义的(没有太多)
  • 问.非私有"API 是否只是 Apple 提供和验证的 API?

    • 私有和公共 API 均由 Apple提供",但仅提供公共 API 供您使用.
    • 私有 API 仅供 Apple 使用
    • 问.API 不只是与框架交互的一种方式,框架只是一组封装的类/头文件,人们可以将它们用于琐碎的目的吗?

      • 是的
      • 问.这是否意味着我不能在我的应用程序中重用任何人的代码(Apple 除外)?

        • 没有
        • 问.如果这是真的,那么每当程序员制作他或她自己的自定义类和方法时,他在技术上不就是为了他的特定目的而设计一个迷你框架吗?那么这不是说他在使用自己的私有 API 吗?

          • 否(框架与应用不同)
          • 问.将别人的类/方法与我的类/方法一起使用会有什么区别,他们怎么能分辨出区别,为什么这会是个问题?

            • 通常不会
            • 您需要明白的是,在提及私有 API 时,您应该只考虑 Apple 提供的私有 API.
              来自第 3 方的其他 API 是不同的(只要第 3 方代码不使用 Apple 私有 API,Apple 不在乎).

              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).

              这篇关于私有 API 到底是什么,如果使用了一个 iOS 应用程序,为什么 Apple 会拒绝它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆