Skip to content

Commit 9ff9218

Browse files
chore(update-plugins): Tue Jul 23 08:05:35 UTC 2024
1 parent 205a8c3 commit 9ff9218

File tree

2 files changed

+45
-43
lines changed

2 files changed

+45
-43
lines changed

content/plugins/contacts.md

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,37 @@ A plugin that allows you to access Contacts directory on iOS and Android. You ca
1515

1616
## Contents
1717

18-
- [Installation](#installation)
19-
- [Permissions requirements](#permissions-requirements)
20-
- [iOS Permission Requirements](#ios-permission-requirements)
21-
- [Android Permission Requirements](#android-permission-requirements)
22-
- [Use @nativescript/contacts](#use-nativescriptcontacts)
23-
24-
- [Get a contact](#get-a-contact)
25-
- [Create a new contact](#create-a-new-contact)
26-
- [Update a contact](#update-a-contact)
27-
- [Delete a contact](#delete-a-contact)
28-
- [Check if a contact is unified/linked](#check-if-a-contact-is-unifiedlinked-ios-specific)
29-
- [Get contacts by name](#get-contacts-by-name)
30-
- [Get all the contacts](#get-all-the-contacts)
31-
- [Get a contact by id](#get-a-contact-by-id)
32-
- [Get a group or groups of contacts](#get-a-group-or-groups-of-contacts)
33-
- [Create a new contacts group](#create-a-new-contacts-group)
34-
- [Delete a group of contacts](#delete-a-group-of-contacts)
35-
- [Add a contact to a group](#add-a-contact-to-a-group)
36-
- [Remove a contact from a group](#remove-a-contact-from-a-group)
37-
- [Get all the contacts of a group](#get-all-the-contacts-of-a-group)
38-
39-
- [API](#api)
40-
- [Group object structure](#group-object-structure)
41-
- [Contact class](#contact-class)
42-
- [PhoneNumber/EmailAddress structure](#phonenumberemailaddress-structure)
43-
- [Url structure](#url-structure)
44-
- [PostalAddress structure](#postaladdress-structure)
45-
- [Known Labels (for Urls, Addresses and Phones)](#known-labels-for-urls-addresses-and-phones)
46-
- [GetFetchResult object structure](#getfetchresult-object-structure)
47-
- [iOS contact object](#ios-contact-object)
48-
- [Credits](#credits)
49-
- [License](#license)
18+
- [@nativescript/contacts](#nativescriptcontacts)
19+
- [Contents](#contents)
20+
- [Installation](#installation)
21+
- [Permissions requirements](#permissions-requirements)
22+
- [iOS Permission Requirements](#ios-permission-requirements)
23+
- [Android Permission Requirements](#android-permission-requirements)
24+
- [Use @nativescript/contacts](#use-nativescriptcontacts)
25+
- [Get a contact](#get-a-contact)
26+
- [Create a new contact](#create-a-new-contact)
27+
- [Update a contact](#update-a-contact)
28+
- [Delete a contact](#delete-a-contact)
29+
- [Check if a contact is unified/linked (iOS Specific)](#check-if-a-contact-is-unifiedlinked-ios-specific)
30+
- [Get contacts by name](#get-contacts-by-name)
31+
- [Get all the contacts](#get-all-the-contacts)
32+
- [Get a contact by id](#get-a-contact-by-id)
33+
- [Get a group or groups of contacts](#get-a-group-or-groups-of-contacts)
34+
- [Create a new contacts group](#create-a-new-contacts-group)
35+
- [Delete a group of contacts](#delete-a-group-of-contacts)
36+
- [Add a contact to a group](#add-a-contact-to-a-group)
37+
- [Remove a contact from a group](#remove-a-contact-from-a-group)
38+
- [Get all the contacts of a group](#get-all-the-contacts-of-a-group)
39+
- [Contact class](#contact-class)
40+
- [PhoneNumber/EmailAddress structure](#phonenumberemailaddress-structure)
41+
- [Url structure](#url-structure)
42+
- [PostalAddress structure](#postaladdress-structure)
43+
- [Known Labels (for Urls, Addresses and Phones)](#known-labels-for-urls-addresses-and-phones)
44+
- [Group object structure](#group-object-structure)
45+
- [GetFetchResult object structure](#getfetchresult-object-structure)
46+
- [iOS contact object](#ios-contact-object)
47+
- [Credits](#credits)
48+
- [License](#license)
5049

5150
## Installation
5251

@@ -95,24 +94,22 @@ For API level `23+`, inform Android about which permissions your app needs from
9594

9695
## Use @nativescript/contacts
9796

98-
Once you've indicated the permissions your app needs from a user, you can request the permissions from the user by calling the `requestPermissions()` method from the `nativescript-permissions` plugin.
97+
Once you've indicated the permissions your app needs from a user, you can request the permissions from the user by calling the `request()` method from the `@nativescript-community/perms` plugin.
9998

10099
```ts
101100
import { Contact } from '@nativescript/contacts'
102-
import { requestPermissions } from 'nativescript-permissions'
101+
import { request } from '@nativescript-community/perms'
103102

104103
const contact = new Contact()
105104
// build a new contact...
106105

107-
requestPermissions(
108-
[
109-
android.Manifest.permission.GET_ACCOUNTS,
110-
android.Manifest.permission.READ_CONTACTS,
111-
android.Manifest.permission.WRITE_CONTACTS,
112-
android.Manifest.permission.GLOBAL_SEARCH,
113-
],
114-
"I need these permissions because I'm cool"
115-
).then(() => {
106+
requestPermissions({
107+
contacts: {},
108+
'android.permission.GET_ACCOUNTS': {},
109+
'android.permission.READ_CONTACTS': {},
110+
'android.permission.WRITE_CONTACTS': {},
111+
'android.permission.GLOBAL_SEARCH': {},
112+
}).then(() => {
116113
contact.save()
117114
})
118115
```

content/plugins/geolocation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ The following are the properties of the options object that you pass to the geol
139139
| `iosAllowsBackgroundLocationUpdates` | `boolean` | _Optional_: Indicates whether to allow the application to receive location updates in the background (ignored on Android). Defaults to `false`. If enabled, the `UIBackgroundModes` key in `Info.plist` is required. A. Read more in [Apple document](https://developer.apple.com/documentation/corelocation/cllocationmanager/1620568-allowsbackgroundlocationupdates?language=objc) |
140140
| `iosPausesLocationUpdatesAutomatically` | `boolean` | Indicates whether to allow the deactivation of the automatic pause of location updates (ignored on Android). Read more in [Apple document](https://developer.apple.com/documentation/corelocation/cllocationmanager/1620553-pauseslocationupdatesautomatical?language=objc) |
141141

142+
## Breaking changes
143+
144+
- 9.0+:
145+
- `watchLocation` is now `async` in order to check for permissions before attempting to watch
146+
142147
## Known issues
143148

144149
### openSettingsIfLocationHasBeenDenied on Android API level 30

0 commit comments

Comments
 (0)