They did release a new SDK, it's nice.
Found a (hacky) solution. We wrote an applescript which moves the iPhone Simulator to the top left-hand side of the display, waits a second and then generates a click event in the location we know the facebook "Okay" button will be. This function takes care of that...
def click_okay_button
%x{osascript<<APPLESCRIPT
tell application "iPhone Simulator"
activate
end tell
tell application "System Events"
tell process "iPhone Simulator"
set the position of the first window to {1, 1, 1, 1}
delay 1
click at {300, 162}
end tell
end tell
APPLESCRIPT}
end
And then in the test, we tap the login button, sleep for a little while to ensure the UI will be ready on the facebook page, and then run our applescript.
When /^I tap the "(.*?)" button$/ do |arg1|
touch "view:'UIButton' marked:'Facebook Login Button@2x'"
sleep 8.0
click_okay_button();
end
The sleep hangs the cucumber process passed the point where it would normally exit when the app goes into the background.
Not pretty, but it works. :)