Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: do not get active process information in a new session request #774

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions WebDriverAgentLib/Commands/FBSessionCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,13 @@ + (NSString *)buildTimestamp
];
}

/**
Return current session information.
This response does not have any active application information
because getting such information for "com.apple.springboard" (Home application's budnle id in iOS)
could be expensive.
Usually when no bundle id is specified, or no app started, the default view could be the spring board.
*/
+ (NSDictionary *)sessionInformation
{
return
Expand Down Expand Up @@ -438,15 +445,10 @@ + (NSString *)deviceNameByUserInterfaceIdiom:(UIUserInterfaceIdiom) userInterfac

+ (NSDictionary *)currentCapabilities
{
FBApplication *application = [FBSession activeSession].activeApplication;
KazuCocoa marked this conversation as resolved.
Show resolved Hide resolved
// to log the info in the system
[FBLogger logFmt:@"Current active application bundle id is %@", application.bundleID];
return
@{
@"device": [self.class deviceNameByUserInterfaceIdiom:[UIDevice currentDevice].userInterfaceIdiom],
@"sdkVersion": [[UIDevice currentDevice] systemVersion],
@"browserName": application.label ?: [NSNull null],
@"CFBundleIdentifier": application.bundleID ?: [NSNull null],
@"sdkVersion": [[UIDevice currentDevice] systemVersion]
};
}

Expand Down
Loading