1

I am developing a screen recorder and facing a crazy requirement. My boss would like to have an option for a user to automatically pause recording when the current view has a password field. (That view might belong to a third-party app.)

So, is it possible to check if the topmost view has any password text field?

This is an enterprise app so private api is allowed. Any pointer from jailbreak community is also welcome.

patrick
  • 138
  • 1
  • 7
  • 2
    Why downvote? ..."Use your downvotes whenever you encounter an egregiously sloppy, no-effort-expended post, or an answer that is clearly and perhaps dangerously incorrect." – patrick Apr 29 '13 at 21:01
  • 3
    Unfortunately, jailbreak questions tend to solicit a lot of close votes from non-jailbreak devs who just want to censor questions. – Nate Apr 29 '13 at 21:14
  • I'm on my mobile now, but if the question's still open tonight, I'll try to answer later. – Nate Apr 29 '13 at 21:17

1 Answers1

-1

It would be much easier if you could just use your own views but this should work for either your own views or a third party view. BUt anyway, every time you would load up a UIView check all of its subviews, in the ViewDidLoad Method i would think and for each subview check for its class type in your case it would be UITextField. Since these are the only textfields where you can set secure text entry as its text type. Every time you find a UITExtView check if its secureTextEntry is equal to TRUE. If it is true disable the recording until that view is removed from the screen. That should be what you need.

Esko918
  • 1,397
  • 1
  • 12
  • 25
  • 2
    Thanks for answering. My app is running in the background so the topmost view might be from a third party app. I tried your solution. It works only the view is from my app. Thx anyway – patrick Apr 29 '13 at 21:01
  • Well you can use the same method i just told you about but you are going to have to figure out how to do precisely what you will need. In your case, even though you are running in the background there has to be a way for you to check the apps current view since you are already running your code with in the app. Overall this might not exactly work because, i know this might sound dumb, but your kinda forcing the programmer to use secure text in their UITExtFields and if they dont your program wont work as intended. – Esko918 Apr 29 '13 at 21:06
  • 1
    "your kinda forcing the programmer to use secure text in their UITExtFields and if they dont your program wont work as intended." I am aware of that. but i think detecting the secure text is a good start. – patrick Apr 29 '13 at 21:22
  • Im really wondering why someoone downvoted my answer so whomever did please clarify why as it i am not correct – Esko918 May 07 '13 at 16:24