# 准备应用程序进行应用内购

> Set up a Unity application for downloadable content and in-app purchases.

应用内购 (IAP) 允许您在应用程序中提供额外的可下载内容，例如新关卡或角色外观。在设置应用内购之前，必须通过[原生代码插件](/engine/6000.0/manual/scripting/compilation-and-code-reload/plug-ins.md)将 StoreKit API 集成到你的应用程序中。有关更多信息，请参阅 [StoreKit](https://developer.apple.com/documentation/storekit) (Apple)。

**注意**：[Unity IAP 包](https://docs.unity3d.com/Packages/com.unity.purchasing@latest)可用于实现 iOS 以及其他目标平台的应用内购功能。

## 组织资源##organize-your-assets

[Addressables](https://docs.unity3d.com/Packages/com.unity.addressables@latest/) 包提供了一套现成的系统，用于管理和组织项目中的 [AssetBundle](/engine/6000.0/manual/working-in-unity/assets-and-media/asset-workflow/asset-bundles-intro.md)。建议使用 Addressables 包，而不是手动管理 AssetBundle。

## 下载资源##download-your-assets

如果您手动管理 AssetBundle，建议使用 [UnityWebRequest](/engine/6000.0/manual/scripting/object-oriented-development/web-request.md) 访问远程资源。如果使用 [Addressables](https://docs.unity3d.com/Packages/com.unity.addressables@latest/) 包，则会自动处理资产下载。

**注意**：Apple 可能会更改允许写入数据的文件夹路径。请务必查看最新的 Apple 指南，以获取最新信息。

## 其他资源##additional-resources

* [StoreKit](https://developer.apple.com/documentation/storekit) (Apple)
* [Unity IAP 包](https://docs.unity3d.com/Packages/com.unity.purchasing@4.11/manual/Overview.html)
* [可寻址资源](https://docs.unity3d.com/Packages/com.unity.addressables@latest/)
* [AssetBundle](/engine/6000.0/manual/working-in-unity/assets-and-media/asset-workflow/asset-bundles-intro.md)
