¡@

Home 

2014/10/15 ¤U¤È 10:07:20

iphone Programming Glossary: documents

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

edited object using KVC. #define DOCUMENTS_FOLDER NSHomeDirectory stringByAppendingPathComponent @ Documents void startRecording UIBarButtonItem stopButton UIBarButtonItem alloc initWithTitle @ Stop style UIBarButtonItemStyleBordered..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

share improve this question There are three kinds of writable paths to consider the first is Documents where you store things you want to keep and make available to the user through iTunes as of 3.2 NSArray.. YES NSString documentsDirectory paths objectAtIndex 0 Secondly and very similar to the Documents directory there is the Library folder where you store configuration files and writable databases that.. to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support of user documents. Last..

What's the best way to find the user's Documents directory on an iPhone?

http://stackoverflow.com/questions/272544/whats-the-best-way-to-find-the-users-documents-directory-on-an-iphone

the best way to find the user's Documents directory on an iPhone I'm reading Erica Sadun's iPhone Developer's Cookbook and ran into a question... Developer's Cookbook and ran into a question. She says in the book that the way to find the user's Documents directory is with the code NSHomeDirectory stringByAppendingPathComponent @ Documents but that seems.. the user's Documents directory is with the code NSHomeDirectory stringByAppendingPathComponent @ Documents but that seems slightly brittle and dissimiliar to the normal Mac way of doing it which would be NSSearchPathForDirectoriesInDomains..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

method. It appears that files loaded in this manner from Mail are copied into your application's Documents directory under a subdirectory corresponding to what email box they arrived in. You can get the URL..

iPhone Unzip code

http://stackoverflow.com/questions/412982/iphone-unzip-code

you Tony void loadView NSString DOCUMENTS_FOLDER NSHomeDirectory stringByAppendingPathComponent @ Documents NSString path DOCUMENTS_FOLDER stringByAppendingPathComponent @ sample.zip NSString unzipeddest DOCUMENTS_FOLDER..

Write a file on iOS

http://stackoverflow.com/questions/5619719/write-a-file-on-ios

Your code is working at my end i have just tested it. Where are you checking your changes Use Documents directory path. To get path NSLog @ @ documentsDirectory and copy path from console and then open finder..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

URLForUbiquityContainerIdentifier nil NSURL ubiquitousPackage ubiq URLByAppendingPathComponent @ Documents URLByAppendingPathComponent @ text.txt MyTextDocument doc MyTextDocument alloc initWithFileURL ubiquitousPackage.. init _query query SCOPE query setSearchScopes NSArray arrayWithObject NSMetadataQueryUbiquitousDocumentsScope PREDICATE NSPredicate pred NSPredicate predicateWithFormat @ K @ NSMetadataItemFSNameKey @ text.txt.. resignFirstResponder void noteDocumentContentsUpdated MyTextDocument noteDocument NSLog @ VC noteDocumentsUpdated _textView.text noteDocument.documentText void textViewDidChange UITextView theTextView NSLog..

Reading ePub format

http://stackoverflow.com/questions/1388467/reading-epub-format

create a view with a UIWebView 2 download the EPUB file 3 unzip it to a subdirectory in your app's documents folder using the zip library linked above 4 parse the XML file at META INF container.xml if this file..

Custom animation for pushing a UIViewController

http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller

100 220 380 during the animation to full screen. Any suggestions where to start respectively any documents tutorials links Alright. I could make the expand animation with the following code if coming.view superview..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

paths NSSearchPathForDirectoriesInDomains NSDocumentDirectory NSUserDomainMask YES NSString documentsDirectory paths objectAtIndex 0 Secondly and very similar to the Documents directory there is the Library.. Also the user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support.. Documents today you are fine as long as you change location when updating for support of user documents. Last there is a cache directory where you can put images that you don't care exist for the long term..

Remove HTML Tags from an NSString on the iPhone

http://stackoverflow.com/questions/277055/remove-html-tags-from-an-nsstring-on-the-iphone

support NSAttributedString or NSXMLDocument. There are too many edge cases and malformed HTML documents for me to feel comfortable using regex or NSScanner. Does anyone have a solution to this One suggestion..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

types and any application that uses a document controller can hand off processing of these documents to your own application. For example my application Molecules for which the source code is available.. will be used as icons for the supported types in Mail and other applications capable of showing documents. The LSItemContentTypes key lets you provide an array of Uniform Type Identifiers UTIs that your application.. to the MIME type chemical x pdb . With this in place your application will be able to handle documents attached to emails or from other applications on the system. In Mail you can tap and hold to bring up..

iVar property, access via self?

http://stackoverflow.com/questions/4088801/ivar-property-access-via-self

@ a rather than thisValue @ a However with the example below I can see that adding self documents that I am sending a message to an iVar property rather than a locally scoped variable but does it do..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

separate functions for non iCloud users I.e. functions in which I simply load a text.txt from the documents folder Apple writes Treat files in iCloud the same way you treat all other files in your app sandbox...

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

done I save the recorded audio as NSData in the currently edited object using KVC. #define DOCUMENTS_FOLDER NSHomeDirectory stringByAppendingPathComponent @ Documents void startRecording UIBarButtonItem stopButton UIBarButtonItem alloc initWithTitle @ Stop style UIBarButtonItemStyleBordered target self action @selector stopRecording..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

allowed to write into specific locations. iphone filesystems share improve this question There are three kinds of writable paths to consider the first is Documents where you store things you want to keep and make available to the user through iTunes as of 3.2 NSArray paths NSSearchPathForDirectoriesInDomains NSDocumentDirectory.. NSDocumentDirectory NSUserDomainMask YES NSString documentsDirectory paths objectAtIndex 0 Secondly and very similar to the Documents directory there is the Library folder where you store configuration files and writable databases that you also want to keep around but you don't want the user to.. if you are still doing that . Also the user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support of user documents. Last there is a cache directory where you can put images that you..

What's the best way to find the user's Documents directory on an iPhone?

http://stackoverflow.com/questions/272544/whats-the-best-way-to-find-the-users-documents-directory-on-an-iphone

the best way to find the user's Documents directory on an iPhone I'm reading Erica Sadun's iPhone Developer's Cookbook and ran into a question. She says in the book that the way to find the user's Documents.. directory on an iPhone I'm reading Erica Sadun's iPhone Developer's Cookbook and ran into a question. She says in the book that the way to find the user's Documents directory is with the code NSHomeDirectory stringByAppendingPathComponent @ Documents but that seems slightly brittle and dissimiliar to the normal Mac way of doing.. into a question. She says in the book that the way to find the user's Documents directory is with the code NSHomeDirectory stringByAppendingPathComponent @ Documents but that seems slightly brittle and dissimiliar to the normal Mac way of doing it which would be NSSearchPathForDirectoriesInDomains NSDocumentsDirectory NSUserDomainMask..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

didFinishLaunchingWithOptions application delegate method. It appears that files loaded in this manner from Mail are copied into your application's Documents directory under a subdirectory corresponding to what email box they arrived in. You can get the URL for this file within the application delegate method using code..

iPhone Unzip code

http://stackoverflow.com/questions/412982/iphone-unzip-code

grateful is someone has an example or any pointers. Thanking you Tony void loadView NSString DOCUMENTS_FOLDER NSHomeDirectory stringByAppendingPathComponent @ Documents NSString path DOCUMENTS_FOLDER stringByAppendingPathComponent @ sample.zip NSString unzipeddest DOCUMENTS_FOLDER stringByAppendingPathComponent @ test.txt gzFile..

Write a file on iOS

http://stackoverflow.com/questions/5619719/write-a-file-on-ios

resources. iphone file nsbundle share improve this question Your code is working at my end i have just tested it. Where are you checking your changes Use Documents directory path. To get path NSLog @ @ documentsDirectory and copy path from console and then open finder and press Cmd shift g and paste path here and then open..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

not found in iCloud. NSURL ubiq NSFileManager defaultManager URLForUbiquityContainerIdentifier nil NSURL ubiquitousPackage ubiq URLByAppendingPathComponent @ Documents URLByAppendingPathComponent @ text.txt MyTextDocument doc MyTextDocument alloc initWithFileURL ubiquitousPackage _document doc doc.delegate self.viewController.. in the cloud NSMetadataQuery query NSMetadataQuery alloc init _query query SCOPE query setSearchScopes NSArray arrayWithObject NSMetadataQueryUbiquitousDocumentsScope PREDICATE NSPredicate pred NSPredicate predicateWithFormat @ K @ NSMetadataItemFSNameKey @ text.txt query setPredicate pred FINISHED NSNotificationCenter defaultCenter.. _document IBAction dismissKeyboard id sender _textView resignFirstResponder void noteDocumentContentsUpdated MyTextDocument noteDocument NSLog @ VC noteDocumentsUpdated _textView.text noteDocument.documentText void textViewDidChange UITextView theTextView NSLog @ VC textViewDidChange _document.documentText theTextView.text..

Reading ePub format

http://stackoverflow.com/questions/1388467/reading-epub-format

for now. Here's a high level step by step for your code 1 create a view with a UIWebView 2 download the EPUB file 3 unzip it to a subdirectory in your app's documents folder using the zip library linked above 4 parse the XML file at META INF container.xml if this file doesn't exist the EPUB is invalid using TBXML linked above..

Custom animation for pushing a UIViewController

http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller

the new view expands from a given rectangle lets say 100 100 220 380 during the animation to full screen. Any suggestions where to start respectively any documents tutorials links Alright. I could make the expand animation with the following code if coming.view superview nil self.view addSubview coming.view coming.view.frame..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

and make available to the user through iTunes as of 3.2 NSArray paths NSSearchPathForDirectoriesInDomains NSDocumentDirectory NSUserDomainMask YES NSString documentsDirectory paths objectAtIndex 0 Secondly and very similar to the Documents directory there is the Library folder where you store configuration files and writable.. targeting 3.0 or even earlier if you are still doing that . Also the user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support of user documents. Last there is a cache directory where.. an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support of user documents. Last there is a cache directory where you can put images that you don't care exist for the long term or not the phone may delete them at some point NSArray paths..

Remove HTML Tags from an NSString on the iPhone

http://stackoverflow.com/questions/277055/remove-html-tags-from-an-nsstring-on-the-iphone

an XSLT transform that does it. Unfortunately the iPhone doesn't support NSAttributedString or NSXMLDocument. There are too many edge cases and malformed HTML documents for me to feel comfortable using regex or NSScanner. Does anyone have a solution to this One suggestion has been to simply look for opening and closing tag characters..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

You can register your application to handle particular document types and any application that uses a document controller can hand off processing of these documents to your own application. For example my application Molecules for which the source code is available handles the .pdb and .pdb.gz file types if received via email.. archive string array dict array Two images are provided that will be used as icons for the supported types in Mail and other applications capable of showing documents. The LSItemContentTypes key lets you provide an array of Uniform Type Identifiers UTIs that your application can open. For a list of system defined UTIs see Apple's.. UTI with the .pdb file extension corresponding to the MIME type chemical x pdb . With this in place your application will be able to handle documents attached to emails or from other applications on the system. In Mail you can tap and hold to bring up a list of applications that can open a particular attachment...

iVar property, access via self?

http://stackoverflow.com/questions/4088801/ivar-property-access-via-self

getter methods for properties I should be using self setThisValue @ a rather than thisValue @ a However with the example below I can see that adding self documents that I am sending a message to an iVar property rather than a locally scoped variable but does it do anything else in this case @interface CustomController UIViewController..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

my text app Or do I simply ignore them Would I need to write separate functions for non iCloud users I.e. functions in which I simply load a text.txt from the documents folder Apple writes Treat files in iCloud the same way you treat all other files in your app sandbox. However in my case there is no 'normal' app sandbox anymore...

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

in the currently edited object using KVC. #define DOCUMENTS_FOLDER NSHomeDirectory stringByAppendingPathComponent @ Documents void startRecording UIBarButtonItem stopButton UIBarButtonItem alloc initWithTitle @ Stop style UIBarButtonItemStyleBordered..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

iphone filesystems share improve this question There are three kinds of writable paths to consider the first is Documents where you store things you want to keep and make available to the user through iTunes as of 3.2 NSArray paths NSSearchPathForDirectoriesInDomains.. NSUserDomainMask YES NSString documentsDirectory paths objectAtIndex 0 Secondly and very similar to the Documents directory there is the Library folder where you store configuration files and writable databases that you also want to keep.. user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support of user documents. Last there is a cache directory..

Calculate the size of a folder

http://stackoverflow.com/questions/2188469/calculate-the-size-of-a-folder

the size of a folder Just a quick one... I'm creating a folder to cache images inside Documents with my iPhone App. I want to be able to keep the size of this folder down to 1MB so I need to to check the size in bytes..

What's the best way to find the user's Documents directory on an iPhone?

http://stackoverflow.com/questions/272544/whats-the-best-way-to-find-the-users-documents-directory-on-an-iphone

the best way to find the user's Documents directory on an iPhone I'm reading Erica Sadun's iPhone Developer's Cookbook and ran into a question. She says in the book.. Sadun's iPhone Developer's Cookbook and ran into a question. She says in the book that the way to find the user's Documents directory is with the code NSHomeDirectory stringByAppendingPathComponent @ Documents but that seems slightly brittle and.. that the way to find the user's Documents directory is with the code NSHomeDirectory stringByAppendingPathComponent @ Documents but that seems slightly brittle and dissimiliar to the normal Mac way of doing it which would be NSSearchPathForDirectoriesInDomains..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

application delegate method. It appears that files loaded in this manner from Mail are copied into your application's Documents directory under a subdirectory corresponding to what email box they arrived in. You can get the URL for this file within..

iPhone Unzip code

http://stackoverflow.com/questions/412982/iphone-unzip-code

pointers. Thanking you Tony void loadView NSString DOCUMENTS_FOLDER NSHomeDirectory stringByAppendingPathComponent @ Documents NSString path DOCUMENTS_FOLDER stringByAppendingPathComponent @ sample.zip NSString unzipeddest DOCUMENTS_FOLDER stringByAppendingPathComponent..

Save Youtube video to iPhone in the app

http://stackoverflow.com/questions/5087249/save-youtube-video-to-iphone-in-the-app

an NSOutputStream or NSFileHandle opened on a temporary file in NSTemporaryDirectory or a temp named file in your Documents directory . Set up your progress bar and whatever else you need to do. Allocate and start an NSURLConnection to fetch the..

Creating a JSON Store For iPhone

http://stackoverflow.com/questions/5237943/creating-a-json-store-for-iphone

volatile and therefore not cached locally for very long . The JSON is deeply hierarchal with tons of nested objects . Documents usually contain no more than 20 top level items but could be up to 100K. I don't think I want to create a Core Data model..

Write a file on iOS

http://stackoverflow.com/questions/5619719/write-a-file-on-ios

improve this question Your code is working at my end i have just tested it. Where are you checking your changes Use Documents directory path. To get path NSLog @ @ documentsDirectory and copy path from console and then open finder and press Cmd shift..

Save An Image To Application Documents Folder From UIView On IOS

http://stackoverflow.com/questions/6821517/save-an-image-to-application-documents-folder-from-uiview-on-ios

An Image To Application Documents Folder From UIView On IOS I have a UIImageView that allows a user to place and hold an image until it can be saved. The..

Where would you place your SQLite database file in an iPhone app?

http://stackoverflow.com/questions/717108/where-would-you-place-your-sqlite-database-file-in-an-iphone-app

delegates appDidFinishLaunching method. Creates a writable copy of the bundled default database in the application Documents directory. void createEditableCopyOfDatabaseIfNeeded First test for existence. BOOL success NSFileManager fileManager NSFileManager..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

defaultManager URLForUbiquityContainerIdentifier nil NSURL ubiquitousPackage ubiq URLByAppendingPathComponent @ Documents URLByAppendingPathComponent @ text.txt MyTextDocument doc MyTextDocument alloc initWithFileURL ubiquitousPackage _document.. NSMetadataQuery alloc init _query query SCOPE query setSearchScopes NSArray arrayWithObject NSMetadataQueryUbiquitousDocumentsScope PREDICATE NSPredicate pred NSPredicate predicateWithFormat @ K @ NSMetadataItemFSNameKey @ text.txt query setPredicate.. id sender _textView resignFirstResponder void noteDocumentContentsUpdated MyTextDocument noteDocument NSLog @ VC noteDocumentsUpdated _textView.text noteDocument.documentText void textViewDidChange UITextView theTextView NSLog @ VC textViewDidChange..

How to share or post by mail, twitter and facebook from the current application?

http://stackoverflow.com/questions/10860652/how-to-share-or-post-by-mail-twitter-and-facebook-from-the-current-application

1. For Facebook. FBGraph is a much better way to use the Facebook API in your application. Download the FBGraph API documents folder and then add it to in your folder. Read the instructions on the Facebook developer site . This is the sample code..

Reading ePub format

http://stackoverflow.com/questions/1388467/reading-epub-format

for your code 1 create a view with a UIWebView 2 download the EPUB file 3 unzip it to a subdirectory in your app's documents folder using the zip library linked above 4 parse the XML file at META INF container.xml if this file doesn't exist the..

Custom animation for pushing a UIViewController

http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller

lets say 100 100 220 380 during the animation to full screen. Any suggestions where to start respectively any documents tutorials links Alright. I could make the expand animation with the following code if coming.view superview nil self.view..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

iTunes as of 3.2 NSArray paths NSSearchPathForDirectoriesInDomains NSDocumentDirectory NSUserDomainMask YES NSString documentsDirectory paths objectAtIndex 0 Secondly and very similar to the Documents directory there is the Library folder where you.. still doing that . Also the user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long as you change location when updating for support of user documents... so if you are using Documents today you are fine as long as you change location when updating for support of user documents. Last there is a cache directory where you can put images that you don't care exist for the long term or not the phone may..

Remove HTML Tags from an NSString on the iPhone

http://stackoverflow.com/questions/277055/remove-html-tags-from-an-nsstring-on-the-iphone

the iPhone doesn't support NSAttributedString or NSXMLDocument. There are too many edge cases and malformed HTML documents for me to feel comfortable using regex or NSScanner. Does anyone have a solution to this One suggestion has been to simply..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

handle particular document types and any application that uses a document controller can hand off processing of these documents to your own application. For example my application Molecules for which the source code is available handles the .pdb and.. are provided that will be used as icons for the supported types in Mail and other applications capable of showing documents. The LSItemContentTypes key lets you provide an array of Uniform Type Identifiers UTIs that your application can open. For.. extension corresponding to the MIME type chemical x pdb . With this in place your application will be able to handle documents attached to emails or from other applications on the system. In Mail you can tap and hold to bring up a list of applications..

iPhone Development - XMLParser vs. libxml2 vs. TouchXML

http://stackoverflow.com/questions/406811/iphone-development-xmlparser-vs-libxml2-vs-touchxml

events such as starting an xml node finding attributes etc . This type of XML processing is best for parsing huge documents and when you only need to retrieve a tiny amount of data from a big file. In contrast to SAX is the DOM model where the..

iVar property, access via self?

http://stackoverflow.com/questions/4088801/ivar-property-access-via-self

be using self setThisValue @ a rather than thisValue @ a However with the example below I can see that adding self documents that I am sending a message to an iVar property rather than a locally scoped variable but does it do anything else in this..

Event handling for iOS - how hitTest:withEvent: and pointInside:withEvent: are related?

http://stackoverflow.com/questions/4961386/event-handling-for-ios-how-hittestwithevent-and-pointinsidewithevent-are-r

handling for iOS how hitTest withEvent and pointInside withEvent are related While most apple documents are very well written I think ' Event Handling Guide for iOS ' is an exception. It's hard for me to clearly understand what's.. improve this question It seems quite a basic question. But I agree with you the document is not as clear as other documents so here is my answer. The implementation of hitTest withEvent in UIResponder does the following It calls pointInside withEvent..

Save Youtube video to iPhone in the app

http://stackoverflow.com/questions/5087249/save-youtube-video-to-iphone-in-the-app

again can't play offline load video at home to watch on the road Does anyone have code to download Youtube video to documents folder and show progress of download play downloaded video by loading file from documents folder meaning even when not connected.. to download Youtube video to documents folder and show progress of download play downloaded video by loading file from documents folder meaning even when not connected to the internet iphone objective c youtube offline mode share improve this question..

Save An Image To Application Documents Folder From UIView On IOS

http://stackoverflow.com/questions/6821517/save-an-image-to-application-documents-folder-from-uiview-on-ios

to restrain myself. I'd like to be able to save the image the user places into the UIImageView in the application's documents folder and then be able to retrieve it and place it in another UIImageView for display when the user pushes that view onto.. write it to a file NSArray paths NSSearchPathForDirectoriesInDomains NSDocumentDirectory NSUserDomainMask YES NSString documentsPath paths objectAtIndex 0 Get the docs directory NSString filePath documentsPath stringByAppendingPathComponent @ image.png.. NSUserDomainMask YES NSString documentsPath paths objectAtIndex 0 Get the docs directory NSString filePath documentsPath stringByAppendingPathComponent @ image.png Add the file name pngData writeToFile filePath atomically YES Write the file..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

I need to write separate functions for non iCloud users I.e. functions in which I simply load a text.txt from the documents folder Apple writes Treat files in iCloud the same way you treat all other files in your app sandbox. However in my case..