Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Make sure we show the right scheme generation tip for workspace-based…
Browse files Browse the repository at this point in the history
… projects as well
  • Loading branch information
ndfred committed Aug 14, 2013
1 parent 6629de9 commit af9da8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions xctool/xctool-tests/OptionsTests.m
Expand Up @@ -189,12 +189,7 @@ - (void)testSchemeMustBeValid
assertOptionsFailToValidateWithError:
@"Can't find scheme 'TestProject-Library-Bogus'.\n\n"
@"Possible schemes include:\n"
@" TestProject-Library\n\n"
@"TIP: This might happen if you're relying on Xcode to autocreate your schemes\n"
@"and your scheme files don't yet exist. xctool, like xcodebuild, isn't able to\n"
@"automatically create schemes. We recommend disabling \"Autocreate schemes\"\n"
@"in your workspace/project, making sure your existing schemes are marked as\n"
@"\"Shared\", and making sure they're checked into source control."
@" TestProject-Library"
withBuildSettingsFromFile:
TEST_DATA @"TestWorkspace-Library-TestProject-Library-showBuildSettings.txt"];
}
Expand Down
4 changes: 2 additions & 2 deletions xctool/xctool/Options.m
Expand Up @@ -393,8 +393,8 @@ - (BOOL)validateAndReturnXcodeSubjectInfo:(XcodeSubjectInfo **)xcodeSubjectInfoO
BOOL automaticSchemeCreationDisabled = NO;

{
NSString *basePath = self.project != nil ? self.project : self.workspace;
NSString *settingsPath = [basePath stringByAppendingPathComponent:@"/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings"];
NSString *basePath = self.project != nil ? [self.project stringByAppendingPathComponent:@"project.xcworkspace"] : self.workspace;
NSString *settingsPath = [basePath stringByAppendingPathComponent:@"xcshareddata/WorkspaceSettings.xcsettings"];
NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:settingsPath];
NSNumber *automaticSchemeCreationSetting = [settings objectForKey:@"IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded"];

Expand Down

0 comments on commit af9da8d

Please sign in to comment.