gpt4 book ai didi

ios - 通过 iTunes(或其他?)访问 iOS 应用程序中的 .plist 文件

转载 作者:行者123 更新时间:2023-11-28 23:47:20 36 4
gpt4 key购买 nike

我正在编写一个小应用程序来管理客人名单。为了存储这个列表,我使用了一个 .plist 文件(它是一个数组 -> .plist 很实用。)我希望能够用我的计算机编辑这个文件(我必须用 1000 人或更多人来填充它...... .) 有没有一个解决方案可以让 Mac 访问文件(我想是用 iTunes)? (如定格动画:您可以拍摄在 iTunes 中制作的视频)。

谢谢!

最佳答案

根据 apple doc :

File-Sharing Support
File-sharing support lets apps make user data files available in iTunes 9.1 and later. An app that declares its support for file sharing makes the contents of its /Documents directory available to the user. The user can then move files in and out of this directory as needed from iTunes. This feature does not allow your app to share files with other apps on the same device; that behavior requires the pasteboard or a document interaction controller object.

To enable file sharing for your app, do the following:

  1. Add the UIFileSharingEnabled key to your app’s Info.plist file, and set the value of the key to YES. (The actual key name is "Application supports iTunes file sharing")

  2. Put whatever files you want to share in your app’s Documents directory.

  3. When the device is plugged into the user’s computer, iTunes displays a File Sharing section in the Apps tab of the selected device.

  4. The user can add files to this directory or move files to the desktop.

Apps that support file sharing should be able to recognize when files have been added to the Documents directory and respond appropriately. For example, your app might make the contents of any new files available from its interface. You should never present the user with the list of files in this directory and ask them to decide what to do with those files.

For additional information about the UIFileSharingEnabled key, see Information Property List Key Reference.

关于ios - 通过 iTunes(或其他?)访问 iOS 应用程序中的 .plist 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52448988/

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