(NEXSTAR) – A feature included in Apple’s latest iPhone update is something you probably don’t want to think about: who gets access to your phone if (or should we say when?) you die.

The change to Apple’s “Digital Legacy” feature is included in iOS 15.2. Now, you can designate contacts who will have access to your accounts when you pass away.

Those loved ones will have access to your photos, text messages, notes, apps and more. Certain things like payment information and passwords won’t be accessible, says Apple.

You can designate up to five loved ones as legacy contacts. You’ll be given an access code that you should put with the rest of your estate planning information. Eventually, one of your legacy contacts can present that access code and a death certificate to Apple to obtain access to your accounts.

Legacy contacts verified by the company will have access to the account for three years. At that time, the account will be permanently deleted, Apple says.

Here’s how to designate a legacy contact:

  1. Go to Settings on your iPhone and click your name at the top.
  2. Tap “Password & Security,” then “Legacy Contact.”
  3. Designate up to five contacts as legacy contacts.
  4. Print and save the access code. Your contacts will need this and your death certificate to gain access.

Apple has more information about how to request access to a deceased loved one’s account here.