Yes. iOS allows constructing and sending ICMP packages. Many years ago, Apple published example code for this, which is the core part of this: https://github.com/samiyr/SwiftyPing