{"id":18036073,"url":"https://github.com/kjuly/udaexplainer","last_synced_at":"2025-03-27T08:30:39.093Z","repository":{"id":211551879,"uuid":"724914911","full_name":"Kjuly/UDAExplainer","owner":"Kjuly","description":"Sensitive user data access explainer, such as for Photo Library, Face ID, App Tracking Transparency, etc.","archived":false,"fork":false,"pushed_at":"2024-09-21T07:17:48.000Z","size":51,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T12:51:45.570Z","etag":null,"topics":["app-tracking-transparency","ios","privacy","swift","swift-package-manager","swift-ui","user-data-access"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kjuly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-29T03:34:49.000Z","updated_at":"2025-02-05T07:29:06.000Z","dependencies_parsed_at":"2024-10-30T19:17:00.713Z","dependency_job_id":null,"html_url":"https://github.com/Kjuly/UDAExplainer","commit_stats":null,"previous_names":["kjuly/udaexplainer"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kjuly%2FUDAExplainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kjuly%2FUDAExplainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kjuly%2FUDAExplainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kjuly%2FUDAExplainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kjuly","download_url":"https://codeload.github.com/Kjuly/UDAExplainer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245809590,"owners_count":20676013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-tracking-transparency","ios","privacy","swift","swift-package-manager","swift-ui","user-data-access"],"created_at":"2024-10-30T12:11:28.983Z","updated_at":"2025-03-27T08:30:38.667Z","avatar_url":"https://github.com/Kjuly.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UDAExplainer\n\nSensitive user data access explainer, such as for Photo Library, Face ID, App Tracking Transparency, etc.\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FKjuly%2FUDAExplainer%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/Kjuly/UDAExplainer)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FKjuly%2FUDAExplainer%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/Kjuly/UDAExplainer)  \n![iOS][iOS-Badge]  \n[![SPM][SPM-Badge]][SPM-Link] [![CocoaPods][CocoaPods-Badge]][CocoaPods-Link] [![Carthage][Carthage-Badge]][Carthage-Link]\n\n[iOS-Badge]: https://img.shields.io/badge/iOS-15.5%2B-blue?labelColor=00367A\u0026color=3081D0\n\n[SPM-Badge]: https://img.shields.io/github/v/tag/Kjuly/UDAExplainer?label=SPM\u0026labelColor=2F4858\u0026color=A8DF8E\n[SPM-Link]: https://swiftpackageindex.com/Kjuly/UDAExplainer\n[CocoaPods-Badge]: https://img.shields.io/cocoapods/v/UDAExplainer?label=CocoaPods\u0026labelColor=2F4858\u0026color=A8DF8E\n[CocoaPods-Link]: https://cocoapods.org/pods/UDAExplainer\n[Carthage-Badge]: https://img.shields.io/github/v/tag/Kjuly/UDAExplainer?label=Carthage\u0026labelColor=2F4858\u0026color=A8DF8E\n[Carthage-Link]: https://swiftpackageindex.com/Kjuly/UDAExplainer\n\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Kjuly/preview/main/UDAExplainer/01.png\" alt=\"iPhone Preview - Light\" height=\"360\" /\u003e \n\u003cimg src=\"https://raw.githubusercontent.com/Kjuly/preview/main/UDAExplainer/02.png\" alt=\"iPhone Preview - Dark\" height=\"360\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Kjuly/preview/main/UDAExplainer/iPad_01.png\" alt=\"iPad Preview\" height=\"360\" /\u003e\n\u003c/div\u003e\n\n## Installation\n\nSee the following subsections for details on the different installation methods.\n\n- [Swift Package Manager](INSTALLATION.md#swift-package-manager)\n- [CocoaPods](INSTALLATION.md#cocoaPods)\n- [Carthage](INSTALLATION.md#carthage)\n- [Submodule](INSTALLATION.md#submodule)\n\n## Usage with Swift UI\n\n```Swift\n@State private var explainerType: UDAExplainerType?\nprivate let isCompactDevice: Bool = UIDevice.current.userInterfaceIdiom == .phone\n\nvar body: some View {\n  ... {\n    // Assign self.explainerType when the authorisation status is not determined.\n  }\n  .fullScreenCover(item: $explainerType) { type in\n    let config = UDAExplainerDefaultDataSource.configuration(for: type, inCompactDevice: self.isCompactDevice)\n    UDAExplainerView(config: config)\n  }\n  .onReceive(NotificationCenter.default.publisher(for: .UDAExplainer.shouldContinue)) { note in\n    if let type = note.object as? UDAExplainerType {\n      // ... Do authorisation for this type, and post notification to dismiss the explainer view\n      //   when the authorisation is done.\n      NotificationCenter.default.post(name: .UDAExplainer.shouldDismissView, object: type)\n    }\n  }\n}\n```\n\n## Usage with UIKit\n\n```Swift\nfunc presentUDAExplainer(for type: UDAExplainerType) {\n  let config = UDAExplainerDefaultDataSource.configuration(for: type, inCompactDevice: self.isCompactDevice)\n  let explainerViewController = UDAExplainerHostingController(with: config)\n  viewController.present(explainerViewController, animated: false)\n\n  NotificationCenter.default.addObserver(\n    self,\n    selector: #selector(_handleUDAExplainerShouldContinueNotification),\n    name: .UDAExplainer.shouldContinue,\n    object: nil)\n}\n\n@objc private func _handleUDAExplainerShouldContinueNotification(_ note: NSNotification) {\n  guard let type = note.object as? UDAExplainerType else {\n    return\n  }\n  NotificationCenter.default.removeObserver(self, name: .UDAExplainer.shouldContinue, object: nil)\n\n  // ... Do authorisation for this type, and post notification to dismiss the explainer view\n  //   when the authorisation is done.\n  NotificationCenter.default.post(name: .UDAExplainer.shouldDismissView, object: type)\n}\n```\n\n## Customization\n\nYou can feed UDAExplainer with a custom `UDAExplainerConfiguration` instance, which provides expected contents and color set.\n\nPlease refer to `UDAExplainerDefaultDataSource` for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjuly%2Fudaexplainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjuly%2Fudaexplainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjuly%2Fudaexplainer/lists"}