gpt4 book ai didi

iphone - 到底什么是私有(private) API,为什么 Apple 会拒绝使用 iOS 应用程序?

转载 作者:IT王子 更新时间:2023-10-29 07:36:32 26 4
gpt4 key购买 nike

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

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

  1. “私有(private) API”和“非私有(private) API”之间的主要区别是什么?

  2. “非私有(private)”API 是否只是 Apple 提供和验证的 API?

  3. API 不只是一种与框架交互的方式,而框架只是一组封装的类/ header ,人们可以将其用于琐碎的目的吗?

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

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

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

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

有人可以帮帮我吗?我真的很困惑这个政策。谢谢!

最佳答案

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

  • Private 是一种未公开定义的(没有太多内容)

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

  • 私有(private)和公共(public) API 均由 Apple“提供”,但仅提供公共(public) API 供您使用。
  • 私有(private) API 仅供 Apple 使用

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?

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

  • 没有

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?

  • 否(框架不同于应用程序)

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?

  • 通常不会

您需要了解的一点是,在提及私有(private) API 时,您应该只考虑 Apple 提供的私有(private) API。
来自第 3 方的其他 API 是不同的(Apple 不关心,只要第 3 方代码不使用 Apple 私有(private) API)。

关于iphone - 到底什么是私有(private) API,为什么 Apple 会拒绝使用 iOS 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17580251/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com