Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Prev Previous commit
Next Next commit
add error log
  • Loading branch information
vashworth committed Dec 13, 2022
commit ecc0a8b0534c9094f64f32d711db5bce9c2361a0
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#import "FLTPHPickerSaveImageToPathOperation.h"

#import <os/log.h>

API_AVAILABLE(ios(14))
@interface FLTPHPickerSaveImageToPathOperation ()

Expand Down Expand Up @@ -96,9 +98,11 @@ - (void)start {
loadDataRepresentationForTypeIdentifier:UTTypeImage.identifier
completionHandler:^(NSData *_Nullable data,
NSError *_Nullable error) {
if (error == nil && data != nil) {
if (data != nil) {
UIImage *image = [[UIImage alloc] initWithData:data];
[self processImage:image];
} else {
os_log_error(OS_LOG_DEFAULT, "Could not process image: %@", error);
}
}];
}
Expand Down