A new iMessage prank is crashing iPhones and iPads with a simple string of text and emojis. The prank exploits a bug in iOS whereby sending a specific three-character message causes the recipient's phone to immediately freeze up.

The device-crashing text involves sending an iMessage containing a white flag emoji followed by a zero and a rainbow. This will cause the victim's phone to become unresponsive even if they don't open the text and their phone is locked.

The bug has been reported by Filip Koroy, owner of YouTube channel EverythingApplePro. According to Koroy, the problem is down to the device attempting to combine the three characters into a rainbow flag emoji, but failing.

"The rainbow flag emoji consists of three layers. It's basically trying to make a rainbow flag but it just can't compile it together," he explained.

The device will restart after a couple of minutes and the bug only appears to be affecting iPhones and iPads running iOS version 10.1 or below. So if you don't fancy falling foul of the prank, we recommend you update to the latest iOS version 10.2 sharpish.

How to check what version of iOS you are using

You can check which version you are on by heading to the settings menu in your iPhone or iPad, then going to General>About. Note that iOS 10.2 is only compatible with the iPhone 5 and later and iPad 2/ iPad Mini 2 and later, meaning if you've got a model older than this you might not be able to avoid the bug until Apple issues a fix.

The other method for the prank involves embedding the same characters into a contacts file, then sending it to an iMessage contact via iCloud Drive. According to The Guardian, victims will need to delete the entire iMessage conversation with their (now presumably former) friend if they want to avoid their phone or tablet crashing each time they open the message window.

Apple has yet to acknowledge the issue, which is similar to a bug reported by iPhone users in 2015 whereby sending a string of text that included Arabic characters caused users' phones to crash and reboot.

Last year, EverythingApplePro uncovered a bug caused by a corrupted video file that crashed iPhones when viewed.