diff --git a/docs/tutorial/app-nativeresource-ios.md b/docs/tutorial/app-nativeresource-ios.md index 61dc50c96779b29d166de6755e2e7972901dbd82..c546460c458b1bed1417169bfb9997ed918106d6 100644 --- a/docs/tutorial/app-nativeresource-ios.md +++ b/docs/tutorial/app-nativeresource-ios.md @@ -150,7 +150,9 @@ uni-app x项目manifest.json中没有提供iOS隐私信息访问许可描述的 - iOS Property List Key ‘CFBundleURLTypes’,参考:[https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleurltypes/](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleurltypes/) -## 资源文件(Bundle Resources) +## 资源文件(Native Resources) + +### 资源文件配置(Bundle Resources) HBuilderX中对项目右键菜单 "新建" -> "目录" ![](https://native-res.dcloud.net.cn/images/uniapp/nativeresource/newdir.png) @@ -162,6 +164,22 @@ HBuilderX中对项目右键菜单 "新建" -> "目录" 将需要添加的iOS原生资源文件拷贝到Resources目录,云端打包时将会合并到安装包的.app中。 +### UniApp.entitlements 配置 +如上`Bundle Resources`配置类似,在`nativeResources/ios`目录下创建`UniApp.entitlements`节点,UniApp.entitlements 文件配置如下: + +```xml + + + + + com.apple.developer.associated-domains + + applinks:hellouniappx.dcloud.net.cn + + + +``` + **注意** - ios目录下不支持放Object-C/Swift源码文件,需要开发源码建议使用[UTS插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)或[uni原生语言插件](https://nativesupport.dcloud.net.cn/NativePlugin/README) - resources目录中的资源文件不能通过uni API使用,需通过 iOS 原生 API 访问,参考[Accessing a Bundle's Contents](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html#//apple_ref/doc/uid/10000123i-CH1-SW1)。也就是在uni-app中,访问这些资源需要通过uts代码访问或编写[uni原生语言插件](https://nativesupport.dcloud.net.cn/NativePlugin/README)