Can non-Apple apps use user preferred term of address?

Hello folks!

I am looking into how to personalize my app based on iPhone user preferred term of address using TermOfAddress API (1, 2).

If I understand correctly, to use the API for personalization purposes the app should know user's selection (masculine, feminine, neuter).

What I don't understand is whether there is an API allowing to get user term of address which they set in their iPhone settings for 3P apps.

So the flow I am thinking of is:

  • User sets their preferred term of address in device settings
  • My app somehow is able to retrieve it and use TermsOfAddress concept to serve proper message in Spanish ("Bienvenido a mi aplicación!" for masculine vs "Bienvenida a mi aplicación!" for feminine vs "Les doy la bienvenida a mi aplicación" for neutral).

Apple support docs say

"Your preferred form of address. (Choose feminine, masculine, or neutral. Turn on Share with All Apps so all apps personalize how they address you. Available for some primary languages, for example, Spanish.)".

So I assume that there is a way for apps to retrieve this information. But I can't find any API for that.

Any thoughts on this? I wonder if "Share with all apps" means "Share with all 1P apps" and 3P apps can not use it (which means I have to ask user for their term of address from my app)?

Thanks!

Replies

I believe you could use:

NSMorphology.userMorphology.grammaticalGender

Note that you can only set gender through the system preferences if your primary language is a strongly gendered language (e.g. French), but once it is set you can switch back to English and it is still accessible.

You can then see it using

defaults read com.apple.morphology