You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I happen to use XcodeEditor, but not directly. I am using Calabash for iOS for automation tests, and calabash is using XcodeEditor. They have calabash-ios setup command, which does the following
Duplicate an existing target (say "MyTarget") and name it using "-cal" suffix, say "MyTarget-cal"
Add calabash.framework to newly created target
Modify "Other Linker Flags" for "MyTarget-cal"
All that using XcodeEditor.
When new target is created, a new scheme appears in the Xcode as well, in my case it's "MyTarget-cal" scheme.
So, the problem is that newly created scheme is not shared.
If I go to "Manage Schemes" Xcode menu, the "MyTarget-cal" scheme will not have checkmark in "Shared" column, even if the original "MyTarget" scheme had it.
Why that matters?
It is not a problem when building from Xcode and when using xcodebuild from command line on dev machine.
But that becomes a real problem when trying to build from CI environment, such as Bamboo or Jenkins.
It's a known issue, Bamboo and Jenkins run their shell scripts in a specific environment, under some special user. So when Bamboo runs xcodebuild -project MyProject.xcodeproj -scheme MyTarget-cal the xcodebuild will complain that the project does not have "MyTarget-cal" scheme. To put it another way, Bamboo and Jenkins can't "see" scheme unless it's shared. That's why having a shared scheme is important for CI builds.
Most of Xcode projects can be build using only configuration, target and sdk options, but if it's an Xcode workspace with lot's of libraries, sub-projects and custom frameworks, building using -scheme option is the only way to build it from command line properly.
I've done some research around the shared schemes.
If the scheme is shared in Xcode, then it will appear in MyProject.xcodeproj/xcsharedata/xcschemes, for each scheme there will be a .xcscheme file, like "MyTarget.xcscheme", "MyTarget-cal.xcscheme".
But that folder and its contents are created only when the project is opened in Xcode, looks like Xcode generates those folders and files.
When the whole thing is done on CI box, none of those folders and files will be created.
The only place I can find mention of "MyTarget-cal" target and scheme is in "MyProject.xcodeproj/project.pbxproj" file.
I assume there's a way to extract information about "MyTarget-cal" scheme from pbxproj file and create "MyTarget-cal.xcscheme" and put it under "xcshareddata/xcschemes", at least Xcode does that somehow.
The text was updated successfully, but these errors were encountered:
We can easily add this feature to XcodeEditor, however Calabase are unfortunately on their own old fork of XcodeEditor. . . So in this case, I think you'd have to ask them to either:
a) Bring their fork up to date with master. .
b) Implement the feature for you.
I believe your refer to this one: https://github.com/calabash/xcode-editor
It's seems quite out of date and the things in this repo do not actually match their latest executable.
It would still be nice to have such a feature with XcodeEditor, there's number of cases when it could be useful, like adding Reveal framework automatically and making new scheme shared.
For me when I did calabash-ios setup on the source code, it's not creating the cal scheme. Also I didn't get any error. In Xcode also i couldn't find the cal scheme.
I believe the scheme info is stored in another file under the .xcodeproj directory. Again this would be a fairly simple feature to add. . . I'm afraid that lately I'm just so busy with my regular work and typhoonframework.org
Hi.
I happen to use XcodeEditor, but not directly. I am using Calabash for iOS for automation tests, and calabash is using XcodeEditor. They have
calabash-ios setup
command, which does the followingAll that using XcodeEditor.
When new target is created, a new scheme appears in the Xcode as well, in my case it's "MyTarget-cal" scheme.
So, the problem is that newly created scheme is not shared.
If I go to "Manage Schemes" Xcode menu, the "MyTarget-cal" scheme will not have checkmark in "Shared" column, even if the original "MyTarget" scheme had it.
Why that matters?
It is not a problem when building from Xcode and when using
xcodebuild
from command line on dev machine.But that becomes a real problem when trying to build from CI environment, such as Bamboo or Jenkins.
It's a known issue, Bamboo and Jenkins run their shell scripts in a specific environment, under some special user. So when Bamboo runs
xcodebuild -project MyProject.xcodeproj -scheme MyTarget-cal
thexcodebuild
will complain that the project does not have "MyTarget-cal" scheme. To put it another way, Bamboo and Jenkins can't "see" scheme unless it's shared. That's why having a shared scheme is important for CI builds.Most of Xcode projects can be build using only configuration, target and sdk options, but if it's an Xcode workspace with lot's of libraries, sub-projects and custom frameworks, building using
-scheme
option is the only way to build it from command line properly.I've done some research around the shared schemes.
If the scheme is shared in Xcode, then it will appear in
MyProject.xcodeproj/xcsharedata/xcschemes
, for each scheme there will be a.xcscheme
file, like "MyTarget.xcscheme", "MyTarget-cal.xcscheme".But that folder and its contents are created only when the project is opened in Xcode, looks like Xcode generates those folders and files.
When the whole thing is done on CI box, none of those folders and files will be created.
The only place I can find mention of "MyTarget-cal" target and scheme is in "MyProject.xcodeproj/project.pbxproj" file.
I assume there's a way to extract information about "MyTarget-cal" scheme from pbxproj file and create "MyTarget-cal.xcscheme" and put it under "xcshareddata/xcschemes", at least Xcode does that somehow.
The text was updated successfully, but these errors were encountered: