Skip to content

Commit

Permalink
fix: Always assume en0 is the WiFi interface (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Mar 14, 2024
1 parent c623975 commit 6dbfb3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef NS_ENUM(NSUInteger, FBUIInterfaceAppearance) {
- (nullable NSData *)fb_screenshotWithError:(NSError*__autoreleasing*)error;

/**
Returns device current wifi ip4 address
Returns device's current wifi ip4 address
*/
- (nullable NSString *)fb_wifiIPAddress;

Expand Down
2 changes: 1 addition & 1 deletion WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ - (NSString *)fb_wifiIPAddress
continue;
}
NSString *interfaceName = [NSString stringWithUTF8String:temp_addr->ifa_name];
if(![interfaceName containsString:@"en"]) {
if(![interfaceName isEqualToString:@"en0"]) {
temp_addr = temp_addr->ifa_next;
continue;
}
Expand Down

0 comments on commit 6dbfb3f

Please sign in to comment.