Buying and setting up a new iPhone is a pleasant experience, but there are some headaches. One potential problem is when you realise that your friends' calls, texts and iMessages are still being directed to the old device - either as well as, or even worse instead of, your new device. This could be embarrassing if you've sold the old device or passed it on to a loved one.

And what if the new handset is an Android? This can cause annoyances with iMessage, which dutifully continues to send messages your way - and likely informs the sending device that they were delivered - even though you are now unable to pick them up.

In this article we go through the various problems associated with old iPhones and iPads picking up calls, texts and iMessages, and a series of solutions to fix them.

Stop messages being sent to old devices

The easiest way to stop an old iPhone getting your new messages and calls - and absolutely the one you should follow if you're selling it - is to completely wipe the device. This will remove all your accounts and settings as well as apps and files.

How to stop calls, texts and iMessages going to old iPhones: Reset device

Open the Settings app and go to General. Swipe down and tap Reset > Erase All Content and Settings, enter your Apple ID and password - this is important for this process to work - then confirm. (Note that it's wise to turn off Find My iPhone before wiping, too, although this isn't strictly relevant to this discussion.)

If you want to keep most of your settings intact, however, then you can stop messages being delivered by going to Settings (while the old SIM is still in the phone) and going to Messages > Send & Receive. Tap your Apple ID at the top and sign out.

How to stop calls, texts and iMessages going to old iPhones: Sign out

To stop FaceTime calls coming through, do the same thing via Settings > FaceTime - again, tap the ID at the top and sign out.

Stop iMessages being sent to an Android

iMessages is a great messaging system but it only works between iOS (and/or macOS) devices: if you try to send an iMessage to a mate with an Android phone iOS will tell you that you can't, and offer to send an SMS instead.

At least, that's the way it's supposed to work. But if the recipient's phone number is associated with an old Apple account and used to receive iMessages, the system can get confused. In these cases the message obviously won't be delivered, but the sending device may think it has.

If you migrate from iPhone to Android, it's important to 'de-register' yourself from the iMessage services this doesn't happen. Open the Settings app on the old iPhone and go to Messages, then tap the green slider next to iMessage at the top so it turns white. (Apple recommends doing the same thing for Settings > FaceTime while you're at it.)

Note that you can still do it even if you've got rid of the old iOS device (although you'll need access to the new device that has the same number). Enter your phone number into Apple's deregistration page then enter the confirmation code when you get it.