# Nicer message for accessing contacts

**URL:** <https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718>\
**Category:** macOS\
**Created:** [June 5, 2015, 4:32am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718 "2015-06-05T04:32:02Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [June 5, 2015, 4:32am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/1 "2015-06-05T04:32:02Z")

</div>

Whenever my application crashes it offers to send a mail to me with crash and session logs. To make the user enter less information I read out the me card from Contacts to prefil email address and name. However, the message when accessing the contacts makes some users think that I read out ALL contacts.

![](http://i.imgur.com/endB994.png)

Is there a way to make this message nicer?

[code] try  
dim theAddressbook as new ABAddressBookMBS

```
if theAddressbook = nil then Return

dim theMe as ABPersonMBS = theAddressbook.owner
if theMe = nil then Return

dim theABEmails as ABMultiValueMBS = theMe.valueForProperty(theAddressbook.kABEmailProperty)
if theABEmails = nil or theABEmails.count = 0 then Return
dim theEmail as String = theABEmails.valueAtIndex(0).StringValue

me.Text = theEmail

```

catch err as UnsupportedOperationException  
Return  
end try[/code]

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [June 5, 2015, 4:57pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/2 "2015-06-05T16:57:42Z")

</div>

No that’s built in from Apple when you try to access contacts for the first time. I don’t know what it says in that language, but the English version doesn’t sound bad or anything.

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [June 5, 2015, 5:01pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/3 "2015-06-05T17:01:24Z")

</div>

the English version says

> [@](#):
>
> “” would like to access your contacts  
> [Don’t Allow] [OK]

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [June 5, 2015, 5:48pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/4 "2015-06-05T17:48:22Z")

</div>

Sorry for the German screenshot. Been doing too much localization.

@Tim: some customers are a bit paranoid. “The application wants to access all my contacts” is what they think.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [June 5, 2015, 10:25pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/5 "2015-06-05T22:25:48Z")

</div>

> [@192177:@Beatrix Willius](#):
>
> @Tim: some customers are a bit paranoid. “The application wants to access all my contacts” is what they think.

Technically speaking, that’s the level of access the app is requesting. I have made that same assumption before as a user when an app that doesn’t need my contacts asks for them. I would just take the auto-populate code out.

---

<div class="post-metadata">

**Author:** ![Ulrich\_Bogun](https://forum.xojo.com/user_avatar/forum.xojo.com/ulrich_bogun/32/1864_2.png) [@Ulrich\_Bogun](https://forum.xojo.com/u/Ulrich_Bogun)\
**Post date:** [June 5, 2015, 11:10pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/6 "2015-06-05T23:10:12Z")

</div>

In that case, how about showing a dialogue box before you access the addressbook that’s telling the user that (and why and mabye what) you want to have access to his addressbook and that he does not have to be concerned  there will never be a part of his addressbook sent to places outside the app?

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [June 6, 2015, 12:25am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/7 "2015-06-06T00:25:32Z")

</div>

In App Wrapper, click on the “Info” tab and then the “+” symbol at the bottom of the first list, select “Sandbox” and then “Contact Usage Description”.

It doesn’t (yet) support multiple languages, but it’s something that I can look into for the future.

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [June 6, 2015, 5:10am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/8 "2015-06-06T05:10:01Z")

</div>

@Tim: autopopulating data from the me card helps with typos (some people can’t input their own email address) and confusion (had a case where a customer put in MY email address).

@Ulrich: 2 messages boxes? I’d rather not. The information about privacy and data is there. But the user can only see this after the contacts message box. And I rather think that not too many read this.

@Sam: no MAS, no sandbox.

I could swear that I once used an application that had a nicer error message. But I can’t remember which application.

---

<div class="post-metadata">

**Author:** ![Maximilian\_Tyrtania](https://forum.xojo.com/user_avatar/forum.xojo.com/maximilian_tyrtania/32/294_2.png) [@Maximilian\_Tyrtania](https://forum.xojo.com/u/Maximilian_Tyrtania)\
**Post date:** [June 6, 2015, 6:47am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/9 "2015-06-06T06:47:26Z")

</div>

> [@](#):
>
> @Sam: no MAS, no sandbox.

You may want to use App wrapper anyway just to explain why you need access to contacts in “Contact Usage Description”.

@Sam: It would be great if we could localize these strings.

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [June 6, 2015, 8:08am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/10 "2015-06-06T08:08:27Z")

</div>

@Max: I’ll have a look.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [June 7, 2015, 2:54am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/11 "2015-06-07T02:54:19Z")

</div>

> [@192294:@Beatrix Willius](#):
>
> @Sam: no MAS, no sandbox.

It’s not a Sandbox entitlement, it’s a info.plist key, but it goes hand-in-hand with the Sandbox entitlement, it may or may not work outside of a Sandboxed application. If you have App Wrapper, give it a quick try.

> [@192303:@Maximilian Tyrtania](#):
>
> @Sam: It would be great if we could localize these strings.

I’m pretty sure it’s possible, it just that I need to build the interface into App Wrapper, that’s the head scratcher!

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [June 7, 2015, 4:10am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/12 "2015-06-07T04:10:39Z")

</div>

Localizing PLIST strings is definitely possible  
Just not intuitive 😛

See [https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html)  
Basically you create a new InfoPlist.strings file with the keys you want to localize with their localized values in each localizations lproj directory just like a localized strings file

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [June 7, 2015, 11:27am UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/13 "2015-06-07T11:27:20Z")

</div>

Nope, doesn’t make a difference. I guess this only works for Sandboxed apps.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [June 7, 2015, 12:35pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/14 "2015-06-07T12:35:28Z")

</div>

> [@192502:@Beatrix Willius](#):
>
> Nope, doesn’t make a difference. I guess this only works for Sandboxed apps.

Okay, thanks for trying… Sorry it didn’t help.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:47pm UTC](https://forum.xojo.com/t/nicer-message-for-accessing-contacts/24718/15 "2020-10-29T17:47:19Z")

</div>


