如何以编程方式更改iPhone应用程序的默认图标?

如何以编程方式更改iPhone应用程序的默认图标?

问题描述:

我的问题是关于以编程方式更改default icon.png内容。

My question is about changing default icon.png content programmatically.


  1. 我有免费的应用程序图标(里面有精简版/免费字) )

  2. 我在此应用程序内购买应用程序(购买完整版)

  3. 我点击并接受此次购买

  4. 某些应用内容已解锁

  5. 此外,我还希望更改默认的Icon.png(例如将其替换为NON Lite / Free word)

  1. I have free application with Icon (with Lite/Free word inside)
  2. I have In-App purchase inside this app (buy full version)
  3. I click and accept this purchase
  4. Some app content is unlocked
  5. Also, I want my default Icon.png to be changed as well (replace it with NON Lite/Free word inside for example)

我在一些游戏中看到了这种方法,但没有购买它们以查看结果。

I saw this approach in some games but did not buy them to see the results.

您无法在运行时更改应用程序的图标。这是因为它位于应用程序的包中,无法修改。访问应用程序的捆绑包的安全性受到限制。每个软件包都通过Apple开发人员门户网站获得的证书进行代码签名,这证明了这一条件。

You cannot change the application's icon at runtime. This is because it is in the application's bundle, which cannot be modified. Access to the application's bundle is restricted for security. Each bundle is code-signed by a certificate obtained through Apple's developer portal, which guarantees this condition.

总之,应用程序包中的任何文件,如图标,或者Info.plist文件,无法更改。

To conclude, any files inside the application's bundle, like icons, or the Info.plist file, cannot be changed.