Here’s a quick trick that can help filter out spam text messages on your iPhone. Start by opening Settings.

iphone-settings

Then choose Messages.

messages-iphone

Scroll down to Message Filtering. Slide Filter Unknown Senders to the On position. Messages from people who aren’t in your contacts won’t cause notifications and they’ll be sorted into a separate list.

filter-unknown-senders

If you want to see messages from unknown senders, you can click the Unknown Senders tab in your iMessage inbox.

unknown-senders