Skip to content

Commit 83a23a0

Browse files
committed
add returnAllAttributes bool option
1 parent 51743cb commit 83a23a0

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/services/ios/installation-proxy/index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,22 @@ export class InstallationProxyService extends BaseService {
7171
const {
7272
applicationType = DEFAULT_APPLICATION_TYPE,
7373
returnAttributes = DEFAULT_RETURN_ATTRIBUTES,
74+
returnAllAttributes = false,
7475
} = options;
7576

77+
const clientOptions: Record<string, string | string[]> = {
78+
ApplicationType: applicationType,
79+
};
80+
81+
// When returnAllAttributes is true, don't set ReturnAttributes
82+
// to let iOS return all available attributes
83+
if (!returnAllAttributes) {
84+
clientOptions.ReturnAttributes = returnAttributes;
85+
}
86+
7687
const request: PlistDictionary = {
7788
Command: 'Browse',
78-
ClientOptions: {
79-
ApplicationType: applicationType,
80-
ReturnAttributes: returnAttributes,
81-
},
89+
ClientOptions: clientOptions,
8290
};
8391

8492
const conn = await this.getConnection();

src/services/ios/installation-proxy/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type ProgressCallback = (
88
export interface BrowseOptions {
99
applicationType?: ApplicationType;
1010
returnAttributes?: string[];
11+
returnAllAttributes?: boolean;
1112
}
1213

1314
export interface InstallOptions {

0 commit comments

Comments
 (0)