简体   繁体   English

我如何获得iOS的“〜/应用程序”的访问权限?

[英]How i can get access for '~/Applications' of iOS?

I'm trying to enter to this folder using: 我正在尝试使用以下命令进入此文件夹:

import os  
location=os.chdir('/Applications')  
for file in os.listdir(location):  
     print(file)

RETURN: 'Opesation not permitted' 返回值:“不允许操作”

When i run this, in the pythonista app, appears an alert message 当我运行它时,在pythonista应用程序中,出现警告消息

But when alternately i run it but with the base root file directory, it pritns me all folders 但是当我交替运行它但使用基本根文件目录时,它会将我的所有文件夹

import os  
location=os.chdir('/')  
for file in os.listdir(location):
    print(file)

RETURN: .file .mb Applications Developer Library System bin cores dev etc private sbin tmp usr var 返回:.file .mb应用程序开发人员库系统bin核心dev等私有sbin tmp usr var

You cannot do it. 你做不到。 source 资源

For security purposes, an iOS app's interactions with the file system are limited to the directories inside the app's sandbox directory. 为了安全起见,iOS应用程序与文件系统的交互仅限于应用程序的沙箱目录中的目录。

You should have access only to certain folders 您应该只能访问某些文件夹

During installation of a new app, the installer creates a number of container directories for the app inside the sandbox directory. 在安装新应用程序期间,安装程序会在沙箱目录内为该应用程序创建许多容器目录。 Each container directory has a specific role. 每个容器目录都有特定的角色。

This is your only working area 这是您唯一的工作区域

iOS apps always run in a sandbox iOS应用程序始终在沙箱中运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM