시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설치 프롬프트를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-contacts`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/contacts/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목Capgo의 AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins다음 명령어를 사용하여 플러그인을 설치하고 아래의 플랫폼별 지침을 따르세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-contacts` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-contactsbunx cap syncImport
Import 섹션import { CapacitorContacts } from '@capgo/capacitor-contacts';API 개요
API 개요 섹션countContacts
연락처 수를 카운트하는 섹션기기에 있는 연락처의 총 수를 계산합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.countContacts();createContact
연락처를 프로그램적으로 생성하는 섹션새로운 연락처를 프로그램적으로 생성합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.createContact({} as CreateContactOptions);createGroup
그룹 만들기새로운 연락처 그룹을 만듭니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.createGroup({} as CreateGroupOptions);deleteContactById
연락처 삭제ID로 연락처를 삭제합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.deleteContactById({} as DeleteContactByIdOptions);deleteGroupById
그룹 삭제ID로 그룹을 삭제합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.deleteGroupById({} as DeleteGroupByIdOptions);displayContactById
연락처 표시ID로 연락처를 표시합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.displayContactById({} as DisplayContactByIdOptions);displayCreateContact
displayCreateContact기본 연락처 UI를 표시합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.displayCreateContact();displayUpdateContactById
displayUpdateContactById특정 연락처의 기본 연락처 UI를 표시합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.displayUpdateContactById({} as DisplayUpdateContactByIdOptions);getAccounts
getAccounts기기에서 사용 가능한 모든 계정을 가져옵니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.getAccounts();getContactById
getContactByIdID로 특정 연락처를 가져옵니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.getContactById({} as GetContactByIdOptions);getContacts
getContacts기기에 있는 모든 연락처를 가져옵니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.getContacts();getGroupById
getGroupById특정 그룹 ID로 그룹을 가져옵니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.getGroupById({} as GetGroupByIdOptions);getGroups
getGroups기기에 있는 모든 연락처 그룹을 가져옵니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.getGroups();isAvailable
isAvailable기기에 연락처가 있는지 확인합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.isAvailable();isSupported
isSupported현재 플랫폼에서 플러그인을 지원하는지 확인합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.isSupported();openSettings
openSettings장치의 연락처 설정을 열어줍니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.openSettings();pickContact
pickContact자연스러운 연락처 선택기를 사용하여 단일 연락처를 선택합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.pickContact();pickContacts
pickContacts자연스러운 연락처 선택기를 사용하여 하나 이상의 연락처를 선택합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.pickContacts();updateContactById
업데이트 연락처 ID기존 연락처 ID로 연락처를 업데이트합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.updateContactById({} as UpdateContactByIdOptions);checkPermissions
권한 확인연락처에 대한 현재 권한 상태를 확인합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.checkPermissions();requestPermissions
연락처 접근 권한 요청연락처에 접근하기 위해 권한을 요청합니다.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.requestPermissions();타입 참조
타입 참조CountContactsResult
CountContactsResult연락처 수를 세는 결과입니다.
export interface CountContactsResult { /** * Total number of contacts. * * @since 1.0.0 */ count: number;}CreateContactOptions
CreateContactOptions연락처를 만들기 위한 옵션입니다.
export interface CreateContactOptions { /** * Contact information to create. The 'id' field will be generated automatically. * * @since 1.0.0 */ contact: Omit<Contact, 'id'>;}CreateContactResult
CreateContactResult연락처를 만들기 위한 결과입니다.
export interface CreateContactResult { /** * The ID of the newly created contact. * * @since 1.0.0 */ id: string;}CreateGroupOptions
CreateGroupOptions그룹을 만들기 위한 옵션입니다.
export interface CreateGroupOptions { /** * Group information to create. The 'id' field will be generated automatically. * * @since 1.0.0 */ group: Omit<Group, 'id'>;}CreateGroupResult
CreateGroupResult그룹을 만들 때의 결과입니다.
export interface CreateGroupResult { /** * The ID of the newly created group. * * @since 1.0.0 */ id: string;}DeleteContactByIdOptions
DeleteContactByIdOptionsID로 연락처를 삭제하는 옵션입니다.
export interface DeleteContactByIdOptions { /** * The ID of the contact to delete. * * @since 1.0.0 */ id: string;}DeleteGroupByIdOptions
DeleteGroupByIdOptionsID로 그룹을 삭제하는 옵션입니다.
export interface DeleteGroupByIdOptions { /** * The ID of the group to delete. * * @since 1.0.0 */ id: string;}DisplayContactByIdOptions
DisplayContactByIdOptionsID로 연락처를 표시하는 옵션입니다.
export interface DisplayContactByIdOptions { /** * The ID of the contact to display. * * @since 1.0.0 */ id: string;}DisplayCreateContactOptions
DisplayCreateContactOptionsnative 연락처 UI를 표시하는 옵션
export interface DisplayCreateContactOptions { /** * Optional pre-filled contact information for the create UI. * * @since 1.0.0 */ contact?: Omit<Contact, 'id'>;}DisplayCreateContactResult
DisplayCreateContactResultnative 연락처 UI를 표시한 결과
export interface DisplayCreateContactResult { /** * The ID of the created contact, if one was created. Undefined if the user cancelled. * * @since 1.0.0 */ id?: string;}DisplayUpdateContactByIdOptions
DisplayUpdateContactByIdOptionsnative 연락처 업데이트 UI를 표시하는 옵션
export interface DisplayUpdateContactByIdOptions { /** * The ID of the contact to update. * * @since 1.0.0 */ id: string;}GetAccountsResult
DisplayUpdateContactByIdResultnative 연락처 업데이트 UI를 표시한 결과
export interface GetAccountsResult { /** * List of accounts available on the device. * * @since 1.0.0 */ accounts: Account[];}실제 데이터의 원천
실제 데이터의 원천 섹션이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.
Getting Started에서 계속
Getting Started에서 계속 섹션이 플러그인을 사용하는 경우 Getting Started 계획 대시보드 및 API 운영을 위해 Using @capgo/capacitor-contacts Using @capgo/capacitor-contacts Using @API/__CAPGO_KEEP_1__-contacts를 사용하는 경우의 native capability implementation 세부 정보를 위한 API 개요 소개 implementation 세부 정보를 위한 소개 API 키 implementation 세부 정보를 위한 API 키, 그리고 장치 implementation 세부 정보를 위한 장치