Skip to content

Commit

Permalink
Add privacy manifest (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikvaa authored May 21, 2024
1 parent d7b1ccb commit ca1fed1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>
22 changes: 22 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,25 @@ kmmbridge {
}

addGithubPackagesRepository()

/**
* Apple requires 3rd party frameworks to include a privacy policy file.
*
* Based on a discussion on the Kotlin Slack, several people proposed the below solution to copy the privacy policy
* file to the framework output directory.
*
* Source: https://kotlinlang.slack.com/archives/C3PQML5NU/p1711715546770359
*/
rootProject.afterEvaluate {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink>().forEach { linkTask ->
val frameworkDestinationDir = linkTask.outputFile
linkTask.doLast {
rootProject.copy {
val privacyFile = rootProject.file("PrivacyInfo.xcprivacy")

from(privacyFile)
into(frameworkDestinationDir.get())
}
}
}
}

0 comments on commit ca1fed1

Please sign in to comment.