PDA

View Full Version : Dynamically need this action




arnieterm
Nov 21, 2008, 06:55 AM
Is it possible to dynamically create files with our own Iphone application directory like say creating a .txt file in my Iphone app directory?
Do I have to use NSFileHandle for it or what another api from IPhone SDK is needed for this purpose?
If we cannot create within our own app directory then at what location can this be done?
Any idea? :-(



robbieduncan
Nov 21, 2008, 07:16 AM
No, any alteration to the application bundle will cause it's signature to change and the iPhone will then refuse to run the app. This is the point of the codesigning...

Edit: but each app does have a writeable area of filesystem space, outside the app bundle, that you can use as is described in the documentation.

arnieterm
Nov 21, 2008, 08:08 AM
Thanks for the reply
Please provide a sample code/hint that does a write to the writeable area that you are pointing to
Thanks

robbieduncan
Nov 21, 2008, 08:13 AM
Thanks for the reply
Please provide a sample code/hint that does a write to the writeable area that you are pointing to
Thanks

It's in the documentation. I suggest you read it. It's covered in the iPhone Application Programming Guide. You should have read and understood this entire document before starting any iPhone application.

dejo
Nov 21, 2008, 09:16 AM
You should have read and understood this entire document before starting any iPhone application.
Ah, crap. I gotta understand it too!? ;)

arnieterm
Dec 24, 2008, 04:51 AM
Thanks for the reply
Please provide a sample code/hint that does a write to the writeable area that you are pointing to
Thanks
:cool: