calabash/calabash-ios

calabash-ios setup fails on fresh Xcode 6 or Xcode 7 project

foens opened this issue · 23 comments

I have just created a fresh Single view application Xcode 6 project. Running calabash-ios setup and accepting the default values results in:

$ calabash-ios setup
Checking if Xcode is running...
Detected running Xcode. You may need to restart Xcode after setup.
Found Project: test

----------Info----------
caution: excluded filename not matched:  __MACOSX/*
caution: excluded filename not matched:  calabash.framework/.DS_Store
---------------------------

----------Info----------
Setting up project file for calabash-ios.
---------------------------

----------Info----------
Making backup of project file: /Users/foens/Desktop/qqq/test/test.xcodeproj/project.pbxproj
Saved as /Users/foens/Desktop/qqq/test/test.xcodeproj/project.pbxproj.bak
---------------------------
---------- Info ----------
Found several targets. Please enter name of target to duplicate.
Default target: test. Just hit <Enter> to select default.
test
testTests

input: 
Selecting default target (test)
---------- - ----------
Duplicating target: test to new target: test-cal
No frameworks Group found. Aborting.

----------Setup done----------
Please validate by running the -cal target
from Xcode.
When starting the iOS Simulator using the
new -cal target, you should see:

  "Started LPHTTP server on port 37265"

in the application log in Xcode.


After validating, you can generate a features folder:
Go to your project (the dir containing the .xcodeproj file).
Then run calabash-ios gen
(if you don't already have a features folder).

The error No frameworks Group found. Aborting. is given, and no test-cal target is generated.

Project structure is shown in the screenshot:
screen shot 2014-09-29 at 12 01 29

Workaround

Adding a framework does not create a Frameworks group. See screenshot:
screen shot 2014-09-29 at 12 05 31

Manually creating a Frameworks group and then invoking calabash-ios setup works.

@foens Can you confirm that you are using calabash 0.10.1?

I released the gem without the calabash.framework. :(

Fixed in 0.10.2

I cannot confirm the fix. It still does not work for fresh projects. Please reopen this issue. Output below:

foenss-Mac:testcalbash foens$ calabash-ios version
0.10.2
foenss-Mac:testcalbash foens$ calabash-ios setup
Checking if Xcode is running...
Detected running Xcode. You may need to restart Xcode after setup.
Found Project: testcalbash

----------Info----------
caution: excluded filename not matched:  __MACOSX/*
caution: excluded filename not matched:  calabash.framework/.DS_Store
---------------------------

----------Info----------
Setting up project file for calabash-ios.
---------------------------

----------Info----------
Making backup of project file: /Users/foens/Desktop/testcalbash/testcalbash.xcodeproj/project.pbxproj
Saved as /Users/foens/Desktop/testcalbash/testcalbash.xcodeproj/project.pbxproj.bak
---------------------------
---------- Info ----------
Found several targets. Please enter name of target to duplicate.
Default target: testcalbash. Just hit <Enter> to select default.
testcalbash
testcalbashTests

input: 
Selecting default target (testcalbash)
---------- - ----------
Duplicating target: testcalbash to new target: testcalbash-cal
No frameworks Group found. Aborting.

----------Setup done----------
Please validate by running the -cal target
from Xcode.
When starting the iOS Simulator using the
new -cal target, you should see:

  "Started LPHTTP server on port 37265"

in the application log in Xcode.


After validating, you can generate a features folder:
Go to your project (the dir containing the .xcodeproj file).
Then run calabash-ios gen
(if you don't already have a features folder).
---------------------------

I updated calabash by issuing the command sudo gem install calabash-cucumber

+1 This is still an issue even in 0.11.2

I also observed the same on 0.11.3 Calabash Version

@foens - need your help for workout for this issue "Manually creating a Frameworks group and then invoking calabash-ios setup works."

How can i do that ?

Thanks.

@ravirsoninike It is pretty simply. You right click on your project on the left inside Xcode, then select New Group and name it Frameworks. For example, look at the first image posted in this issue: You should right click the test project that has two targets, and the add the group by selecting New Group.

@foens
Thx a lot, I got that.

@jmoody let's update to use a Ruby implementation

https://github.com/CocoaPods/Xcodeproj

instead of the old OS X binary

I think I have seen this happening even the group Frameworks exists in the project.

I solve the problem by doing:

  • Add the calabash.framework to the project => Add files -> calabash.frameworks:

captura de pantalla 2015-02-05 a la s 10 23 55

  • Create a new group including the calabash.framework:

captura de pantalla 2015-02-05 a la s 10 25 07

  • Then, the final structure is like this:

captura de pantalla 2015-02-05 a la s 10 21 47

  • Run calabash-ios setup in the Terminal and the -cal target will be created:

captura de pantalla 2015-02-05 a la s 10 21 57

@beeva-carloscifuentes

Thanks for the screenshots. I removed the mention of sudo from your instructions.

I have the same problem. Following the instructions of @beeva-carloscifuentes did work. Calabash-ios version: 0.13.0

i have a similar problem- i had manually created my first calabash target- so i do not know if the problem i am facing is because i am trying to create a second -cal target in the same project- will delete the first -cal target and try recreating the -cal target, but this is what i get when i try to create a second -cal target in the same project:
i get the "No frameworks Group found. Aborting." error.
Calabash-ios version: 0.13.0

I have the same problem. I realised that opening the project with Xcode after running the setup fix the issue.

The problem is still present.

I can confirm that indeed this problem is present.

Issue persists for me in version 0.14.3

No frameworks Group found. Aborting.

Same problem on a new project created with Xcode 6.4

This issue still exists today (Xcode7). The issue is quite simple indeed, it seems calabash-iso expecting a Frameworks group in Xcode project and new project wizard doesn't create it. Thus we may simple add a group in project named 'Frameworks', at top level or inside project folder are both fine and it can be empty.

Thank you, Creating Framework group in application worked for me.

Is this "Frameworks" group used or just to silence an error in calabash-ios setup?

My reason for asking; I am using calabash for android and wanted to use for iOS as well. I do not have access to the iOS app code project. Even if I did, it would be a hard sell to get development to add something to the project unless necessary. They would rather insist on using XCTest framework and Accessibility.

Suggestions, thanks.

I do not have access to the iOS app code project.

You will not be able to use Calabash iOS unless your application is linked with the calabash.framework (at build time).