While not a standalone app, the Jordan Pass website and digital pass should be purchased before arrival. It bundles your tourist visa fee with entry to over 40 attractions including Petra.
Jordan: Buy the Jordan Pass online before you fly. The Wanderer package (three-day Petra access) pays for itself immediately since Petra entry alone costs 50 JOD and the pass starts at 70 JOD with visa included.