You should type cast your CFStringRef
variable to NSString *
. Change the second line of your code with below lines:
NSDictionary *options = nil;
if([[toBeEnhancedImage properties] valueForKey:(NSString *)kCGImagePropertyOrientation] == nil)
{
options = @{CIDetectorImageOrientation : [NSNumber numberWithInt:1]};
}
else
{
options = @{CIDetectorImageOrientation : [[toBeEnhancedImage properties] valueForKey:(NSString *)kCGImagePropertyOrientation]};
}