Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App does not contain Calabash framework (argument list too long) #718

Closed
nicked opened this issue Mar 5, 2015 · 3 comments
Closed

App does not contain Calabash framework (argument list too long) #718

nicked opened this issue Mar 5, 2015 · 3 comments

Comments

@nicked
Copy link

nicked commented Mar 5, 2015

When I try to run calabash-ios check on my project, I always get an error, even when I specify the full path manually:

app does not contain calabash.framework

I tracked the problem down to calabash-ios-setup.rb:
https://github.com/calabash/calabash-ios/blob/master/calabash-cucumber/bin/calabash-ios-setup.rb#L268

It tries to execute otool "#{File.expand_path(app)}"/* -o - which if I run directly from the command line I get a bash error:

Argument list too long

It seems there are too many files (2452) in my app bundle. I think this should be a little smarter about locating the app binary, maybe by looking for a file with the same name as the app bundle, or by using find to list any executables.

@nicked
Copy link
Author

nicked commented Mar 5, 2015

Actually since the app binary has to be named the same as the app bundle, I think we could just use:

otool "#{File.expand_path(app)}"/#{File.basename(app, '.app')} -o

@jmoody
Copy link
Contributor

jmoody commented Mar 5, 2015

Actually since the app binary has to be named the same as the app bundle, I think we could just use:

The executable name can be found by inspecting the Info.plist CFExecutableName key.

calabash-ios check

I am not a fan of that command; it needs to be fixed.

If you wanted to take a shot at fixing it, I would use something something like this:

app =  RunLoop::App.new(< path to bundle >)
executable_name = app.executable_name
path_to_executable = ...
!`xcrun strings "#{path_to_executable}" | grep -E 'CALABASH VERSION'`.strip.empty?

# maybe for backwards compat we need to use otool; I will think about it.

Needs a unit test.

Thanks for reporting.

@jmoody
Copy link
Contributor

jmoody commented Feb 1, 2016

Waiting on run-loop fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants