Like most other devices, iPhones are graded on their dust and water resistance using an IP Code, also know as an Ingress Protection Rating or an International Protection Rating. Devices rated on this scale are assigned a score of 0-6 for dust resistance and 0-8 for water resistance.
Currently, the only smartphones with an IP68, the best overall rating a device can receive, are the Samsung Galaxy S7 and S8. However, Apple is seeking to catch up with Samsung and release an IP68 rated iPhone. Just recently, Apple filed a patent in Taiwan for what appears to be an iPhone with a IP68 rating.