Want to create a file in a directory IPhone allows users to read and write, then read and write to this file.
I found my path, whether designated as var \ mobile \ or private \ var \ mobile execution of the program did not create the file in the appropriate directory, also tried the document, DCIM and other directories too.
Also according to this test method does not work http://www.cnblogs.com/85538649/archive/2011/12/12/2284539.html.
In addition, the iPhone is not even Applications below the root directory, is hidden, but I can not use iTunes 91 or view hidden directories ah.
I want to know, to achieve my desired function on a non-jailbroken licensed IPhone, what I can read and write files directory?
Reply:
And I called testWrite this program, but can not find the program after installing the file system
Reply:
Please search sandbox view its concept
Reply:
I had GOOGLE sandbox concept in ways that link I gave above is based sandbox, but not OK; And I did that testWrite program, after installation, use iFunxBox or 91 assistants are not found in the file system inside the application . The previous version of the jailbreak is possible
Reply:
I used inside the sandbox method creates an instance of the file, and then fopen it, the results failed to return, and I see the corresponding catalog with 91 assistants did not generate the file
NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory
, NSUserDomainMask
, YES);
NSLog (@ "Get document path:% @", [paths objectAtIndex: 0]);
NSString * fileName = [[paths objectAtIndex: 0] stringByAppendingPathComponent: @ "myFile"];
NSString * content = @ "a";
NSData * contentData = [content dataUsingEncoding: NSASCIIStringEncoding];
if ([contentData writeToFile: fileName atomically: YES]) {
NSLog (@ ">> write ok.");
}
Reply:
NSArray * documentPaths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
NSString * documentDir = [documentPaths objectAtIndex: 0];
NSString * TmpDoc = [NSString stringWithFormat: @ "% @ / Temp", documentDir];
if ([[NSFileManager defaultManager] fileExistsAtPath: TmpDoc] == YES) {
[[NSFileManager defaultManager] removeItemAtPath: TmpDoc error: nil];
}
[[NSFileManager defaultManager] createDirectoryAtPath: TmpDoc withIntermediateDirectories: YES attributes: nil error: nil];
Reply:
When placed in this way upstairs document directory, this is possible, but I need to put the directory system, rather than one specific application directory, this advantage tangled, really bad implementation.
Reply:
/ / NSDictionary and other class has such a method
- (BOOL) writeToFile: (NSString *) path atomically: (BOOL) useAuxiliaryFile;
I have been so used ......
The link you gave does not say, at least incomplete. App can not only access their own sandbox internal directory, you can also visit some of the public directory systems, such as: photo gallery, cloud storage paths.
Reply:
but I need to put the directory system
The system allows people do? Certainly permissible, it can not be allowed.
Reply:
Should be able to escape.
And I understand that the next / Application (cydia installed) can be installed, appstore installed not work.
Reply:
application in this directory / var / mobile / Applications /
Jailbreak iphone can not write your own Applications of Documents directory
Do not see the log with 91, and with the organizer
Reply:
I now have a problem, that is if I'm just an application, it is now possible to read and write their own document file is located under the directory. But I am now an application calls a. A library, the document is in operation. A library carried inside, so how can?
Reply:
This issue is resolved, the previous. A file inside the application process moved inside. But there is a problem, I made a program to send and receive data through the audio port; before the jailbreak version of the IPhone passed, now on trial not Jailbreak IPhone, but found the same process, but the phone volume is maximized From the point of view oscilloscope, the audio signal sent is weak, than in the Jailbreak IPhone send an audio signal is much weaker.
Reply:
You are guaranteed not to do bad things children? I know I will, I do not want to say
Reply:
Of course not, LS's going on if I know how quickly tell me, thank you.
Reply:
I mean is an application that calls a. A library, the document is in operation. A library carried inside, so how can?
This question is very simple, I know.
Reply:
I have a question to ask, the same program, the jailbreak version IPhone4, did not escape the Unicom version IPhone4, Hong Kong Bank IPhone4, are iOS5.01, will not have differences? Jailbreak audio interface for calls only top software there a difference?
Reply:
Reply:
Attention. For the landlord to the top post.
Reply:
Reply:
Reply:
Top, to feel safe in this regard ios developer permission or very little
Reply:
Top, now seemingly on ios security permissions for developers rarely
No comments:
Post a Comment