Permalink
Browse files

Make sure we show the right scheme generation tip for workspace-based…

… projects as well
  • Loading branch information...
1 parent 6629de9 commit af9da8dd559902d827670986900f9c523cefe8ec @ndfred ndfred committed Aug 14, 2013
Showing with 3 additions and 8 deletions.
  1. +1 −6 xctool/xctool-tests/OptionsTests.m
  2. +2 −2 xctool/xctool/Options.m
@@ -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"];
}
@@ -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"];

0 comments on commit af9da8d

Please sign in to comment.