指定iOS应用程序安装目录
有没有办法指定iOS应用程序的安装目录? 应用程序应安装在 /var/mobile/Applications/app_directory 中,那么我如何以及在哪里指定此 app_directory?
我相信它应该在 info-plist 中,但我在文档中找不到任何内容。
需要明确的是,我当然想在编译/打包时定义它,我不希望用户在安装时选择目录,这显然不是一个选项。
Is there a way to specify the installation directory for an iOS app?
Apps should be installed in /var/mobile/Applications/app_directory so how and where can I specify this app_directory?
I believe it should be in the info-plist but I can't find anything in the documentation.
To be clear, I would of course like to define this at compile/package-time, I do not want the user to select the directory at install-time which is obviously not an option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,你不能。操作系统将为您命名并创建该目录。
As far as I know, you cannot. The OS will name and create that directory for you.
我同意 Hollance 的观点,你不能更改目录。发生这种情况是因为每个应用程序都将在自己的沙箱文件夹中运行,并且无法访问其他应用程序文件夹。
来自苹果:
“沙箱——所有 iOS 应用程序都放置在沙箱中,以保护系统和其他应用程序。沙箱的结构会影响应用程序文件的放置,并对数据备份和一些应用程序相关功能产生影响。”
应用程序文件夹名称是实际的 UID 名称(而不是实际的应用程序名称)。
您可以在 iPhone 应用程序编程指南中的“应用程序沙箱”下阅读相关内容。
I agree with Hollance, you can not change the directory. This is happening because each app will run in his own sandbox folder and have no access to other applications folders.
From apple:
"Sandboxing—All iOS apps are placed in sandboxes to protect the system and other apps. The structure of the sandbox affects the placement of your app’s files and has implications for data backups and some app-related features."
App folder names are actual UID names (not the actual app name).
You can read about this in the iPhone App Programming Guide under "The Application Sandbox".