Skip to content

Commit

Permalink
fix: uncaughtException: maxObjectCount exceeded in listApplications (#…
Browse files Browse the repository at this point in the history
…2355)

* fix: uncaughtException: maxObjectCount exceeded in listApplications

* minimize

* add CFBundleIdentifier
  • Loading branch information
KazuCocoa authored Mar 25, 2024
1 parent b9d89cb commit 6bfc5c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/real-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ class RealDevice {
let installProxyService;
try {
installProxyService = await services.startInstallationProxyService(this.udid);
const apps = await installProxyService.listApplications();
const apps = await installProxyService.listApplications({
returnAttributes: ['CFBundleIdentifier', 'CFBundleExecutable']
});
if (!apps[bundleId]) {
log.info(`The bundle id '${bundleId}' did not exist`);
return false;
Expand Down Expand Up @@ -260,7 +262,9 @@ class RealDevice {
async getUserInstalledBundleIdsByBundleName(bundleName) {
const service = await services.startInstallationProxyService(this.udid);
try {
const applications = await service.listApplications({applicationType: 'User'});
const applications = await service.listApplications({
applicationType: 'User', returnAttributes: ['CFBundleIdentifier', 'CFBundleName']
});
return _.reduce(
applications,
(acc, {CFBundleName}, key) => {
Expand Down

0 comments on commit 6bfc5c5

Please sign in to comment.