5

I was wondering if it would be possible to simulate keyboard events - like key down and key up characters - and send them to the iOS device. Basically, I want to simulate a user pressing a key on the keyboard.

Cezar
  • 55,636
  • 19
  • 86
  • 87
colt
  • 89
  • 1
  • 9

2 Answers2

1

have a look at "Automated GUI testing for iOS", for example Automated testing for iPhone and How about UI automation testing for iOS app with instruments & Javascripts

You might not want a full blown automated test solution, but that way you can simulate your keyboard events.

There is also a blogpost mentioned: http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/

Community
  • 1
  • 1
Olaf
  • 3,042
  • 1
  • 16
  • 26
0

I don't think that's possible. But you could write code in textfield delegate or use NSNotificationCenter to get notification of each keypress. If that's what you are looking for.

Pritesh Acharya
  • 1,596
  • 5
  • 15
  • 36