I am currently writing an iOS application which fills Dynamic cells with data retrieved from a PLIST file. I have searched and searched but cannot comprehend/find a way to make my data searchable.

I would like my plist to be searchable and provide the correct information. Any assistance would be greatly appreciated as I am new and struggling with the search function.

I am coding with Xcode 6.1.1 and for iOS 7+. If you would like I can also post my code so you can see what I am working with.

Edited 1 Year Ago by Method_dev: Added note that I can upload code if need be.

ah, Thanks! I am trying to look into that now.

Currently I am trying to implement the code

`NSData* plistData = [source dataUsingEncoding:NSUTF8StringEncoding];
NSString *error;
NSPropertyListFormat format;
NSDictionary* plist = [NSPropertyListSerialization propertyListFromData:plistData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&error];
NSLog( @"plist is %@", plist );
if(!plist){
    NSLog(@"Error: %@",error);
    [error release];
}`

Into my app but it won't recognize my data.plst xD. Such a learning experience!

    // Path to the plist (in the application bundle)
    NSString *path = [[NSBundle mainBundle] pathForResource:
                      @"Charlotte" ofType:@"plist"];

    // Build the array from the plist
    NSMutableArray *array2 = [[NSMutableArray alloc] initWithContentsOfFile:path];

    // Show the string values
    for (NSString *str in array2)
        NSLog(@"--%@", str);

The above is the code I currently have, which reads the data into the NSMutablearray but now I just need to figure out how to search the ar

Edited 1 Year Ago by Method_dev: Editing code

This article has been dead for over six months. Start a new discussion instead.