expo-contacts 12.8.2 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/android/build.gradle +7 -94
- package/android/src/main/java/expo/modules/contacts/ContactsExceptions.kt +21 -0
- package/android/src/main/java/expo/modules/contacts/ContactsModule.kt +55 -51
- package/build/Contacts.d.ts +17 -7
- package/build/Contacts.d.ts.map +1 -1
- package/build/Contacts.js +14 -1
- package/build/Contacts.js.map +1 -1
- package/build/ExpoContacts.web.d.ts +0 -1
- package/build/ExpoContacts.web.d.ts.map +1 -1
- package/build/ExpoContacts.web.js +0 -3
- package/build/ExpoContacts.web.js.map +1 -1
- package/expo-module.config.json +3 -0
- package/ios/ContactControllerDelegate.swift +7 -0
- package/ios/ContactPickerControllerDelegate.swift +27 -0
- package/ios/ContactsExceptions.swift +91 -0
- package/ios/ContactsKey.swift +49 -0
- package/ios/ContactsModule.swift +628 -0
- package/ios/ContactsRecords.swift +146 -0
- package/ios/ContactsRequester.swift +41 -0
- package/ios/ContactsViewController.swift +23 -0
- package/ios/Decoding.swift +184 -0
- package/ios/{EXContacts.podspec → ExpoContacts.podspec} +7 -7
- package/ios/Serialization.swift +593 -0
- package/package.json +2 -2
- package/plugin/build/withContacts.js +5 -6
- package/plugin/src/withContacts.ts +6 -5
- package/src/Contacts.ts +24 -8
- package/src/ExpoContacts.web.ts +0 -3
- package/ios/EXContacts/EXContacts+Serialization.h +0 -32
- package/ios/EXContacts/EXContacts+Serialization.m +0 -582
- package/ios/EXContacts/EXContacts.h +0 -7
- package/ios/EXContacts/EXContacts.m +0 -1144
- package/ios/EXContacts/EXContactsPermissionRequester.h +0 -7
- package/ios/EXContacts/EXContactsPermissionRequester.m +0 -52
- package/ios/EXContacts/EXContactsViewController.h +0 -14
- package/ios/EXContacts/EXContactsViewController.m +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,25 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 13.0.0 — 2024-04-18
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- It is now possible to select contacts using OS-provided native contact pickers. ([#27541](https://github.com/expo/expo/pull/27541) by [@fobos531](https://github.com/fobos531))
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Fixed an issue where contacts could not be edited on either platform. ([#27703](https://github.com/expo/expo/pull/27703) by [@alanjhughes](https://github.com/alanjhughes))
|
|
22
|
+
|
|
23
|
+
### 💡 Others
|
|
24
|
+
|
|
25
|
+
- Prevent config plugin from writing permissions until prebuild. ([#28107](https://github.com/expo/expo/pull/28107) by [@EvanBacon](https://github.com/EvanBacon))
|
|
26
|
+
- drop unused web `name` property. ([#27437](https://github.com/expo/expo/pull/27437) by [@EvanBacon](https://github.com/EvanBacon))
|
|
27
|
+
- Reuse React Native `ShareOptions` type for `shareContactAsync` parameter typing. ([#26208](https://github.com/expo/expo/pull/26208) by [@Simek](https://github.com/Simek))
|
|
28
|
+
- [iOS] Migrate to Expo Modules. ([#25696](https://github.com/expo/expo/pull/25696) by [@alanjhughes](https://github.com/alanjhughes))
|
|
29
|
+
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
|
|
30
|
+
|
|
31
|
+
## 12.8.2 - 2023-12-19
|
|
14
32
|
|
|
15
33
|
_This version does not introduce any user-facing changes._
|
|
16
34
|
|
package/android/build.gradle
CHANGED
|
@@ -1,110 +1,23 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
|
-
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven-publish'
|
|
4
2
|
|
|
5
3
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '
|
|
4
|
+
version = '13.0.0'
|
|
7
5
|
|
|
8
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
useExpoPublishing()
|
|
15
|
-
useCoreDependencies()
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
buildscript {
|
|
20
|
-
// Simple helper that allows the root project to override versions declared by this library.
|
|
21
|
-
ext.safeExtGet = { prop, fallback ->
|
|
22
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Ensures backward compatibility
|
|
26
|
-
ext.getKotlinVersion = {
|
|
27
|
-
if (ext.has("kotlinVersion")) {
|
|
28
|
-
ext.kotlinVersion()
|
|
29
|
-
} else {
|
|
30
|
-
ext.safeExtGet("kotlinVersion", "1.8.10")
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
repositories {
|
|
35
|
-
mavenCentral()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
dependencies {
|
|
39
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
44
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
45
|
-
afterEvaluate {
|
|
46
|
-
publishing {
|
|
47
|
-
publications {
|
|
48
|
-
release(MavenPublication) {
|
|
49
|
-
from components.release
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
repositories {
|
|
53
|
-
maven {
|
|
54
|
-
url = mavenLocal().url
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
7
|
+
apply from: expoModulesCorePlugin
|
|
8
|
+
applyKotlinExpoModulesCorePlugin()
|
|
9
|
+
useCoreDependencies()
|
|
10
|
+
useDefaultAndroidSdkVersions()
|
|
11
|
+
useExpoPublishing()
|
|
60
12
|
|
|
61
13
|
android {
|
|
62
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
63
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
64
|
-
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
65
|
-
|
|
66
|
-
defaultConfig {
|
|
67
|
-
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
68
|
-
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
publishing {
|
|
72
|
-
singleVariant("release") {
|
|
73
|
-
withSourcesJar()
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
lintOptions {
|
|
78
|
-
abortOnError false
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
83
|
-
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
|
|
84
|
-
compileOptions {
|
|
85
|
-
sourceCompatibility JavaVersion.VERSION_11
|
|
86
|
-
targetCompatibility JavaVersion.VERSION_11
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
kotlinOptions {
|
|
90
|
-
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
14
|
namespace "expo.modules.contacts"
|
|
95
15
|
defaultConfig {
|
|
96
16
|
versionCode 29
|
|
97
|
-
versionName "
|
|
17
|
+
versionName "13.0.0"
|
|
98
18
|
}
|
|
99
|
-
|
|
100
19
|
}
|
|
101
20
|
|
|
102
21
|
dependencies {
|
|
103
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
104
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
105
|
-
implementation project(':expo-modules-core')
|
|
106
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
107
|
-
}
|
|
108
|
-
|
|
109
22
|
implementation 'androidx.annotation:annotation:1.2.0'
|
|
110
23
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
package expo.modules.contacts
|
|
2
|
+
|
|
3
|
+
import expo.modules.kotlin.exception.CodedException
|
|
4
|
+
|
|
5
|
+
class ContactPickingInProgressException :
|
|
6
|
+
CodedException("Different contact picking in progress. Await other contact picking first.")
|
|
7
|
+
|
|
8
|
+
class ContactManipulationInProgressException :
|
|
9
|
+
CodedException("Different contact manipulation in progress. Await other contact manipulation first.")
|
|
10
|
+
|
|
11
|
+
class MissingPermissionException(permission: String) : CodedException("Missing $permission permission")
|
|
12
|
+
|
|
13
|
+
class RetrieveIdException : CodedException("Couldn't get the contact id")
|
|
14
|
+
|
|
15
|
+
class AddContactException : CodedException("Given contact couldn't be added")
|
|
16
|
+
|
|
17
|
+
class ContactNotFoundException : CodedException("Couldn't find contact")
|
|
18
|
+
|
|
19
|
+
class ContactUpdateException : CodedException("Given contact couldn't be updated")
|
|
20
|
+
|
|
21
|
+
class LookupKeyNotFoundException : CodedException("Couldn't find lookup key for contact")
|
|
@@ -18,13 +18,8 @@ import expo.modules.contacts.models.PhoneNumberModel
|
|
|
18
18
|
import expo.modules.contacts.models.PostalAddressModel
|
|
19
19
|
import expo.modules.contacts.models.RelationshipModel
|
|
20
20
|
import expo.modules.contacts.models.UrlAddressModel
|
|
21
|
-
import expo.modules.core.ModuleRegistry
|
|
22
|
-
import expo.modules.core.interfaces.ActivityEventListener
|
|
23
|
-
import expo.modules.core.interfaces.ActivityProvider
|
|
24
|
-
import expo.modules.core.interfaces.services.UIManager
|
|
25
21
|
import expo.modules.interfaces.permissions.Permissions
|
|
26
22
|
import expo.modules.kotlin.Promise
|
|
27
|
-
import expo.modules.kotlin.exception.CodedException
|
|
28
23
|
import expo.modules.kotlin.exception.Exceptions
|
|
29
24
|
import expo.modules.kotlin.modules.Module
|
|
30
25
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
@@ -33,18 +28,6 @@ import expo.modules.kotlin.records.Record
|
|
|
33
28
|
import kotlinx.coroutines.launch
|
|
34
29
|
import java.util.UUID
|
|
35
30
|
|
|
36
|
-
class MissingPermissionException(permission: String) : CodedException("Missing $permission permission")
|
|
37
|
-
|
|
38
|
-
class RetrieveIdException : CodedException("Couldn't get the contact id")
|
|
39
|
-
|
|
40
|
-
class AddContactException : CodedException("Given contact couldn't be added")
|
|
41
|
-
|
|
42
|
-
class ContactNotFoundException : CodedException("Couldn't find contact")
|
|
43
|
-
|
|
44
|
-
class ContactUpdateException : CodedException("Given contact couldn't be updated")
|
|
45
|
-
|
|
46
|
-
class LookupKeyNotFoundException : CodedException("Couldn't find lookup key for contact")
|
|
47
|
-
|
|
48
31
|
data class ContactPage(
|
|
49
32
|
val data: List<Contact>,
|
|
50
33
|
val hasPreviousPage: Boolean = false,
|
|
@@ -83,6 +66,7 @@ private val defaultFields = setOf(
|
|
|
83
66
|
)
|
|
84
67
|
|
|
85
68
|
const val RC_EDIT_CONTACT = 2137
|
|
69
|
+
const val RC_PICK_CONTACT = 2138
|
|
86
70
|
|
|
87
71
|
// TODO: Evan: default API is confusing. Duplicate data being requested.
|
|
88
72
|
private val DEFAULT_PROJECTION = listOf(
|
|
@@ -134,9 +118,8 @@ class QueryArguments(
|
|
|
134
118
|
)
|
|
135
119
|
|
|
136
120
|
class ContactsModule : Module() {
|
|
137
|
-
private
|
|
138
|
-
private var
|
|
139
|
-
private var mPendingPromise: Promise? = null
|
|
121
|
+
private var contactPickingPromise: Promise? = null
|
|
122
|
+
private var contactManipulationPromise: Promise? = null
|
|
140
123
|
|
|
141
124
|
private val permissionsManager: Permissions
|
|
142
125
|
get() = appContext.permissions ?: throw Exceptions.PermissionsModuleNotFound()
|
|
@@ -147,18 +130,6 @@ class ContactsModule : Module() {
|
|
|
147
130
|
override fun definition() = ModuleDefinition {
|
|
148
131
|
Name("ExpoContacts")
|
|
149
132
|
|
|
150
|
-
OnCreate {
|
|
151
|
-
appContext
|
|
152
|
-
.legacyModule<UIManager>()
|
|
153
|
-
?.registerActivityEventListener(mActivityEventListener)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
OnDestroy {
|
|
157
|
-
appContext
|
|
158
|
-
.legacyModule<UIManager>()
|
|
159
|
-
?.unregisterActivityEventListener(mActivityEventListener)
|
|
160
|
-
}
|
|
161
|
-
|
|
162
133
|
AsyncFunction("requestPermissionsAsync") { promise: Promise ->
|
|
163
134
|
if (permissionsManager.isPermissionPresentInManifest(Manifest.permission.WRITE_CONTACTS)) {
|
|
164
135
|
Permissions.askForPermissionsWithPermissionsManager(permissionsManager, promise, Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS)
|
|
@@ -272,17 +243,63 @@ class ContactsModule : Module() {
|
|
|
272
243
|
uri.toString()
|
|
273
244
|
}
|
|
274
245
|
|
|
275
|
-
AsyncFunction("presentFormAsync") { contactId: String?, contactData: Map<String, Any
|
|
246
|
+
AsyncFunction("presentFormAsync") { contactId: String?, contactData: Map<String, Any>?, options: Map<String, Any?>?, promise: Promise ->
|
|
276
247
|
ensureReadPermission()
|
|
277
248
|
|
|
249
|
+
if (contactManipulationPromise != null) {
|
|
250
|
+
throw ContactManipulationInProgressException()
|
|
251
|
+
}
|
|
252
|
+
|
|
278
253
|
if (contactId != null) {
|
|
279
254
|
val contact = getContactById(contactId, defaultFields) ?: throw ContactNotFoundException()
|
|
280
255
|
presentEditForm(contact, promise)
|
|
281
256
|
return@AsyncFunction
|
|
282
257
|
}
|
|
283
258
|
// Create contact from supplied data.
|
|
284
|
-
|
|
285
|
-
|
|
259
|
+
if (contactData != null) {
|
|
260
|
+
val contact = mutateContact(null, contactData)
|
|
261
|
+
contactManipulationPromise = promise
|
|
262
|
+
presentForm(contact)
|
|
263
|
+
}
|
|
264
|
+
promise.resolve()
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
OnActivityResult { _, payload ->
|
|
268
|
+
val (requestCode, resultCode, intent) = payload
|
|
269
|
+
if (requestCode == RC_EDIT_CONTACT) {
|
|
270
|
+
val pendingPromise = contactManipulationPromise ?: return@OnActivityResult
|
|
271
|
+
|
|
272
|
+
pendingPromise.resolve(0)
|
|
273
|
+
|
|
274
|
+
contactManipulationPromise = null
|
|
275
|
+
}
|
|
276
|
+
if (requestCode == RC_PICK_CONTACT) {
|
|
277
|
+
val pendingPromise = contactPickingPromise ?: return@OnActivityResult
|
|
278
|
+
|
|
279
|
+
if (resultCode == Activity.RESULT_CANCELED) {
|
|
280
|
+
pendingPromise.resolve()
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (resultCode == Activity.RESULT_OK) {
|
|
284
|
+
val contactId = intent?.data?.lastPathSegment
|
|
285
|
+
val contact = getContactById(contactId, defaultFields)
|
|
286
|
+
pendingPromise.resolve(contact?.toMap(defaultFields))
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
contactPickingPromise = null
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
AsyncFunction("presentContactPickerAsync") { promise: Promise ->
|
|
294
|
+
if (contactPickingPromise != null) {
|
|
295
|
+
throw ContactPickingInProgressException()
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
val intent = Intent(Intent.ACTION_PICK)
|
|
299
|
+
intent.setType(ContactsContract.Contacts.CONTENT_TYPE)
|
|
300
|
+
|
|
301
|
+
contactPickingPromise = promise
|
|
302
|
+
activity.startActivityForResult(intent, RC_PICK_CONTACT)
|
|
286
303
|
}
|
|
287
304
|
}
|
|
288
305
|
|
|
@@ -291,8 +308,7 @@ class ContactsModule : Module() {
|
|
|
291
308
|
intent.putExtra(ContactsContract.Intents.Insert.NAME, contact.getFinalDisplayName())
|
|
292
309
|
intent.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, contact.contentValues)
|
|
293
310
|
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
|
294
|
-
|
|
295
|
-
activityProvider.currentActivity.startActivity(intent)
|
|
311
|
+
activity.startActivity(intent)
|
|
296
312
|
}
|
|
297
313
|
|
|
298
314
|
private fun presentEditForm(contact: Contact, promise: Promise) {
|
|
@@ -302,9 +318,8 @@ class ContactsModule : Module() {
|
|
|
302
318
|
)
|
|
303
319
|
val intent = Intent(Intent.ACTION_EDIT)
|
|
304
320
|
intent.setDataAndType(selectedContactUri, ContactsContract.Contacts.CONTENT_ITEM_TYPE)
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
activityProvider.currentActivity.startActivityForResult(intent, RC_EDIT_CONTACT)
|
|
321
|
+
contactManipulationPromise = promise
|
|
322
|
+
activity.startActivityForResult(intent, RC_EDIT_CONTACT)
|
|
308
323
|
}
|
|
309
324
|
|
|
310
325
|
private val resolver: ContentResolver
|
|
@@ -663,17 +678,6 @@ class ContactsModule : Module() {
|
|
|
663
678
|
ensureReadPermission()
|
|
664
679
|
ensureWritePermission()
|
|
665
680
|
}
|
|
666
|
-
|
|
667
|
-
private inner class ContactsActivityEventListener : ActivityEventListener {
|
|
668
|
-
override fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, intent: Intent?) {
|
|
669
|
-
val pendingPromise = mPendingPromise ?: return
|
|
670
|
-
if (requestCode == RC_EDIT_CONTACT) {
|
|
671
|
-
pendingPromise.resolve(0)
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
override fun onNewIntent(intent: Intent) = Unit
|
|
676
|
-
}
|
|
677
681
|
}
|
|
678
682
|
|
|
679
683
|
fun <T> Map<String, Any>.safeGet(key: String): T? {
|
package/build/Contacts.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PermissionResponse, PermissionStatus } from 'expo-modules-core';
|
|
2
|
+
import { type ShareOptions } from 'react-native';
|
|
2
3
|
export type CalendarFormatType = CalendarFormats | `${CalendarFormats}`;
|
|
3
4
|
export type ContainerType = ContainerTypes | `${ContainerTypes}`;
|
|
4
5
|
export type ContactType = ContactTypes | `${ContactTypes}`;
|
|
@@ -72,12 +73,14 @@ export type PhoneNumber = {
|
|
|
72
73
|
isPrimary?: boolean;
|
|
73
74
|
/**
|
|
74
75
|
* Phone number without format.
|
|
75
|
-
* @example
|
|
76
|
+
* @example
|
|
77
|
+
* `8674305`
|
|
76
78
|
*/
|
|
77
79
|
digits?: string;
|
|
78
80
|
/**
|
|
79
81
|
* Country code.
|
|
80
|
-
* @example
|
|
82
|
+
* @example
|
|
83
|
+
* `us`
|
|
81
84
|
*/
|
|
82
85
|
countryCode?: string;
|
|
83
86
|
/**
|
|
@@ -206,7 +209,7 @@ export type UrlAddress = {
|
|
|
206
209
|
*/
|
|
207
210
|
export type Image = {
|
|
208
211
|
/**
|
|
209
|
-
* A
|
|
212
|
+
* A local image URI.
|
|
210
213
|
* > **Note**: If you have a remote URI, download it first using [`FileSystem.downloadAsync`](/versions/latest/sdk/filesystem/#filesystemdownloadasyncuri-fileuri-options).
|
|
211
214
|
*/
|
|
212
215
|
uri?: string;
|
|
@@ -295,7 +298,7 @@ export type Contact = {
|
|
|
295
298
|
department?: string;
|
|
296
299
|
/**
|
|
297
300
|
* Additional information.
|
|
298
|
-
* >
|
|
301
|
+
* > The `note` field [requires your app to request additional entitlements](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_contacts_notes).
|
|
299
302
|
* > The Expo Go app does not contain those entitlements, so in order to test this feature you will need to [request the entitlement from Apple](https://developer.apple.com/contact/request/contact-note-field),
|
|
300
303
|
* > set the [`ios.accessesContactNotes`](./../config/app/#accessescontactnotes) field in **app config** to `true`, and [create your development build](/develop/development-builds/create-a-build/).
|
|
301
304
|
*/
|
|
@@ -368,7 +371,7 @@ export type ContactResponse = {
|
|
|
368
371
|
*/
|
|
369
372
|
hasNextPage: boolean;
|
|
370
373
|
/**
|
|
371
|
-
* This will be `true if there are previous contacts that weren't retrieved due to `pageOffset` limit.
|
|
374
|
+
* This will be `true` if there are previous contacts that weren't retrieved due to `pageOffset` limit.
|
|
372
375
|
*/
|
|
373
376
|
hasPreviousPage: boolean;
|
|
374
377
|
};
|
|
@@ -527,7 +530,7 @@ export { PermissionStatus, PermissionResponse };
|
|
|
527
530
|
* @returns A promise that fulfills with a `boolean`, indicating whether the Contacts API is available on the current device. It always resolves to `false` on web.
|
|
528
531
|
*/
|
|
529
532
|
export declare function isAvailableAsync(): Promise<boolean>;
|
|
530
|
-
export declare function shareContactAsync(contactId: string, message: string, shareOptions?:
|
|
533
|
+
export declare function shareContactAsync(contactId: string, message: string, shareOptions?: ShareOptions): Promise<any>;
|
|
531
534
|
/**
|
|
532
535
|
* Return a list of contacts that fit a given criteria. You can get all of the contacts by passing no criteria.
|
|
533
536
|
* @param contactQuery Object used to query contacts.
|
|
@@ -644,7 +647,7 @@ export declare function presentFormAsync(contactId?: string | null, contact?: Co
|
|
|
644
647
|
*/
|
|
645
648
|
export declare function addExistingGroupToContainerAsync(groupId: string, containerId: string): Promise<any>;
|
|
646
649
|
/**
|
|
647
|
-
* Create a group with a name, and add it to a container. If the container is undefined
|
|
650
|
+
* Create a group with a name, and add it to a container. If the container is `undefined`, the default container will be targeted.
|
|
648
651
|
* @param name Name of the new group.
|
|
649
652
|
* @param containerId The container you to add membership to.
|
|
650
653
|
* @return A promise that fulfills with ID of the new group.
|
|
@@ -716,6 +719,13 @@ export declare function removeContactFromGroupAsync(contactId: string, groupId:
|
|
|
716
719
|
* @platform ios
|
|
717
720
|
*/
|
|
718
721
|
export declare function getGroupsAsync(groupQuery: GroupQuery): Promise<Group[]>;
|
|
722
|
+
/**
|
|
723
|
+
* Presents a native contact picker to select a single contact from the system. On Android, the `READ_CONTACTS` permission is required. You can
|
|
724
|
+
* obtain this permission by calling the [Contacts.requestPermissionsAsync()](#contactsrequestpermissionsasync) method. On iOS, no permissions are
|
|
725
|
+
* required to use this method.
|
|
726
|
+
* @return A promise that fulfills with a single `Contact` object if a contact is selected or `null` if no contact is selected (when selection is canceled).
|
|
727
|
+
*/
|
|
728
|
+
export declare function presentContactPickerAsync(): Promise<Contact | null>;
|
|
719
729
|
/**
|
|
720
730
|
* Get the default container's ID.
|
|
721
731
|
* @return A promise that fulfills with default container ID.
|
package/build/Contacts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contacts.d.ts","sourceRoot":"","sources":["../src/Contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAA6B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Contacts.d.ts","sourceRoot":"","sources":["../src/Contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAA6B,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAIlE,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,GAAG,eAAe,EAAE,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,GAAG,cAAc,EAAE,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,GAAG,YAAY,EAAE,CAAC;AAE3D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;AAE7C,MAAM,MAAM,IAAI,GAAG;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM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;OAEG;IACH,IAAI,SAAS;CACd;AAED,oBAAY,YAAY;IACtB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,OAAO,YAAY;CACpB"}
|
package/build/Contacts.js
CHANGED
|
@@ -9,6 +9,7 @@ export { PermissionStatus };
|
|
|
9
9
|
export async function isAvailableAsync() {
|
|
10
10
|
return !!ExpoContacts.getContactsAsync;
|
|
11
11
|
}
|
|
12
|
+
// @docsMissing
|
|
12
13
|
export async function shareContactAsync(contactId, message, shareOptions = {}) {
|
|
13
14
|
if (Platform.OS === 'ios') {
|
|
14
15
|
const url = await writeContactToFileAsync({
|
|
@@ -222,7 +223,7 @@ export async function addExistingGroupToContainerAsync(groupId, containerId) {
|
|
|
222
223
|
return await ExpoContacts.addExistingGroupToContainerAsync(groupId, containerId);
|
|
223
224
|
}
|
|
224
225
|
/**
|
|
225
|
-
* Create a group with a name, and add it to a container. If the container is undefined
|
|
226
|
+
* Create a group with a name, and add it to a container. If the container is `undefined`, the default container will be targeted.
|
|
226
227
|
* @param name Name of the new group.
|
|
227
228
|
* @param containerId The container you to add membership to.
|
|
228
229
|
* @return A promise that fulfills with ID of the new group.
|
|
@@ -332,6 +333,18 @@ export async function getGroupsAsync(groupQuery) {
|
|
|
332
333
|
}
|
|
333
334
|
return await ExpoContacts.getGroupsAsync(groupQuery);
|
|
334
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Presents a native contact picker to select a single contact from the system. On Android, the `READ_CONTACTS` permission is required. You can
|
|
338
|
+
* obtain this permission by calling the [Contacts.requestPermissionsAsync()](#contactsrequestpermissionsasync) method. On iOS, no permissions are
|
|
339
|
+
* required to use this method.
|
|
340
|
+
* @return A promise that fulfills with a single `Contact` object if a contact is selected or `null` if no contact is selected (when selection is canceled).
|
|
341
|
+
*/
|
|
342
|
+
export async function presentContactPickerAsync() {
|
|
343
|
+
if (!ExpoContacts.presentContactPickerAsync) {
|
|
344
|
+
throw new UnavailabilityError('Contacts', 'presentContactPickerAsync');
|
|
345
|
+
}
|
|
346
|
+
return await ExpoContacts.presentContactPickerAsync();
|
|
347
|
+
}
|
|
335
348
|
/**
|
|
336
349
|
* Get the default container's ID.
|
|
337
350
|
* @return A promise that fulfills with default container ID.
|