gpt4 book ai didi

c# - 在 Xamarin Forms iOS 应用程序中访问共享存储位置

转载 作者:行者123 更新时间:2023-11-29 12:03:52 24 4
gpt4 key购买 nike

是否可以在Xamarin Forms应用程序中访问使用应用程序组的存储位置?我已经看到了从 Xamarin iOS 应用程序访问相同内容的引用。引用:https://developer.xamarin.com/guides/ios/watch/working-with/app-groups/

无法在表单应用中找到该选项。在 Xamarain Forms 应用程序属性窗口中看不到启用应用程序组的规定。

对此有任何帮助。

最佳答案

使用 App Groups 是特定于 iOS 的平台,因此在代码方面您需要使用依赖服务:

https://developer.xamarin.com/guides/xamarin-forms/dependency-service/

要启用应用程序组,您需要在 iOS 项目 中打开 Entitlements.plist 文件,而不是共享/PCL 项目 - 同样,这是因为它是一个平台特定功能。

关于c# - 在 Xamarin Forms iOS 应用程序中访问共享存储位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35769495/

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