iOS Share Extension crashes when sharing from iOS 11 Screenshot
In Objective C You can use following code for image that shared as screen shot.Screen shot having .png extension so use public.png instead of public.jpeg
if ([itemProvider hasItemConformingToTypeIdentifier:@"public.png"]){ [itemProvider loadItemForTypeIdentifier:@"public.png" options:nil completionHandler: ^(id<NSSecureCoding> item, NSError *error) { dispatch_async(dispatch_get_main_queue(), ^{ NSData *imgData; if([(NSObject*)item isKindOfClass:[NSURL class]]) { imgData = [NSData dataWithContentsOfURL:(NSURL*)item]; } if([(NSObject*)item isKindOfClass:[UIImage class]]) { imgData = UIImagePNGRepresentation((UIImage*)item); } UIImage *image=[UIImage imageWithData:imgData];}); }];