Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios): ability to grant paste from external apps permission #988

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(ios): ability to grant paste from external apps
  • Loading branch information
vfadc committed Nov 29, 2024
commit e770f89be43e89f5a1eb209023deb4137c36dc53
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -44,4 +46,5 @@ enum class Permission(val value: String) {

//Non-simctl grant permissions
@JsonProperty("user-tracking") UserTracking("kTCCServiceUserTracking"),
@JsonProperty("pasteboard") Pasteboard("kTCCServicePasteboard"),
}
1 change: 1 addition & 0 deletions docs/runner/apple/configure/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

<Tabs>
<TabItem value="before-test-run" label="Before test run">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

<Tabs>
<TabItem value="before-test-run" label="Before test run">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

<Tabs>
<TabItem value="before-test-run" label="Before test run">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading