Google+ Followers

Friday, 24 January 2014

Calabash IOS: common problems with solutions

Common calabash IOS problems for IOS projects with workspace files

Error 1
Wordpress IOS application compilation failed
'linker command failed with exit code 1'

this usually happens if selected libraries are not loaded

Solution 1:
Its common practice to launch <app>.xcodeproj file and compile app
but for some apps workspace file has to be launched inorder for the app to compile


TIP 1:
'calabash-ios setup' command must be run in folder where <app>.xcodeproj is present not from
folder where workspace file is present





Quit xcode :

Error 2:  calabash-ios setup
Checking if Xcode is running...
Detected running Xcode. You may need to restart Xcode after setup.
Found no *.xcodeproj files in dir ..

Solution 2:
quit ios while executing 'calabash-ios setup'





Error 3:

Unable to find *.xcodeproj in /Users/<username>/projects/meine.tui.ui-automation (RuntimeError)
 /Users/<username>/.rvm/gems/ruby-2.0.0-p247/gems/calabash-cucumber-0.9.165/lib/calabash-cucumber/launch/simulator_helper.rb:61:in `derived_data_dir_for_project'
 /Users/<username>/.rvm/gems/ruby-2.0.0-p247/gems/calabash-cucumber-0.9.165/lib/calabash-cucumber/launch/simulator_helper.rb:156:in `app_bundle_or_raise'
 /Users/<username>/.rvm/gems/ruby-2.0.0-p247/gems/calabash-cucumber-0.9.165/lib/calabash-cucumber/launcher.rb:292:in `relaunch'
 /Users/<username>/projects/meine.tui.ui-automation/features/ios/support/01_launch.rb:19:in `Before'

Solution:

common problem Running calabash commands from folder outside project ( when features are not present in same folder as .xcodeproj file)

 Solution 3a:
 run the tests from folder where .xcodeproj file is present

 Solution 3b:
 specify the app bundle path, its location where you compile app is present. its mostly present at
  /Users/<username>/Library/Developer/Xcode/DerivedData/appname-galigtjucxijnkexousxcnokqktm/Build/Products/Debug-iphonesimulator/appname.app

  full command to run tests will be like this

  ~ $:  APP_BUNDLE_PATH=/Users/<username>/Library/Developer/Xcode/DerivedData/appname-galigtjucxijnkexousxcnokqktm/Build/Products/Debug-iphonesimulator/appname.app cucumber

1 comment:

  1. Love to read it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks. mobile problems

    ReplyDelete