Anyone get iCuke to work with XCode 4?
I'm trying to follow the iCuke tutorial at http://pragprog.com/magazines/2010-07/bdd-on-iphone-icuke
I get a time out error when trying to run the first feature:
Given "QuickContacts.xcod开发者_C百科eproj" is loaded in the simulator # iCuke-0.6.3/lib/icuke/cucumber.rb:197
execution expired (Timeout::Error)
/opt/local/lib/ruby/1.8/timeout.rb:64:in `start'
/opt/local/lib/ruby/1.8/net/http.rb:1035:in `request'
features/add_contact.feature:7:in `Given "QuickContacts.xcodeproj" is loaded in the simulator'
I had all kinds of problems getting this (more precisely iCuke in general) to work a few days ago. I'm afraid in the end I abandonded it and went for Frank instead.
That said I had the same problem with Frank but I found a better solution to the problem than fixing the XCode integration (imho). Take a look at this project: I whipped up a cucumber step to boot my binaries in the simulator without the need for crufty Applescripts that convince XCode to do your bidding. Perhaps you can do something similar for iCuke?
For anyone interested...our step looks something like this:
def run_app_in_simulator
target = ENV['TARGET_PATH'] // how you set this is down to you....
if not system('ios-sim', 'launch', target, '--verbose', '--sdk', '4.2', '--exit', '--family', 'ipad')
raise "Unable to launch simulator"
end
end
After tinkering around a little bit in xcode, I was able to get past the timeout issue. It looks like this can be resolved if "Universal Access" is enabled: Click on "Xcode -> Preferences->Documentation" , ensure that Universal Access is selected.
精彩评论