You wanted to ask the root password to user and then system("su -c app")?
Since it has to be jailbroken to even consider running as root, if you deploy it using Cydia, you can include an installation script that would grant your command the suid bit (chmod s+u), so that script would be runnable by user mobile, but would run as root.
That's the approach I use at least.
Dunno if there's a more interactive way.