plist

Array from iPhone plist

I am trying to get an array from a plist as suggested on an answer here but it's not working. Can someone tell me what I'm missing? Here is what the plist looks like....another weird thing is that I can't get this to open in a plain text file?? when I do it looks like garbage.....but it looks fine in the property list editor: <?xml ver...

Problem writing to a plist

Everything is working fine until I call the saveFile method (shown below) to write the file back to disk, where it crashes. What am I doing wrong? This is part of my viewDidLoad method where I open the file, which works fine. //Get The Path [self initPath]; dictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:accountsFileP...

Is it possible to copy a different plist into the application bundle code wise??

Hello all again. My question is stated above in the title but I'll write it here again Is it possible to copy a different plist into the application bundle code wise?? This is actually a bit related on my previous question ;) http://stackoverflow.com/questions/1125048/create-a-dictionary-property-list-programmatically But since I ca...

plist (property list) file md5sum changes when compiled into iPhone app

I am including a plist file in my iPhone app. It is in binary format (using plutil to convert from xml to binary). I want to run an MD5 checksum (or SHA-1) on it at runtime to confirm its contents are what is expected. Unfortunately, I always get a checksum that's different than what I originally included. After over an hour of assumi...

Trying to grab integer from pre-defined p-list? ObjC/Cocoa

Hello, I'm working on an Objective-C/Cocoa roguelike, because I've always found that working on a game is the best way to learn about a language. I've gotten quite far with my game, but I'm having a problem. Each level.plist is defined with a few things, like so: <key>Save Location</key> <integer>0</integer> It's grabbed like so, I'...

Saving Array to PList from downloaded content in table view on iPhone

I copied these posts from a forum where I posted recently, but got no reply. I have the base for my code all setup, it is a drill down table with navigation controller which loads data into a nsmutabledictionary from a plist with some empty values, on purpose. On command the app then downloads information which is then set, setValue, in...

Save additional information to a plist every time I run the app? (iphone)

My iphone app writes key-value pairs to a dictionary in a plist file. I'm basically saving the user's score when they play the game. This is all fine and dandy, but each time I run the app and get new scores, the new values get saved over the old values. How do I add information to the plist each time the user accesses the app instea...

What can I do with plist files outside of my app?

My iPhone app generates some very nice-looking plist files. I can look at them through xcode 's plist editor and through any plain text editor when I just want the xml. But can I do anything else with this data? I tried importing the xml into a spreadsheet in NeoOffice, but it just showed the plain text. All I'm asking is this: Is t...

iPhone - Change app icon pointed to by info.plist within the application?

Is there any way to change the 47x47 PNG, pointed to within info.plist, for the iPhone springboard icon from within code? I understand I can add a translation and change the springboard icon per language that the iPhone supports via a changed info.plist per language, but I would like to change the springboard icon for my iPhone app base...

Launchd PLIST Not Running

Hi Everyone: I am attempting to run an Applescript inside a launchd plist, but for some reason it just isn't working. It could be that it is my computer, but I am thinking that there may be something else wrong with it. If someone could take a look and comment on this post, I would really appreciate it! <?xml version="1.0" encoding="...

getting active records to display as a plist

I'm trying to get a list of active record results to display as a plist for being consumed by the iphone. I'm using the plist gem v 3.0. My model is called Post. And I want Post.all (or any array or Posts) to display correctly as a Plist. I have it working fine for one Post instance: [http://pastie.org/580902][1] that is correct, wh...

Two executables in one bundle on MAC

Hi, Is it possible to have two executables each with its own plist to share the same bundle. Then depends on the way app is executed (parameters) to load the appropriate executable. Imagine the case where we have a main application (executable with UI) and the mini application (shorter version of the main app also with its own UI) and ...

How can I run com.apple.tools.info-plist-utility ?

I am using XCode to build an iPhone application, where I would like to externally process the info plist file in the same manner as the XCode build step shown below does Processing /Users/kte/Projects/build/Debug-iphonesimulator/TestAppGen.app/Info.plist TestAppGen-Info.plist mkdir /Users/kte/Projects/build/Debug-iphonesimulator/TestApp...

iphone app: should a property list be managed by its own model object?

Hi I am building an iPhone app that has some default data inside it via a property list. This data is the source for my Model. What is the best way to manage this data so the user can read (and in a couple of cases write) data from this plist? I currently am subclassing NSObject and mapping the plist data to properties in that object, ...

How to regenerate an iPhone Xcode info.plist file

I have moved my iPhone app from one machine to another. In the process my info.plist file seems to have a bad bundle identifier and is not working. I want to create an entirely new info.plist file for my project. How can I do this? ...

Plist Array to NSDictionary

I have a plist: <plist version="1.0"> <array> <dict> <key>name</key> <string>Alabama</string> <key>abreviation</key> <string>AL</string> <key>date</key> <string>1819</string> <key>population</key> <string>4,627,851</string> <key>capital</key> <string>Montgomery</string> ...

Error while checking if a file exists

Hi, I'm trying to write to a plist file using writeToFile, before I write I check whether the file exists. This is the code: #import "WindowController.h" @implementation WindowController @synthesize contacts; NSString *filePath; NSFileManager *fileManager; - (IBAction)addContactAction:(id)sender { NSDictionary *dict =[NSDicti...

Problem reading values from .plist downloaded from webserver

Hello everyone. My .plist and code to read it is described in http://pastie.org/605082 NSLog(@"Test %@\n",[test valueForKey:@"FirstName"]); returns NULL and resultsRetrieved is not NULL; What could be wrong? ...

Converting NSNumbers saved in a plist to integers

Saving data: - (NSString *)dataFilePath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return [documentsDirectory stringByAppendingPathComponent:kFilename]; } - (void)applicationWillTerminate:(NSNotification *)notification { NSMu...

count .plist dictionary items (iPhone SDK)

This is what the plist looks like as source code: { authorLastName = Doe; authorFirstName = Jane; imageFilePath = "NoImage.png"; title = "Account Test 1"; year = 2009; }, { authorLastName = Doe; authorFirstName = John; imageFilePath = "NoImage.png"; title = "Account Test 2"; year = 2009; }, How come it isnt in XML format??? ...