diff --git a/docs/guides/file-transfer.md b/docs/guides/file-transfer.md index 9ef598833..06a7f3410 100644 --- a/docs/guides/file-transfer.md +++ b/docs/guides/file-transfer.md @@ -27,7 +27,8 @@ possible formats this path can take: * `` is the container type * On simulators, common values are `app`, `data`, `groups`, but a custom one can also be provided * On real devices, the only accepted value is `documents`. All others are treated as Format 2 - * This value can only be specified for apps that have the `UIFileSharingEnabled` flag set to + * In `xcuitest-driver` versions prior to version `v8.3.0` the following limitation applies: + This value can only be specified for apps that have the `UIFileSharingEnabled` flag set to `true`. You can use the [`mobile: listApps`](../reference/execute-methods.md#mobile-listapps) extension to identify such apps. * `` is the target file or folder diff --git a/lib/commands/file-movement.js b/lib/commands/file-movement.js index 23725ce8c..1b44c245e 100644 --- a/lib/commands/file-movement.js +++ b/lib/commands/file-movement.js @@ -72,17 +72,14 @@ function verifyIsSubPath(originalPath, root) { * * @param {string} udid * @param {string} [bundleId] - * @param {string} [containerType] * @returns {Promise} */ -async function createAfcClient(udid, bundleId, containerType) { +async function createAfcClient(udid, bundleId) { if (!bundleId) { return await services.startAfcService(udid); } const service = await services.startHouseArrestService(udid); - return isDocumentsContainer(containerType) - ? await service.vendDocuments(bundleId) - : await service.vendContainer(bundleId); + return await service.vendContainer(bundleId); } /** @@ -103,7 +100,7 @@ function isDocumentsContainer(containerType) { async function createService(remotePath) { if (CONTAINER_PATH_PATTERN.test(remotePath)) { const {bundleId, pathInContainer, containerType} = await parseContainerPath.bind(this)(remotePath); - const service = await createAfcClient(this.device.udid, bundleId, containerType); + const service = await createAfcClient(this.device.udid, bundleId); const relativePath = isDocumentsContainer(containerType) ? path.join(CONTAINER_DOCUMENTS_PATH, pathInContainer) : pathInContainer;