Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Dec 7, 2023
1 parent 16a0b51 commit 2767745
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -344,20 +344,8 @@ - (BOOL)fb_setAppearance:(FBUIInterfaceAppearance)appearance error:(NSError **)e
// Xcode 14.3.1 can build these values.
// For iOS 17+
if ([self respondsToSelector:NSSelectorFromString(@"appearance")]) {
switch (appearance) {
case FBUIInterfaceAppearanceUnspecified:
self.appearance = XCUIDeviceAppearanceUnspecified;
return YES;
case FBUIInterfaceAppearanceLight:
self.appearance = XCUIDeviceAppearanceLight;
return YES;
case FBUIInterfaceAppearanceDark:
self.appearance = XCUIDeviceAppearanceDark;
return YES;
default:
[FBLogger logFmt:@"No matched appearance pattern with %lu", appearance];
break;
}
self.appearance = appearance;
return YES;
}
#endif

Expand Down

0 comments on commit 2767745

Please sign in to comment.