Getting the UDID of an iOS device

[[UIDevice currentDevice] uniqueIdentifier]

Getting filepath to the Documents folder on iPhone

To achieve the task written in the title of this post, you have to do the following:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
NSString *documentsPath = [paths objectAtIndex:0];