clayallsopp / motion-screenshots

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

KSScreenshotManager requires to limit iPhoneSimulator archs to 'i386' #4

Closed HealsCodes closed 9 years ago

HealsCodes commented 9 years ago

The current version of KSScreenshotManager uses a symbol only available in the 32bit simulator:

Undefined symbols for architecture x86_64:
  "_UIGetScreenImage", referenced from:
      -[KSScreenshotManager saveScreenshot:includeStatusBar:] in libPods-KSScreenshotManager.a(KSScreenshotManager.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rake aborted!

So unless the build architectures for the simulator are explicitly limited to i386 the above linker error will occur. The issue was reported - and so far dismissed - (see: https://github.com/ksuther/KSScreenshotManager/issues/18)

Currently I'm working around this by having the following hack in my Rakefile:

app.development do
    # ...
    if Rake.application.top_level_targets.include? 'screenshots'
        app.archs['iPhoneSimulator'] = %w(i386)
    end
    # ...
end

With this I can run rake screenshots and the screenshots are created and saved in the applications documents directory. At this point issue #3 kicks in and prevents them from being copied to my projects screenshots/ directory...

clayallsopp commented 9 years ago

Ah I see - I'd be happy to merge a PR which did that by default, in motion-screenshots.rb

HealsCodes commented 9 years ago

I'll see what I can do ;)