expo-contacts 15.0.5 → 15.0.6

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/android/build.gradle +2 -2
  3. package/expo-module.config.json +1 -1
  4. package/ios/Serialization.swift +18 -32
  5. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.module → 15.0.6/expo.modules.contacts-15.0.6.module} +7 -7
  6. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.module.md5 +1 -0
  7. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.module.sha1 +1 -0
  8. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.module.sha256 +1 -0
  9. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.module.sha512 +1 -0
  10. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.pom → 15.0.6/expo.modules.contacts-15.0.6.pom} +1 -1
  11. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.pom.md5 +1 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.pom.sha1 +1 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.pom.sha256 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.6/expo.modules.contacts-15.0.6.pom.sha512 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/maven-metadata.xml +4 -4
  16. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/maven-metadata.xml.md5 +1 -1
  17. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/maven-metadata.xml.sha1 +1 -1
  18. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/maven-metadata.xml.sha256 +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/maven-metadata.xml.sha512 +1 -1
  20. package/package.json +3 -3
  21. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.module.md5 +0 -1
  22. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.module.sha1 +0 -1
  23. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.module.sha256 +0 -1
  24. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.module.sha512 +0 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.pom.md5 +0 -1
  26. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.pom.sha1 +0 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.pom.sha256 +0 -1
  28. package/local-maven-repo/host/exp/exponent/expo.modules.contacts/15.0.5/expo.modules.contacts-15.0.5.pom.sha512 +0 -1
  29. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5-sources.jar → 15.0.6/expo.modules.contacts-15.0.6-sources.jar} +0 -0
  30. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5-sources.jar.md5 → 15.0.6/expo.modules.contacts-15.0.6-sources.jar.md5} +0 -0
  31. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5-sources.jar.sha1 → 15.0.6/expo.modules.contacts-15.0.6-sources.jar.sha1} +0 -0
  32. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5-sources.jar.sha256 → 15.0.6/expo.modules.contacts-15.0.6-sources.jar.sha256} +0 -0
  33. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5-sources.jar.sha512 → 15.0.6/expo.modules.contacts-15.0.6-sources.jar.sha512} +0 -0
  34. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.aar → 15.0.6/expo.modules.contacts-15.0.6.aar} +0 -0
  35. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.aar.md5 → 15.0.6/expo.modules.contacts-15.0.6.aar.md5} +0 -0
  36. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.aar.sha1 → 15.0.6/expo.modules.contacts-15.0.6.aar.sha1} +0 -0
  37. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.aar.sha256 → 15.0.6/expo.modules.contacts-15.0.6.aar.sha256} +0 -0
  38. /package/local-maven-repo/host/exp/exponent/expo.modules.contacts/{15.0.5/expo.modules.contacts-15.0.5.aar.sha512 → 15.0.6/expo.modules.contacts-15.0.6.aar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 15.0.6 — 2025-08-31
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [iOS] Fixed issue with missing `instantMessageAddresses` on iOS ([#38985](https://github.com/expo/expo/pull/38985) by [@hryhoriiK97](https://github.com/hryhoriiK97))
18
+ - [iOS] Added handling for optional labels. ([#38985](https://github.com/expo/expo/pull/39247) by [@hryhoriiK97](https://github.com/hryhoriiK97))
19
+
13
20
  ## 15.0.5 — 2025-08-27
14
21
 
15
22
  _This version does not introduce any user-facing changes._
@@ -23,6 +30,7 @@ _This version does not introduce any user-facing changes._
23
30
  ### 🐛 Bug fixes
24
31
 
25
32
  - fix `CNContactViewController` presentation ([#39004](https://github.com/expo/expo/pull/39004) by [@vonovak](https://github.com/vonovak))
33
+ - [iOS] Fixed undefined labels for emails in contacts. ([#39222](https://github.com/expo/expo/pull/39222) by [@NorseGaud](https://github.com/hryhoriiK97)
26
34
 
27
35
  ## 15.0.2 — 2025-08-16
28
36
 
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '15.0.5'
7
+ version = '15.0.6'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.contacts"
11
11
  defaultConfig {
12
12
  versionCode 29
13
- versionName "15.0.5"
13
+ versionName "15.0.6"
14
14
  }
15
15
  }
16
16
 
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.contacts",
11
- "version": "15.0.5",
11
+ "version": "15.0.6",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -308,7 +308,7 @@ func serializeContact(person: CNContact, keys: [String]?, directory: URL?) throw
308
308
  }
309
309
  }
310
310
  if keysToFetch.contains(CNContactInstantMessageAddressesKey) {
311
- let values = socialProfilesFor(contact: person)
311
+ let values = instantMessageAddressesFor(contact: person)
312
312
  if let values {
313
313
  contact[ContactsKey.instantMessageAddresses] = values
314
314
  }
@@ -371,9 +371,7 @@ private func relationsFor(contact person: CNContact) -> [[String: Any]]? {
371
371
  var relation = [String: Any]()
372
372
  relation["name"] = val.name
373
373
  relation["id"] = container.identifier
374
- if let label = container.label {
375
- relation["label"] = CNLabeledValue<NSString>.localizedString(forLabel: label)
376
- }
374
+ relation["label"] = getLocalizedLabel(from: container.label)
377
375
  results.append(relation)
378
376
  }
379
377
 
@@ -390,7 +388,7 @@ private func instantMessageAddressesFor(contact person: CNContact) -> [[String:
390
388
  address["localizedService"] = CNInstantMessageAddress.localizedString(forKey: val.service)
391
389
  address["username"] = val.username
392
390
  address["id"] = container.identifier
393
- address["label"] = container.label
391
+ address["label"] = getLocalizedLabel(from: container.label)
394
392
  results.append(address)
395
393
  }
396
394
 
@@ -409,9 +407,7 @@ private func socialProfilesFor(contact person: CNContact) -> [[String: Any]]? {
409
407
  profile["username"] = val.username
410
408
  profile["userId"] = val.userIdentifier
411
409
  profile["id"] = container.identifier
412
- if let label = container.label {
413
- profile["label"] = CNLabeledValue<NSString>.localizedString(forLabel: label)
414
- }
410
+ profile["label"] = getLocalizedLabel(from: container.label)
415
411
  results.append(profile)
416
412
  }
417
413
 
@@ -423,12 +419,7 @@ private func emailsFor(contact person: CNContact) -> [[String: Any]]? {
423
419
 
424
420
  for container in person.emailAddresses {
425
421
  let emailAddress = container.value as String
426
- if let label = container.label {
427
- let emailLabel = CNLabeledValue<NSString>.localizedString(forLabel: label)
428
- results.append(["email": emailAddress, "label": emailLabel, "id": container.identifier])
429
- } else {
430
- results.append(["email": emailAddress, "id": container.identifier])
431
- }
422
+ results.append(["email": emailAddress, "label": getLocalizedLabel(from: container.label), "id": container.identifier])
432
423
  }
433
424
 
434
425
  return results.isEmpty ? nil : results
@@ -444,9 +435,7 @@ private func phoneNumbersFor(contact person: CNContact) -> [[String: Any]]? {
444
435
  phoneNumber["countryCode"] = val.value(forKey: "countryCode")
445
436
  phoneNumber["digits"] = val.value(forKey: "digits")
446
437
  phoneNumber["id"] = container.identifier
447
- if let label = container.label {
448
- phoneNumber["label"] = CNLabeledValue<NSString>.localizedString(forLabel: label)
449
- }
438
+ phoneNumber["label"] = getLocalizedLabel(from: container.label)
450
439
  results.append(phoneNumber)
451
440
  }
452
441
 
@@ -467,11 +456,7 @@ private func addressesFor(contact person: CNContact) -> [[String: Any]]? {
467
456
  address["country"] = val.country
468
457
  address["isoCountryCode"] = val.isoCountryCode
469
458
  address["id"] = container.identifier
470
-
471
- if let label = container.label {
472
- address["label"] = CNLabeledValue<NSString>.localizedString(forLabel: label)
473
- }
474
-
459
+ address["label"] = getLocalizedLabel(from: container.label)
475
460
  results.append(address)
476
461
  }
477
462
 
@@ -505,12 +490,7 @@ private func urlsFor(contact person: CNContact) -> [[String: Any]]? {
505
490
 
506
491
  for container in person.urlAddresses {
507
492
  let urlAddress = container.value
508
- if let label = container.label {
509
- let urlLabel = CNLabeledValue<NSString>.localizedString(forLabel: label)
510
- results.append(["url": urlAddress, "label": urlLabel, "id": container.identifier])
511
- } else {
512
- results.append(["url": urlAddress, "id": container.identifier])
513
- }
493
+ results.append(["url": urlAddress, "label": getLocalizedLabel(from: container.label), "id": container.identifier])
514
494
  }
515
495
 
516
496
  return results.isEmpty ? nil : results
@@ -518,7 +498,6 @@ private func urlsFor(contact person: CNContact) -> [[String: Any]]? {
518
498
 
519
499
  private func datesFor(contact person: CNContact) -> [[String: Any]]? {
520
500
  var results = [[String: Any]]()
521
-
522
501
  for container in person.dates {
523
502
  let val = container.value
524
503
  var date = [String: Any]()
@@ -529,9 +508,7 @@ private func datesFor(contact person: CNContact) -> [[String: Any]]? {
529
508
  if let calendar = val.calendar {
530
509
  date["format"] = calendarFormatToString(calendar.identifier)
531
510
  }
532
- if let label = container.label {
533
- date["label"] = CNLabeledValue<NSString>.localizedString(forLabel: label)
534
- }
511
+ date["label"] = getLocalizedLabel(from: container.label)
535
512
  results.append(date)
536
513
  }
537
514
 
@@ -542,6 +519,15 @@ private func fieldHasValue(field: String) -> Bool {
542
519
  return !field.isEmpty
543
520
  }
544
521
 
522
+ private func getLocalizedLabel(from label: String?) -> String {
523
+ if let label = label {
524
+ return CNLabeledValue<NSString>.localizedString(forLabel: label)
525
+ }
526
+ // Use localized "other" label to match iOS's standard.
527
+ // Since label is optional (String?), we provide a default value to ensure consistent label handling.
528
+ return CNLabeledValue<NSString>.localizedString(forLabel: CNLabelOther)
529
+ }
530
+
545
531
  private func calendarFormatToString(_ identifier: Calendar.Identifier) -> String {
546
532
  let mapping: [Calendar.Identifier: String] = [
547
533
  .gregorian: "gregorian",
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.contacts",
6
- "version": "15.0.5",
6
+ "version": "15.0.6",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.contacts-15.0.5.aar",
28
- "url": "expo.modules.contacts-15.0.5.aar",
27
+ "name": "expo.modules.contacts-15.0.6.aar",
28
+ "url": "expo.modules.contacts-15.0.6.aar",
29
29
  "size": 110210,
30
30
  "sha512": "9b4eb25c6973464079f6217fb1636fc94afca78a2fe1b34c815491a6f424d4700dabcc1192afec7ce70bcb3426e9517cceeaa64e5e3fd9568eb4087e73a3872e",
31
31
  "sha256": "bf95197f5375c51a051ea0a2fc1e9706b1e0ca53b27b6bafdc54f3d9180882c8",
@@ -60,8 +60,8 @@
60
60
  ],
61
61
  "files": [
62
62
  {
63
- "name": "expo.modules.contacts-15.0.5.aar",
64
- "url": "expo.modules.contacts-15.0.5.aar",
63
+ "name": "expo.modules.contacts-15.0.6.aar",
64
+ "url": "expo.modules.contacts-15.0.6.aar",
65
65
  "size": 110210,
66
66
  "sha512": "9b4eb25c6973464079f6217fb1636fc94afca78a2fe1b34c815491a6f424d4700dabcc1192afec7ce70bcb3426e9517cceeaa64e5e3fd9568eb4087e73a3872e",
67
67
  "sha256": "bf95197f5375c51a051ea0a2fc1e9706b1e0ca53b27b6bafdc54f3d9180882c8",
@@ -80,8 +80,8 @@
80
80
  },
81
81
  "files": [
82
82
  {
83
- "name": "expo.modules.contacts-15.0.5-sources.jar",
84
- "url": "expo.modules.contacts-15.0.5-sources.jar",
83
+ "name": "expo.modules.contacts-15.0.6-sources.jar",
84
+ "url": "expo.modules.contacts-15.0.6-sources.jar",
85
85
  "size": 19972,
86
86
  "sha512": "b56feb83e945a7b4df2ca5a71da12aa5d4dc939082da448ab8548bc4967bb24eb48062902db6f3bb234e47d2ad2e55647c3b39f344af2cecd6d87f5b2b5f6aaa",
87
87
  "sha256": "7805b5686f14c0034af179db4c28f3af823529d1f21fca8eac2355601cca4636",
@@ -0,0 +1 @@
1
+ 673c47e1c20ab2b1e69b0bd2bb52f5b7717b83ea7faaf3dabb88fc059cc2c40e
@@ -0,0 +1 @@
1
+ 5846e7d6f8221a02d123f85242baa5a589ee0cf47b815fb269859edbcc885787f40adeea52cb0d3d9cdc84f4c790a08989fc881ad0498b5837f35ab7d2d491f7
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.contacts</artifactId>
12
- <version>15.0.5</version>
12
+ <version>15.0.6</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.contacts</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ ad2ea6203058f8101afc0ae026ee958322b314d0109d63728249b0cc5a6e92aa
@@ -0,0 +1 @@
1
+ 8f01a3ecee3e679c46964f4495bc926df415d84f8aefb2b4bfb93bea11fee479e48992e9fa076221a4c68b061ec386a06d634001e1240aeaa2ad12707fba3687
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.contacts</artifactId>
5
5
  <versioning>
6
- <latest>15.0.5</latest>
7
- <release>15.0.5</release>
6
+ <latest>15.0.6</latest>
7
+ <release>15.0.6</release>
8
8
  <versions>
9
- <version>15.0.5</version>
9
+ <version>15.0.6</version>
10
10
  </versions>
11
- <lastUpdated>20250827210801</lastUpdated>
11
+ <lastUpdated>20250831124210</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 1e26ef86dcf65057d1f5dad087e00cb3
1
+ ac2e1d4d07cc3bb9674a8b4c328e2a30
@@ -1 +1 @@
1
- 154df007129bb912708fa837b79383fdcec545a3
1
+ 9e401e9b0fdf5a6e8def44f96ad5e04910754feb
@@ -1 +1 @@
1
- 01f0acde89aacf1f7a15fa516aaa74116e322276817b0c0c793c0d42cc345801
1
+ 4e8f38aa201d8b2f877f50203c4f361aa90b27ed22d0a5e8c664cc0a01fd6074
@@ -1 +1 @@
1
- a1f3dbafbd6eb0f07fa9afd517eec5417504cbd2a69530fe094a9db96b701596822a9420010351667f954d128181271c3da9c67a734becd275b855b97bc65500
1
+ 0e0e630226a3d058b20d2977e26a54837d67d52660b7e85c0dfcc5bd359f043c5726a63baeda9a2d0a9418295a4a10edb74dae525defac45e40c7bdd87e2815e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-contacts",
3
- "version": "15.0.5",
3
+ "version": "15.0.6",
4
4
  "description": "Provides access to the phone's system contacts.",
5
5
  "main": "src/index.ts",
6
6
  "types": "build/index.d.ts",
@@ -34,12 +34,12 @@
34
34
  "preset": "expo-module-scripts"
35
35
  },
36
36
  "devDependencies": {
37
- "expo-module-scripts": "^5.0.4"
37
+ "expo-module-scripts": "^5.0.5"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "expo": "*",
41
41
  "react": "*",
42
42
  "react-native": "*"
43
43
  },
44
- "gitHead": "48faa7b9a9f93a7660cb80aa118c7f6bf0aeff38"
44
+ "gitHead": "1dafdaa317c182191909a94a355c8b08a2654783"
45
45
  }
@@ -1 +0,0 @@
1
- d322f2b57ab1410654531f59a9416e921983d18529839a6be0be23aa8f07ce55
@@ -1 +0,0 @@
1
- eb8f3aaeeba1d7cff42407651b9b1a1e005a23530e3e7c0ef4cde0bf597540a695b9de939c346ac8d3a776657806fdbb5570d51c074e2a5392a7c8bda7cd18e3
@@ -1 +0,0 @@
1
- f73c9b9fd65936d2bc9d1673d2e24fbc5eedc5461e0cf0cd2299adc0a179fb2a
@@ -1 +0,0 @@
1
- e0c0d510eba0de117ab2d91833b9935873807aa7da93ff503b593c6e2540248d34fbc4ee48f2c985dae33bba7a1215f3865124917e92b845a675d90c03aa32c1