It has been discovered that a bug in Apple's iOS makes a perfect prank if you've got friends with an iPhone. When a particular string of characters is received by an iPhone it can cause the software to crash because it can't render those characters properly. Here, we explain what the bug is and how you can avoid it.

You might also like: 26 best new phones coming soon

What is the iPhone crashing prank?

We have no idea how this prank was discovered but it turns out that a specific string of Arabic characters can crash your iPhone if you're sent them through iMessage, Twitter, WhatsApp and more. It's a bug that Apple is now aware of and will probably be fixed soon, but for now you'll want to beware if you've got friends that think this kind of thing is funny.

According to Reddit, this issue stems from the way banner notifications process the Unicode text on your iPhone. "The banner briefly attempts to present the incoming text and then "gives up" thus the crash," says one user.

Therefore, if you've already got iMessage or another app open when the code comes through to that app, you won't experience the crash.

How to avoid the iPhone crashing prank

Thankfully, there is a way to prevent anyone from playing this cheeky prank on you until Apple releases a software fix. First, go to Settings > Notifications, and then go to Messages and slide the 'Show on Lock Screen' off. You'll also want to change Alert Style When Unlocked to None, too.

Annoyingly, you'll need to do this with every app you think someone might try sending the code through if you've got a particularly persistent friend. And of course, this also means you're not going to know when you get a new message unless you go to the app itself, so this is not an ideal solution in the long term!