Update iOS10. after an error has occurred.
So far it had been operating normally.
Do you know solution?
(Objective-C of the specification change?)
(Error)
: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary setObject:forKey:]: mutating method sent to">Oct 3 14:15:08 XXXXXXXX (CoreFoundation) [401] <Notice>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '- [__ NSCFDictionary setObject: forKey:]: mutating method sent to immutable object '
(Part of the Source code)
NSMutableDictionary * metadata;
switch (_selectImagePicker) {
case kCamera: {
// Get from the camera's metadata
NSMutableDictionary * metadataCamera = (NSMutableDictionary *) [info objectForKey: UIImagePickerControllerMediaMetadata];
Newly creating a metadata // copy the metadata acquired from the camera
metadata = [NSMutableDictionary dictionaryWithDictionary: metadataCamera];
break;
}
~ Snip ~
int imageW = resize.size.width;
int imageH = resize.size.height;
int Orient = resize.imageOrientation;
[Metadata setObject: [NSNumber numberWithInt: Orient]
forKey: (NSString *) kCGImagePropertyOrientation];
// Get a reference to the Exif
NSMutableDictionary * exif = metadata [(NSString *) kCGImagePropertyExifDictionary];
// Set the width and height of the resized ★ Error This Process ★
[Exif setObject: [NSNumber numberWithInt: imageH]
forKey: (NSString *) kCGImagePropertyExifPixelYDimension];
※
I am Japanese.
I'm sorry for my bad English.