我正在尝试将文件写入设备的根分区.它是一个Jailbreak应用程序,因此它安装在/ Applications中.使用写入写入根文件系统NSFileManager失败时出现"权限被拒绝"错误.
好像我的应用程序没有以root用户身份运行.它安装在/ Applications中.我的应用程序如何成为root用户?
我们使用iOS私有框架MobileInstallationInstall,它在iOS 5中运行良好,如下所示:
typedef int (*MobileInstallationInstall)(NSString *path, NSDictionary *dict, void *na, NSString *path2_equal_path_maybe_no_use);
int result=pMobileInstallationInstall(ipaPath,[NSDictionary dictionaryWithObject:@"User" forKey:@"ApplicationType"],nil,ipaPath);
Run Code Online (Sandbox Code Playgroud)
但是,在iOS 6中,此方法(pMobileInstallationInstall)始终返回-1.
有人能帮助我吗?非常感谢...