Skip to content

Commit

Permalink
change kUTTypeJPEG to UTTypeJPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
csusheep committed Dec 25, 2023
1 parent 6974d17 commit 7e3eca8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions WebDriverAgentLib/Commands/FBScreenshotCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#import <objc/runtime.h>
#import <MobileCoreServices/MobileCoreServices.h>
@import UniformTypeIdentifiers;

#import "XCUIDevice+FBHelpers.h"
#import "FBRoute.h"
Expand Down Expand Up @@ -101,7 +102,7 @@ + (NSArray *)routes
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"15.0")) {
id screnshotRequest = [FBScreenshot screenshotRequestWithScreenID:[XCUIScreen.mainScreen displayID]
rect:rect
uti:(__bridge id)kUTTypeJPEG
uti:UTTypeJPEG
compressionQuality:FBMaxCompressionQuality
error:&error];
if (nil == screnshotRequest) {
Expand Down Expand Up @@ -229,7 +230,7 @@ + (NSArray *)routes
NSError *error;
NSData *screenshotData = [FBScreenshot takeInOriginalResolutionWithScreenID:[XCUIScreen.mainScreen displayID]
compressionQuality:screenshotCompressionQuality
uti:(__bridge id)kUTTypeJPEG
uti:UTTypeJPEG
timeout:1.
error:&error];
if (nil == screenshotData) {
Expand Down
2 changes: 1 addition & 1 deletion WebDriverAgentLib/Utilities/FBScreenshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN

+ (nullable id)screenshotRequestWithScreenID:(unsigned int)screenID
rect:(struct CGRect)rect
uti:(NSString *)uti
uti:(UTType *)uti
compressionQuality:(CGFloat)compressionQuality
error:(NSError **)error;

Expand Down

0 comments on commit 7e3eca8

Please sign in to comment.