plist

NSBundle, plist and other resources in an Obj-c Static Library

I've created a static library in Xcode, which I am able to successfully use in other projects. However, with resources like plists, I find I must include any plists referenced in my library in the main project where the project is used. In my static library project, I have my plist included in the "Copy Bundle Resources" phase of the ta...

Extract or show some dictionaries for sequenced TableView

In a Tabbar app, I have a TableView to show all names of each dictionary of an array coming from an array like this : <array> <dict> <key>Name</key> <string>Name1</string> <key>CategoryA</key> <string>CategoryA1</string> <key>CategoryB</key> <string>CategoryB4</string> <key>CategoryC</key> <string>CategoryC8</string> </dict> <di...

Changing Data in a Plist

Hey, alright so I have a .plist that looks like; <plist version="1.0"> <dict> <key>Item 0</key> <dict> <key>Name</key> <string>Jero</string> <key>Initiative</key> <integer>0</integer> <key>EditThis</key> <false/> </dict> </dict> </plist> In the app I have it so that when one of the rows (The data is put in a UITableView) is ...

How to extract the second record from my plist?

I have a sample database file called albums.plist It is structured as below (very simple layout). I am new to Objective-C programming and would learn a lot if someone is able to help me figure this out. What I would like to do programatically is parse this database and for example, show on screen for example, the second albums details ...

iPhone plist file versions... Adding keys sometimes does not work.

I created an iPhone project using the Core Data template. Now when I try to change my plist file to "Status bar is initially hidden = YES" I can't find that key in my options. Instead I find a lot of keys that are relevant to Core Data, keys that I've never seen before. Anyway, I add the key "Status bar is initially hidden" myself and s...

Plist works in simulator but not on device

Is there any reason that data pulled in from a plist will show in the simulator but not on my test device? Worked all day on making it work and was thrilled until I tested it on the actual device. Strange. Thanks. ...

Copying plist file to custom folder in ApplicationSupport (Objective-C)

I have this piece of code, which copies a plist file to the ApplicationSupport directory in the users folder. NSString *resourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:kAutonumberPlist]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); ...

Plist Hierarchy and 'All' Option

I have a string of data in a plist, which I've got to display, hierarchically like this: Menu>Chapter>SubChapter>item>item details This might be super simple, in my initial menu, how would I have all 'All' Menu item to display all the 'items', essentially skipping the chapter and subchapter and cutting out that aspect of my filter, whi...

"plist" doesn't load from iPhone unit-test class

I'm trying to unit-test code for loading and querying data from plist file. I'm loading data with code: NSString *path = [[NSBundle mainBundle] pathForResource:@"availableshops" ofType:@"plist"]; NSArray *arrayOfShops = [[NSArray alloc] initWithContentsOfFile:path]; When testing app in simulator and on the device everything work. BUT ...

How to read OSX .plist files from Java?

How to read OSX .plist files from Java? Thank you in advance! ...

How to pass a .plist file with php?

Can i pass a plist file with php and kind of get it into an array, like the $_POST[''] so i could call $_POST['body'] and get the string that has the <key> body ? ...

What is the use of plist ?

In my application i am using a plist. please anyone explain what are the uses of plist with an example or a sample code? ...

plist bundle version values

I want to set the Bundle Version in my plist. However, it appears that the value that is actually LOOKED at by finder to put the version when you look at more info is "bundle versions string, short" Editing this, however, requires opening the plist file, rather than just editing the "version" in the target settings. Is there a way to ei...

Restore Backlight To Previous Level, iPhone

Hi there, I was working on my app recently and wanted to change the brightness of the backlight. I then wanted to restore the backlight level to it's original setting on exiting the app. Here is the code: #include "GraphicsServices.h" - (void) viewWillAppear:(BOOL)animated { NSNumber* bl = (NSNumber*) CFPreferencesCopyAppValue(CFSTR(...

NSURL not returning value for Plist example

pListURL returns nil on my code, but not the example. The I copied and pasted the method: (taken from http://samsoff.es/post/iphone-plist-tutorial/) (void)viewDidLoad { NSURL *plistURL = [NSURL URLWithString:@"http://samsoffes.github.com/iphone-plist/HelloWorld.plist"]; *dictionary = [NSDictionary dictionaryWithContentsOfURL:plistUR...

How to add an extra plist property using CMake?

I'm trying to add the item <key>UIStatusBarHidden</key><true/> to my plist that's auto-generated by CMake. For certain keys, it appears there are pre-defined ways to add an item; for example: set(MACOSX_BUNDLE_ICON_FILE ${ICON}) But I can't find a way to add an arbitrary property. I tried using the MACOSX_BUNDLE_INFO_PLIST target ...

Use a Plist dictionary for App settings

I want to be able to use a plist for settings Im implementing in my app. I want a dictionary "Settings" to hold my arrays, such as "Debug", "Option 1", Option 2", etc. How would I access "Debug"array under the "Settings" dictionary? This is what my code looks like: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirect...

i have obtained the dictionary from json response and now i want to add this dictionary to my existing plist

i have obtained a jason response and it is further stored in a dictionary now i want to add this dictionary t my plist ,so that the plist can take values against entries from json response .how should i do it . ...

Copying JSON response dictionary to plist

I have a dictionary containing a JSON response and a plist file. I want to update the values in my plist file with the JSON response values. How would I do this? ...

Generating a VERSION_STRING from major/minor/patch/build defines for use in a plist

I have a plist that is processed with a precompiled header file and in it there is the "variable" VERSION_STRING used a few times in such fields as CFBundleGetInfoString, ie the value for the key CFBundleGetInfoString is: MyProduct VERSION_STRING Copyright © 2009 MyCorp In MyHeader.h (which is the set as the Info.plist prefix header I w...