diff --git a/configuration/src/main/kotlin/com/malinskiy/marathon/config/vendor/apple/ios/PermissionsConfiguration.kt b/configuration/src/main/kotlin/com/malinskiy/marathon/config/vendor/apple/ios/PermissionsConfiguration.kt index 629200d7b..5d5e75260 100644 --- a/configuration/src/main/kotlin/com/malinskiy/marathon/config/vendor/apple/ios/PermissionsConfiguration.kt +++ b/configuration/src/main/kotlin/com/malinskiy/marathon/config/vendor/apple/ios/PermissionsConfiguration.kt @@ -26,6 +26,8 @@ enum class GrantLifecycle { * @property Motion Allow access to motion and fitness data * @property Reminders Allow access to reminders * @property Siri Allow use of the app with Siri + * @property UserTracking Allow user tracking + * @property Pasteboard Allow paste from external apps */ enum class Permission(val value: String) { @JsonProperty("all") All("all"), @@ -44,4 +46,5 @@ enum class Permission(val value: String) { //Non-simctl grant permissions @JsonProperty("user-tracking") UserTracking("kTCCServiceUserTracking"), + @JsonProperty("pasteboard") Pasteboard("kTCCServicePasteboard"), } diff --git a/docs/runner/apple/configure/ios.md b/docs/runner/apple/configure/ios.md index 04dc88d0d..eb1f1b470 100644 --- a/docs/runner/apple/configure/ios.md +++ b/docs/runner/apple/configure/ios.md @@ -472,6 +472,7 @@ permissions: | reminders | Allow access to reminders | | siri | Allow use of the app with Siri | | user-tracking | Allow user tracking | +| pasteboard | Allow paste from external apps | diff --git a/docs/runner_versioned_docs/version-0.10.0/apple/configure/ios.md b/docs/runner_versioned_docs/version-0.10.0/apple/configure/ios.md index 9c7f26e5c..e18990fe9 100644 --- a/docs/runner_versioned_docs/version-0.10.0/apple/configure/ios.md +++ b/docs/runner_versioned_docs/version-0.10.0/apple/configure/ios.md @@ -412,6 +412,7 @@ permissions: | reminders | Allow access to reminders | | siri | Allow use of the app with Siri | | user-tracking | Allow user tracking | +| pasteboard | Allow paste from external apps | diff --git a/docs/runner_versioned_docs/version-0.10.1/apple/configure/ios.md b/docs/runner_versioned_docs/version-0.10.1/apple/configure/ios.md index bd67912ad..38bcd0812 100644 --- a/docs/runner_versioned_docs/version-0.10.1/apple/configure/ios.md +++ b/docs/runner_versioned_docs/version-0.10.1/apple/configure/ios.md @@ -416,6 +416,7 @@ permissions: | reminders | Allow access to reminders | | siri | Allow use of the app with Siri | | user-tracking | Allow user tracking | +| pasteboard | Allow paste from external apps | diff --git a/vendor/vendor-apple/ios/src/main/kotlin/com/malinskiy/marathon/apple/ios/AppleSimulatorDevice.kt b/vendor/vendor-apple/ios/src/main/kotlin/com/malinskiy/marathon/apple/ios/AppleSimulatorDevice.kt index b0a6e2656..4ba55d55c 100644 --- a/vendor/vendor-apple/ios/src/main/kotlin/com/malinskiy/marathon/apple/ios/AppleSimulatorDevice.kt +++ b/vendor/vendor-apple/ios/src/main/kotlin/com/malinskiy/marathon/apple/ios/AppleSimulatorDevice.kt @@ -810,8 +810,8 @@ supportsTranscoding, suspend fun grant(permission: Permission, bundleId: String): Boolean { return when (permission) { - Permission.UserTracking -> { - //This might fail on different versions of iOS runtime. Tested on 17.2 + Permission.UserTracking, Permission.Pasteboard -> { + //This might fail on different versions of iOS runtime. Tested on 17.2, 18.1 val query = "replace into access (service, client, client_type, auth_value, auth_reason, auth_version, flags) values ('${permission.value}','$bundleId',0,2,2,1,0);" binaryEnvironment.sqlite3.query(