expo-contacts
Advanced tools
Comparing version 5.0.2 to 6.0.0-rc.0
@@ -6,5 +6,2 @@ import { UnavailabilityError } from '@unimodules/core'; | ||
export async function shareContactAsync(contactId, message, shareOptions = {}) { | ||
if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
if (Platform.OS === 'ios') { | ||
@@ -19,5 +16,6 @@ const url = await writeContactToFileAsync({ | ||
} | ||
else { | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
else if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
} | ||
@@ -24,0 +22,0 @@ export async function getContactsAsync(contactQuery = {}) { |
{ | ||
"name": "expo-contacts", | ||
"version": "5.0.2", | ||
"version": "6.0.0-rc.0", | ||
"description": "Provides access to the phone's system contacts.", | ||
@@ -43,3 +43,3 @@ "main": "build/Contacts.js", | ||
}, | ||
"gitHead": "f213c9be2a909dae42a0a27d8aa4b9eac8e97be1" | ||
} | ||
"gitHead": "6334f82adccb529e9347e348c874bd8f6a92cacc" | ||
} |
@@ -240,5 +240,2 @@ import { UnavailabilityError } from '@unimodules/core'; | ||
): Promise<any> { | ||
if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
if (Platform.OS === 'ios') { | ||
@@ -253,7 +250,9 @@ const url = await writeContactToFileAsync({ | ||
}, | ||
shareOptions | ||
shareOptions, | ||
); | ||
} else { | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
} else if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
} | ||
@@ -260,0 +259,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2787
216383
1