Is there an official way to verify that my app is not running on a rooted device?
How to block iOS App to run on a Rooted device?
Is there an official way to verify … my app … ?
That would be the App Attest service. See Establishing your app’s integrity.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Is there an official way to verify that my app is not running on a rooted device?
DeviceCheck and App Attest - but beware. Why do you want to do this? It’s possible for someone to buy you app, try to run it on their jailbroken device, find that it doesn’t work, and then submit a 0-star app store review. You need to ask yourself, what does a bad review cost my business, and what does a user running my app (paid for) on their rooted device cost my business?
There are also false positives. In the app where I’ve deployed App Attest, my guess is that about 0.2% of users fail app attest validation for no good reason. Apple says that you should consider App Attest as just part of your anti-fraud policy. It’s not clear to me what other factors they expect us to consider, not least as privacy policies limit what other input is available.
Fundamentally, the best solution to avoiding fraud is to develop apps that appeal to demographics who are less likely to attempt to defraud you - what Dilbert called “rich stupid people”.
App Attest will help provide general guarantees that you're App is running on genuine Apple hardware and your App is running unmodified on a user's device. However, in the cases of a jailbreak / root, the latter may not always hold true. It will still be good practice to adopt to get as close to ensuring that your App is genuine on the user's device.