我遇到了一个令人困惑的问题。我使用 Testflight 进行临时分发,与一些测试人员一起测试我的构建。我的应用程序利用文档目录来存储用相机或照片库拍摄的图像。
我遇到的问题是,每次我从 Testflight 安装临时版本时,它都会更改文档目录的应用程序 ID 部分。
ie
/var/mobile/Applications/{APPID}/Documents/
安装新的临时版本后, 有所不同。如果我从 Testflight 重新安装相同的版本,它也会发生变化。我的理解是这应该是一致的——这是不正确的吗?
I've come up against a confusing issue. I'm using Testflight for ad hoc distribution to test my build with a few testers. My app makes use of the documents directory to store images taken with the camera or from the photo library.
The problem I have is that every time I install an ad hoc build from Testflight, it changes the app id part of the documents directory.
ie
/var/mobile/Applications/{APPID}/Documents/
is different after installing a new ad hoc build. It also changes if I reinstall the same build from Testflight. It was my understanding that this should be consistent - is this not correct?
发布评论
评论(1)
开发人员无法控制安装应用程序时使用的 appid,因此您永远不应该相信它是一致的。相反,请动态询问默认文件管理器的文档目录:
The developer does not have control over what appid is used when the app is installed, so you should never trust it to be consistent. Instead ask the default file manager for the document directory on the fly: