Yes, i know device API calls will work on device only.
The code i pasted above always shows a blank page.(white blank) on ipad when installed.
most important point is the sample code. A working code example will be A great favor if someone like to share.
answering question means you want to help or you want just another plus point in total posts.
if i want to help someone i would sure give a sample code or at least a link to find more details otherwise really doubt about usefulness of Q&A.