As @Codo has pointed out, the pixel density is irrelevant until the image is being output (to a display, a printer a RIP, or whatever). It's metadata, not image data. However, if you're dealing with a third-party service that doesn't have the wit to understand this, you need to edit the image metadata after you have captured the image and before you save it.
This is how:
captureStillImageAsynchronouslyFromConnection:stillImageConnection
completionHandler:^(CMSampleBufferRef imageDataSampleBuffer
NSError *error) {
CFDictionaryRef metadataDict = CMCopyDictionaryOfAttachments(kCFAllocatorDefault,
imageDataSampleBuffer,
kCMAttachmentMode_ShouldPropagate);
NSMutableDictionary *metadata = [[NSMutableDictionary alloc]
initWithDictionary:(__bridge NSDictionary*)metadataDict];
CFRelease(metadataDict);
NSMutableDictionary *tiffMetadata = [[NSMutableDictionary alloc] init];
[tiffMetadata setObject:[NSNumber numberWithInt:300]
forKey(NSString*)kCGImagePropertyTIFFXResolution];
[tiffMetadata setObject:[NSNumber numberWithInt:300] forKey:
(NSString*)kCGImagePropertyTIFFYResolution];
[metadata setObject:tiffMetadata forKey:(NSString*)kCGImagePropertyTIFFDictionary];
.
.
.
}];
Then feed metadata
into writeImageToSavedPhotosAlbum:metadata:completionBlock
, writeImageDataToSavedPhotosAlbum:metadata:completionBlock
or a save into your private app folder, depending on your requirements.