Jailbroke detection

Currently, we're trying to detect whether device is jailbroken or not. Based on the jailbroken detection, we're blocking user to access app.

we tried the methodologies which is metioned in below link and achieved the proper results,

https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/jailbreak-detection-methods/

But after installing Liberty app through ***** in jailbroke device, all the check got failed and i can successfully open the application.

Is apple providing any api's to detect this jailbroke device? Please advice.