|Apr 29, 2013, 10:40 AM||#3|
I don't understand the Core Foundation part of the question. But in Cocoa, it's:
NSString *myWonderfulString = [NSString stringWithContentsOfFile:[NSBundle mainBundle] pathForResource:@"MyAwesomeFile" ofType:@"plist"]];
iMac 21.5", 3.06GHz, 4 GB, 2 TB HD.
iPod Touch 3G.
|Apr 29, 2013, 02:37 PM||#4|
CFStringRef and NSString* have a "toll free bridge" meaning changing from one to the other involves nothing more than a cast.
Just use the method PatrickCocoa suggested above and cast to a CFStringRef to store the contents in Core Foundation.
|Apr 30, 2013, 06:59 AM||#6|
|Apr 30, 2013, 09:34 AM||#7|
Note that it can be done with CoreFoundation, it's just more work and more error prone. Have you looked at Apple's CFString reference? If so what exactly is it you are having problems with, there are a handful of functions for converting a buffer to a CFString depending on encoding and other things.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|File list to Excel - Exporting folder contents!||giorgtrig||Mac Applications and Mac App Store||2||Oct 6, 2014 10:30 AM|
|File Path String Editing Tool?||willcapellaro||Mac Programming||11||Feb 4, 2014 01:58 AM|
|iTunes cannot read the contents of this phone||0xyMoron||iOS 6||2||Sep 28, 2013 02:35 AM|
|File rename based on file contents--possible?||Brutalbrutus||Mac Basics and Help||2||Jul 17, 2012 05:57 AM|
|iTunes cannot read contents of my iPhone 4S! Help!||guspasho||iPhone Tips, Help and Troubleshooting||0||Jun 13, 2012 06:33 PM|
All times are GMT -5. The time now is 04:49 AM.