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

fix: add old safariviewcontroller app bundle id too #197

Merged
merged 1 commit into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { errorFromMJSONWPStatusCode } from 'appium-base-driver';

const WEB_CONTENT_BUNDLE_ID = 'com.apple.WebKit.WebContent';
const SAFARI_WEB_VIEW_BUNDLE_ID = 'process-SafariViewService';
const SAFARI_WEB_VIEW_FULL_BUNDLE_ID = 'com.apple.SafariViewService';
const WILDCARD_BUNDLE_ID = '*';

const RESPONSE_LOG_LENGTH = 100;
Expand Down Expand Up @@ -125,7 +126,12 @@ function getPossibleDebuggerAppKeys (bundleIds, appDict) {
let proxiedAppIds = [];

// go through the possible bundle identifiers
const possibleBundleIds = _.uniq([SAFARI_WEB_VIEW_BUNDLE_ID, WILDCARD_BUNDLE_ID, ...bundleIds]);
const possibleBundleIds = _.uniq([
SAFARI_WEB_VIEW_BUNDLE_ID,
SAFARI_WEB_VIEW_FULL_BUNDLE_ID,
WILDCARD_BUNDLE_ID,
...bundleIds,
]);
log.debug(`Checking for bundle identifiers: ${possibleBundleIds.join(', ')}`);
for (const bundleId of possibleBundleIds) {
const appId = appIdForBundle(bundleId, appDict);
Expand Down
1 change: 1 addition & 0 deletions lib/remote-debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ class RemoteDebugger extends events.EventEmitter {
if (!(ignoreAboutBlankUrl && page.url === BLANK_PAGE_URL)) {
let pageDict = _.clone(page);
pageDict.id = `${id}.${pageDict.id}`;
pageDict.bundleId = info.bundleId;
fullPageArray.push(pageDict);
}
}
Expand Down