node-simctl 7.6.5 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [7.7.0](https://github.com/appium/node-simctl/compare/v7.6.5...v7.7.0) (2025-01-26)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add content_size and increase_contrast commands for ui ([#262](https://github.com/appium/node-simctl/issues/262)) ([379c933](https://github.com/appium/node-simctl/commit/379c9332687d51b08f04553f28ef51ee3f2ec927))
|
|
6
|
+
|
|
1
7
|
## [7.6.5](https://github.com/appium/node-simctl/compare/v7.6.4...v7.6.5) (2025-01-05)
|
|
2
8
|
|
|
3
9
|
### Miscellaneous Chores
|
|
@@ -22,5 +22,85 @@ declare namespace commands {
|
|
|
22
22
|
* @throws {Error} If the `udid` instance property is unset
|
|
23
23
|
*/
|
|
24
24
|
function setAppearance(this: import("../simctl").default, appearance: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the current increase contrast configuration value from the given simulator.
|
|
27
|
+
* The value could be:
|
|
28
|
+
* - enabled: Increase Contrast is enabled.
|
|
29
|
+
* - disabled: Increase Contrast is disabled.
|
|
30
|
+
* - unsupported: The platform or runtime version do not support the Increase Contrast setting.
|
|
31
|
+
* - unknown: The current setting is unknown or there was an error detecting it.
|
|
32
|
+
*
|
|
33
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
34
|
+
* @this {import('../simctl').Simctl}
|
|
35
|
+
* @return {Promise<string>} the contrast configuration value.
|
|
36
|
+
* Possible return value is 'enabled', 'disabled',
|
|
37
|
+
* 'unsupported' or 'unknown' with Xcode 16.2.
|
|
38
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
39
|
+
* or there was an error while getting the value.
|
|
40
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
41
|
+
*/
|
|
42
|
+
function getIncreaseContrast(this: import("../simctl").default): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the increase constrast configuration for the given simulator.
|
|
45
|
+
* Acceptable values (with Xcode 16.2, iOS 18.1) are 'enabled' or 'disabled'
|
|
46
|
+
* They would change in the future version, so please validate the given value
|
|
47
|
+
* in the caller side.
|
|
48
|
+
*
|
|
49
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
50
|
+
* @this {import('../simctl').Simctl}
|
|
51
|
+
* @param {string} increaseContrast valid increase constrast configuration value.
|
|
52
|
+
* Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
|
|
53
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
54
|
+
* or the given value was invalid for the command.
|
|
55
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
56
|
+
*/
|
|
57
|
+
function setIncreaseContrast(this: import("../simctl").default, increaseContrast: string): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves the current content size value from the given simulator.
|
|
60
|
+
* The value could be:
|
|
61
|
+
* Standard sizes: extra-small, small, medium, large, extra-large,
|
|
62
|
+
* extra-extra-large, extra-extra-extra-large
|
|
63
|
+
* Extended range sizes: accessibility-medium, accessibility-large,
|
|
64
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
65
|
+
* accessibility-extra-extra-extra-large
|
|
66
|
+
* Other values: unknown, unsupported.
|
|
67
|
+
*
|
|
68
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
69
|
+
* @this {import('../simctl').Simctl}
|
|
70
|
+
* @return {Promise<string>} the content size value. Possible return value is
|
|
71
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
72
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
73
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
74
|
+
* accessibility-extra-extra-extra-large,
|
|
75
|
+
* unknown or unsupported with Xcode 16.2.
|
|
76
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
77
|
+
* or there was an error while getting the value.
|
|
78
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
79
|
+
*/
|
|
80
|
+
function getContentSize(this: import("../simctl").default): Promise<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Sets content size for the given simulator.
|
|
83
|
+
* Acceptable values (with Xcode 16.2, iOS 18.1) are below:
|
|
84
|
+
* Standard sizes: extra-small, small, medium, large, extra-large,
|
|
85
|
+
* extra-extra-large, extra-extra-extra-large
|
|
86
|
+
* Extended range sizes: accessibility-medium, accessibility-large,
|
|
87
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
88
|
+
* accessibility-extra-extra-extra-large
|
|
89
|
+
* Or 'increment' or 'decrement'
|
|
90
|
+
* They would change in the future version, so please validate the given value
|
|
91
|
+
* in the caller side.
|
|
92
|
+
*
|
|
93
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
94
|
+
* @this {import('../simctl').Simctl}
|
|
95
|
+
* @param {string} contentSizeAction valid content size or action value. Acceptable value is
|
|
96
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
97
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
98
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
99
|
+
* accessibility-extra-extra-extra-large with Xcode 16.2.
|
|
100
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
101
|
+
* or the given value was invalid for the command.
|
|
102
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
103
|
+
*/
|
|
104
|
+
function setContentSize(this: import("../simctl").default, contentSizeAction: string): Promise<void>;
|
|
25
105
|
}
|
|
26
106
|
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;IAKA;;;;;;;;;OASG;IACH,2DALY,OAAO,CAAC,MAAM,CAAC,CAU1B;IAED;;;;;;;;;OASG;IACH,sEALW,MAAM,iBAShB"}
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;IAKA;;;;;;;;;OASG;IACH,2DALY,OAAO,CAAC,MAAM,CAAC,CAU1B;IAED;;;;;;;;;OASG;IACH,sEALW,MAAM,iBAShB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,iEAPY,OAAO,CAAC,MAAM,CAAC,CAY1B;IAED;;;;;;;;;;;;;OAaG;IACH,kFANW,MAAM,iBAUhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,4DAVY,OAAO,CAAC,MAAM,CAAC,CAe1B;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,8EATW,MAAM,iBAahB"}
|
|
@@ -36,5 +36,103 @@ commands.setAppearance = async function setAppearance(appearance) {
|
|
|
36
36
|
args: [this.requireUdid('ui'), 'appearance', appearance],
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves the current increase contrast configuration value from the given simulator.
|
|
41
|
+
* The value could be:
|
|
42
|
+
* - enabled: Increase Contrast is enabled.
|
|
43
|
+
* - disabled: Increase Contrast is disabled.
|
|
44
|
+
* - unsupported: The platform or runtime version do not support the Increase Contrast setting.
|
|
45
|
+
* - unknown: The current setting is unknown or there was an error detecting it.
|
|
46
|
+
*
|
|
47
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
48
|
+
* @this {import('../simctl').Simctl}
|
|
49
|
+
* @return {Promise<string>} the contrast configuration value.
|
|
50
|
+
* Possible return value is 'enabled', 'disabled',
|
|
51
|
+
* 'unsupported' or 'unknown' with Xcode 16.2.
|
|
52
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
53
|
+
* or there was an error while getting the value.
|
|
54
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
55
|
+
*/
|
|
56
|
+
commands.getIncreaseContrast = async function getIncreaseContrast() {
|
|
57
|
+
const { stdout } = await this.exec('ui', {
|
|
58
|
+
args: [this.requireUdid('ui'), 'increase_contrast'],
|
|
59
|
+
});
|
|
60
|
+
return lodash_1.default.trim(stdout);
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Sets the increase constrast configuration for the given simulator.
|
|
64
|
+
* Acceptable values (with Xcode 16.2, iOS 18.1) are 'enabled' or 'disabled'
|
|
65
|
+
* They would change in the future version, so please validate the given value
|
|
66
|
+
* in the caller side.
|
|
67
|
+
*
|
|
68
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
69
|
+
* @this {import('../simctl').Simctl}
|
|
70
|
+
* @param {string} increaseContrast valid increase constrast configuration value.
|
|
71
|
+
* Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
|
|
72
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
73
|
+
* or the given value was invalid for the command.
|
|
74
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
75
|
+
*/
|
|
76
|
+
commands.setIncreaseContrast = async function setIncreaseContrast(increaseContrast) {
|
|
77
|
+
await this.exec('ui', {
|
|
78
|
+
args: [this.requireUdid('ui'), 'increase_contrast', increaseContrast],
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves the current content size value from the given simulator.
|
|
83
|
+
* The value could be:
|
|
84
|
+
* Standard sizes: extra-small, small, medium, large, extra-large,
|
|
85
|
+
* extra-extra-large, extra-extra-extra-large
|
|
86
|
+
* Extended range sizes: accessibility-medium, accessibility-large,
|
|
87
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
88
|
+
* accessibility-extra-extra-extra-large
|
|
89
|
+
* Other values: unknown, unsupported.
|
|
90
|
+
*
|
|
91
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
92
|
+
* @this {import('../simctl').Simctl}
|
|
93
|
+
* @return {Promise<string>} the content size value. Possible return value is
|
|
94
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
95
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
96
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
97
|
+
* accessibility-extra-extra-extra-large,
|
|
98
|
+
* unknown or unsupported with Xcode 16.2.
|
|
99
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
100
|
+
* or there was an error while getting the value.
|
|
101
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
102
|
+
*/
|
|
103
|
+
commands.getContentSize = async function getContentSize() {
|
|
104
|
+
const { stdout } = await this.exec('ui', {
|
|
105
|
+
args: [this.requireUdid('ui'), 'content_size'],
|
|
106
|
+
});
|
|
107
|
+
return lodash_1.default.trim(stdout);
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Sets content size for the given simulator.
|
|
111
|
+
* Acceptable values (with Xcode 16.2, iOS 18.1) are below:
|
|
112
|
+
* Standard sizes: extra-small, small, medium, large, extra-large,
|
|
113
|
+
* extra-extra-large, extra-extra-extra-large
|
|
114
|
+
* Extended range sizes: accessibility-medium, accessibility-large,
|
|
115
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
116
|
+
* accessibility-extra-extra-extra-large
|
|
117
|
+
* Or 'increment' or 'decrement'
|
|
118
|
+
* They would change in the future version, so please validate the given value
|
|
119
|
+
* in the caller side.
|
|
120
|
+
*
|
|
121
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
122
|
+
* @this {import('../simctl').Simctl}
|
|
123
|
+
* @param {string} contentSizeAction valid content size or action value. Acceptable value is
|
|
124
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
125
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
126
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
127
|
+
* accessibility-extra-extra-extra-large with Xcode 16.2.
|
|
128
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
129
|
+
* or the given value was invalid for the command.
|
|
130
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
131
|
+
*/
|
|
132
|
+
commands.setContentSize = async function setContentSize(contentSizeAction) {
|
|
133
|
+
await this.exec('ui', {
|
|
134
|
+
args: [this.requireUdid('ui'), 'content_size', contentSizeAction],
|
|
135
|
+
});
|
|
136
|
+
};
|
|
39
137
|
exports.default = commands;
|
|
40
138
|
//# sourceMappingURL=ui.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAGvB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;GASG;AACH,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa;IACnD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACrC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;KAC7C,CAAC,CAAC;IACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACH,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa,CAAE,UAAU;IAC/D,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC;KACzD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../lib/subcommands/ui.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAGvB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;GASG;AACH,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa;IACnD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACrC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;KAC7C,CAAC,CAAC;IACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACH,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa,CAAE,UAAU;IAC/D,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC;KACzD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAQ,CAAC,mBAAmB,GAAG,KAAK,UAAU,mBAAmB;IAC/D,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACrC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,mBAAmB,CAAC;KACpD,CAAC,CAAC;IACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,QAAQ,CAAC,mBAAmB,GAAG,KAAK,UAAU,mBAAmB,CAAE,gBAAgB;IACjF,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;KACtE,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAQ,CAAC,cAAc,GAAG,KAAK,UAAU,cAAc;IACrD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACrC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC;KAC/C,CAAC,CAAC;IACH,OAAO,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAQ,CAAC,cAAc,GAAG,KAAK,UAAU,cAAc,CAAE,iBAAiB;IACxE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC;KAClE,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
package/lib/subcommands/ui.js
CHANGED
|
@@ -36,4 +36,106 @@ commands.setAppearance = async function setAppearance (appearance) {
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves the current increase contrast configuration value from the given simulator.
|
|
41
|
+
* The value could be:
|
|
42
|
+
* - enabled: Increase Contrast is enabled.
|
|
43
|
+
* - disabled: Increase Contrast is disabled.
|
|
44
|
+
* - unsupported: The platform or runtime version do not support the Increase Contrast setting.
|
|
45
|
+
* - unknown: The current setting is unknown or there was an error detecting it.
|
|
46
|
+
*
|
|
47
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
48
|
+
* @this {import('../simctl').Simctl}
|
|
49
|
+
* @return {Promise<string>} the contrast configuration value.
|
|
50
|
+
* Possible return value is 'enabled', 'disabled',
|
|
51
|
+
* 'unsupported' or 'unknown' with Xcode 16.2.
|
|
52
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
53
|
+
* or there was an error while getting the value.
|
|
54
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
55
|
+
*/
|
|
56
|
+
commands.getIncreaseContrast = async function getIncreaseContrast () {
|
|
57
|
+
const {stdout} = await this.exec('ui', {
|
|
58
|
+
args: [this.requireUdid('ui'), 'increase_contrast'],
|
|
59
|
+
});
|
|
60
|
+
return _.trim(stdout);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets the increase constrast configuration for the given simulator.
|
|
65
|
+
* Acceptable values (with Xcode 16.2, iOS 18.1) are 'enabled' or 'disabled'
|
|
66
|
+
* They would change in the future version, so please validate the given value
|
|
67
|
+
* in the caller side.
|
|
68
|
+
*
|
|
69
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
70
|
+
* @this {import('../simctl').Simctl}
|
|
71
|
+
* @param {string} increaseContrast valid increase constrast configuration value.
|
|
72
|
+
* Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
|
|
73
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
74
|
+
* or the given value was invalid for the command.
|
|
75
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
76
|
+
*/
|
|
77
|
+
commands.setIncreaseContrast = async function setIncreaseContrast (increaseContrast) {
|
|
78
|
+
await this.exec('ui', {
|
|
79
|
+
args: [this.requireUdid('ui'), 'increase_contrast', increaseContrast],
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves the current content size value from the given simulator.
|
|
85
|
+
* The value could be:
|
|
86
|
+
* Standard sizes: extra-small, small, medium, large, extra-large,
|
|
87
|
+
* extra-extra-large, extra-extra-extra-large
|
|
88
|
+
* Extended range sizes: accessibility-medium, accessibility-large,
|
|
89
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
90
|
+
* accessibility-extra-extra-extra-large
|
|
91
|
+
* Other values: unknown, unsupported.
|
|
92
|
+
*
|
|
93
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
94
|
+
* @this {import('../simctl').Simctl}
|
|
95
|
+
* @return {Promise<string>} the content size value. Possible return value is
|
|
96
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
97
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
98
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
99
|
+
* accessibility-extra-extra-extra-large,
|
|
100
|
+
* unknown or unsupported with Xcode 16.2.
|
|
101
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
102
|
+
* or there was an error while getting the value.
|
|
103
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
104
|
+
*/
|
|
105
|
+
commands.getContentSize = async function getContentSize () {
|
|
106
|
+
const {stdout} = await this.exec('ui', {
|
|
107
|
+
args: [this.requireUdid('ui'), 'content_size'],
|
|
108
|
+
});
|
|
109
|
+
return _.trim(stdout);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Sets content size for the given simulator.
|
|
114
|
+
* Acceptable values (with Xcode 16.2, iOS 18.1) are below:
|
|
115
|
+
* Standard sizes: extra-small, small, medium, large, extra-large,
|
|
116
|
+
* extra-extra-large, extra-extra-extra-large
|
|
117
|
+
* Extended range sizes: accessibility-medium, accessibility-large,
|
|
118
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
119
|
+
* accessibility-extra-extra-extra-large
|
|
120
|
+
* Or 'increment' or 'decrement'
|
|
121
|
+
* They would change in the future version, so please validate the given value
|
|
122
|
+
* in the caller side.
|
|
123
|
+
*
|
|
124
|
+
* @since Xcode 15 (but lower xcode could have this command)
|
|
125
|
+
* @this {import('../simctl').Simctl}
|
|
126
|
+
* @param {string} contentSizeAction valid content size or action value. Acceptable value is
|
|
127
|
+
* extra-small, small, medium, large, extra-large, extra-extra-large,
|
|
128
|
+
* extra-extra-extra-large, accessibility-medium, accessibility-large,
|
|
129
|
+
* accessibility-extra-large, accessibility-extra-extra-large,
|
|
130
|
+
* accessibility-extra-extra-extra-large with Xcode 16.2.
|
|
131
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
132
|
+
* or the given value was invalid for the command.
|
|
133
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
134
|
+
*/
|
|
135
|
+
commands.setContentSize = async function setContentSize (contentSizeAction) {
|
|
136
|
+
await this.exec('ui', {
|
|
137
|
+
args: [this.requireUdid('ui'), 'content_size', contentSizeAction],
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
|
|
39
141
|
export default commands;
|