{"id":20134242,"url":"https://github.com/japlscript/japlcontact","last_synced_at":"2026-05-12T00:47:29.625Z","repository":{"id":57727421,"uuid":"407877494","full_name":"japlscript/japlcontact","owner":"japlscript","description":"Java API for Apple's Contacts app (macOS)","archived":false,"fork":false,"pushed_at":"2022-07-14T08:02:47.000Z","size":494,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T09:25:25.992Z","etag":null,"topics":["apple","applescript","contacts","japlscript","java","macos"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/japlscript.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}},"created_at":"2021-09-18T14:08:17.000Z","updated_at":"2021-10-13T12:35:58.000Z","dependencies_parsed_at":"2022-09-26T21:51:25.246Z","dependency_job_id":null,"html_url":"https://github.com/japlscript/japlcontact","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplcontact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplcontact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplcontact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplcontact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/japlscript","download_url":"https://codeload.github.com/japlscript/japlcontact/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241580577,"owners_count":19985573,"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":["apple","applescript","contacts","japlscript","java","macos"],"created_at":"2024-11-13T21:07:55.006Z","updated_at":"2026-05-12T00:47:29.597Z","avatar_url":"https://github.com/japlscript.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![LGPL 2.1](https://img.shields.io/badge/License-LGPL_2.1-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/japlcontact/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/japlcontact)\n[![Build and Test](https://github.com/japlscript/japlcontact/workflows/Build%20and%20Test/badge.svg)](https://github.com/japlscript/japlcontact/actions)\n\n\n# Japlcontact\n\n*Japlcontact* is a Java API for the Apple Contacts app (macOS) based on\n[JaplScript](https://github.com/japlscript/japlscript).\n\n\n## Installation\n\nJaplcontact is released via [Maven](https://maven.apache.org).\nYou can install it via the following dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tagtraum\u003c/groupId\u003e\n    \u003cartifactId\u003ejaplcontact\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nThe Maven artifacts also contain sources and javadocs. \n\nIf you are using [modules](https://en.wikipedia.org/wiki/Java_Platform_Module_System),\nits name is `tagtraum.japlcontact`.\n\n\n## Usage\n                           \nTo use the generated code, do something like this:\n\n```java\nimport com.tagtraum.macos.contacts.Application;\n\npublic class GetMyCard {\n\n    public static void main(final String[] args) {\n        // get application\n        final Application application = Application.getInstance();\n        final Person card = application.getMyCard();\n        System.out.println(\"My Card: \" + card.getFirstName() + \" \" + card.getLastName());\n    }\n}\n```\n\n## API\n\nYou can find the complete [API here](https://japlscript.github.io/japlcontact/com/tagtraum/macos/contacts/package-summary.html). \n\n\n## AppleScript Sandbox\n\nSince macOS 10.14 (Mojave), Apple imposed a sandbox on AppleScript. Therefore\nyou may see dialog boxes requesting authorization to perform certain actions.\nAfter a while, these boxes simply disappear and there does not seem to be an easy\nway to authorize your app. In this case, you need to open the system preferences,\nnavigate to *Security \u0026 Privacy*, *Privacy*, and then *Automation*, and make\nsure your app is allowed to remote control whatever app you are trying to remote\ncontrol (see also [this article](https://blog.beatunes.com/2018/10/beatunes-on-mojave-and-windows-10-dark.html)).\n\nIf you are shipping a real app with a UI and not just a command line tool, you\nneed to customize the sandbox permission dialog. You can do so by adding\nthe key `NSAppleEventsUsageDescription` to your app bundle's `/Contents/Info.plist`\nfile. For example:\n\n    [...]\n    \u003ckey\u003eNSAppleEventsUsageDescription\u003c/key\u003e\n    \u003cstring\u003eSuperMusic uses AppleEvents to access your Music.app library,\n            e.g., to set BPM values or create playlists.\u003c/string\u003e\n    [...]\n\nApple's documentation for the keyword is [here](https://developer.apple.com/documentation/bundleresources/information_property_list/nsappleeventsusagedescription).\n\n**IMPORTANT** Counterintuitively, the bundle id for the Contacts app is `com.apple.AddressBook`. Should you\nneed to reset the sandbox using `tccutil`, you need to specify either `com.apple.AddressBook`\nor just `AddressBook`. `Contacts` or `com.apple.Contacts` won't work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaplscript%2Fjaplcontact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaplscript%2Fjaplcontact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaplscript%2Fjaplcontact/lists"}