NSDictionary and NSString writeToFile help

Discussion in 'iOS Development' started by gojohnnyboi, May 8, 2008.

  1. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    Ok, so i made an NSDictionary, and had it read from a certain plist file for my app. Then, i made an NSString to read the string for the file.



    That all goes good, but i need to know how to change the string in that file. Example code please if possible, otherwise just help. heres my code:


    Code:
    	NSString* version;
    		
    	NSDictionary* dataplist = [NSDictionary dictionaryWithContentsOfFile: dataPlistPath];
    	version = [dataplist objectForKey: @"ApplicationVersion"];
    			if (version != nil)
    			{
    		
    
    			/*
    
    				Need a code to write a certain string to this key of the file.
    			
    			*/
    
    			
    			}
    Thanks guys really appreciate your help


    Thanks in advance,
    -Gojohnnyboi


    P.S.: Skylar, i figured out transView's thanks so much. + repping u soon.

    Rep involved for helpful answers!
  2. optimo

    optimo New Member

    Joined:
    Sep 28, 2007
    Messages:
    535
    Likes Received:
    17

Share This Page