clayallsopp / motion-screenshots

Automatic screenshots for your RubyMotion apps
MIT License
41 stars 2 forks source link

Broken on XCode6 / CoreSimulator #3

Closed HealsCodes closed 9 years ago

HealsCodes commented 9 years ago

If used with XCode 6 motion-screenshots is looking for screenshots in the wrong directory resulting in a crash:

================================================================================
The application terminated. A crash report file may have been generated by the
system, use `rake crashlog' to open it. Use `rake debug=1' to restart the app
in the debugger.
================================================================================
/Users/shirk/.rvm/gems/ruby-2.2.0/gems/motion-screenshots-0.1.0/lib/motion-screenshots.rb:54:in `dirname': no implicit conversion of nil into String (TypeError)
        from /Users/shirk/.rvm/gems/ruby-2.2.0/gems/motion-screenshots-0.1.0/lib/motion-screenshots.rb:54:in `block (3 levels) in <top (required)>'

The old path ~/Library/Developer/CoreSimulator/Devices/*/Applications is no longer available and simulator apps have moved to ~/Library/Developer/CoreSimulator/Devices/<SIM_UUID>/data/Containers/Data/Application/<APP_UUID>/

clayallsopp commented 9 years ago

Ah I see - I'd also be happy to merge any PR which fixes this! (maybe there's a better constant/method to use inside the RubyMotion library itself?)

HealsCodes commented 9 years ago

Since creating this issue I've been working on a reliable way to locate the app data and the simulator instance. Does the screenshots target support specifying the simulated device? I could usecthat as a starting point for a fix.

Also - would you require backward compatibility to older Xcode versions?