react-native-contacts 8.0.7 → 8.0.9
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/index.d.ts +2 -2
- package/ios/RCTContacts/RCTContacts.h +6 -9
- package/ios/RCTContacts/RCTContacts.mm +1 -1
- package/package.json +4 -4
- package/src/NativeContacts.ts +10 -10
- package/.tool-versions +0 -1
package/index.d.ts
CHANGED
|
@@ -24,10 +24,10 @@ export function getContactsByEmailAddress(
|
|
|
24
24
|
emailAddress: string
|
|
25
25
|
): Promise<Contact[]>;
|
|
26
26
|
export function checkPermission(): Promise<
|
|
27
|
-
"authorized" | "denied" | "undefined"
|
|
27
|
+
"authorized" | "denied" | "undefined" | "limited"
|
|
28
28
|
>;
|
|
29
29
|
export function requestPermission(): Promise<
|
|
30
|
-
"authorized" | "denied" | "undefined"
|
|
30
|
+
"authorized" | "denied" | "undefined" | "limited"
|
|
31
31
|
>;
|
|
32
32
|
export function writePhotoToPath(
|
|
33
33
|
contactId: string,
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
#import <React/RCTBridgeModule.h>
|
|
2
2
|
#import <Contacts/Contacts.h>
|
|
3
3
|
#import <ContactsUI/ContactsUI.h>
|
|
4
|
-
#import <Foundation/Foundation.h>
|
|
5
|
-
|
|
6
4
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
7
|
-
|
|
8
5
|
#import <RNContactsSpec/RNContactsSpec.h>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
#else
|
|
6
|
+
#endif
|
|
12
7
|
|
|
13
|
-
#import <React/RCTBridgeModule.h>
|
|
14
8
|
@interface RCTContacts : NSObject <RCTBridgeModule, CNContactViewControllerDelegate>
|
|
15
9
|
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
10
|
@end
|
|
19
11
|
|
|
12
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
13
|
+
@interface RCTContacts: NSObject <NativeContactsSpec, CNContactViewControllerDelegate>
|
|
14
|
+
|
|
15
|
+
@end
|
|
16
|
+
#endif
|
|
@@ -63,7 +63,7 @@ RCT_EXPORT_METHOD(checkPermission:(RCTPromiseResolveBlock)resolve
|
|
|
63
63
|
} else if (authStatus == CNAuthorizationStatusAuthorized) {
|
|
64
64
|
resolve(@"authorized");
|
|
65
65
|
} else if (@available(iOS 18, *)) {
|
|
66
|
-
if (authStatus ==
|
|
66
|
+
if (authStatus == CNAuthorizationStatusLimited) {
|
|
67
67
|
resolve(@"limited");
|
|
68
68
|
} else {
|
|
69
69
|
resolve(@"undefined");
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "react-native-contacts",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
|
-
"url": "https://github.com/
|
|
5
|
+
"url": "https://github.com/morenoh149/react-native-contacts.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "8.0.
|
|
7
|
+
"version": "8.0.9",
|
|
8
8
|
"description": "React Native Contacts (android & ios)",
|
|
9
9
|
"nativePackage": true,
|
|
10
10
|
"keywords": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"android"
|
|
18
18
|
],
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/
|
|
20
|
+
"url": "https://github.com/morenoh149/react-native-contacts/issues"
|
|
21
21
|
},
|
|
22
22
|
"@react-native-community/bob": {
|
|
23
23
|
"source": "src",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typescript"
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
|
-
"homepage": "https://github.com/
|
|
31
|
+
"homepage": "https://github.com/morenoh149/react-native-contacts",
|
|
32
32
|
"main": "index.ts",
|
|
33
33
|
"types": "index.d.ts",
|
|
34
34
|
"scripts": {
|
package/src/NativeContacts.ts
CHANGED
|
@@ -22,20 +22,20 @@ export interface Spec extends TurboModule {
|
|
|
22
22
|
requestPermission: () => Promise<PermissionType>;
|
|
23
23
|
writePhotoToPath: (contactId: string, file: string) => Promise<boolean>;
|
|
24
24
|
iosEnableNotesUsage: (enabled: boolean) => void;
|
|
25
|
-
getGroups()
|
|
26
|
-
getGroup
|
|
27
|
-
deleteGroup(identifier: string)
|
|
28
|
-
updateGroup(identifier: string, groupData: Object)
|
|
29
|
-
addGroup(group: Object)
|
|
30
|
-
contactsInGroup(identifier: string)
|
|
31
|
-
addContactsToGroup(
|
|
25
|
+
getGroups?: () => Promise<Group[]>;
|
|
26
|
+
getGroup?: (identifier: string) => Promise<Group | null>;
|
|
27
|
+
deleteGroup?: (identifier: string) => Promise<boolean>;
|
|
28
|
+
updateGroup?: (identifier: string, groupData: Object) => Promise<Group>;
|
|
29
|
+
addGroup?: (group: Object) => Promise<Group>;
|
|
30
|
+
contactsInGroup?: (identifier: string) => Promise<Contact[]>;
|
|
31
|
+
addContactsToGroup?: (
|
|
32
32
|
groupIdentifier: string,
|
|
33
33
|
contactIdentifiers: string[]
|
|
34
|
-
)
|
|
35
|
-
removeContactsFromGroup(
|
|
34
|
+
) => Promise<boolean>;
|
|
35
|
+
removeContactsFromGroup?: (
|
|
36
36
|
groupIdentifier: string,
|
|
37
37
|
contactIdentifiers: string[]
|
|
38
|
-
)
|
|
38
|
+
) => Promise<boolean>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export default TurboModuleRegistry.get<Spec>("RCTContacts");
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 22.15.0
|