开发者

iPhone filesystem permissions POSIX-compliant?

开发者 https://www.devze.com 2022-12-27 09:34 出处:网络
I\'m trying to pass some files from one app to another. I communicate the path (via a custom URL). The target application cannot read the file, citing errno 13 (permission denied).

I'm trying to pass some files from one app to another. I communicate the path (via a custom URL). The target application cannot read the file, citing errno 13 (permission denied).

I've checked the permissions on file - they're 0644 (O+R), the permissions on directories al开发者_运维问答l the way up to the root are 755 (O+RX). From a POSIX perspective, the file should be readable to any process and any user. Yet it's not. Any ideas, please?

I can think of some workarounds. I could use a Web service (upload, get a cookie, communicate the cookie to the other app, other app downloads). I could also pass the actual file data in the URL - unelegant, and probably subject to length limitations. Clipboard is not supported on iPhone OS 2 IIRC.


The iPhone sandboxes applications. Two applications cannot share files this way. An application can only read and write files from specific directories granted it by the sandbox.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号