New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure the schemes list includes workspace contained schemes #12124

Closed
wants to merge 2 commits into
base: master
from
Jump to file or symbol
Failed to load files and symbols.
+1,078 −1
Diff settings

Always

Just for now

Next

Make sure the schemes list includes workspace contained schemes

  • Loading branch information...
loufranco committed Mar 21, 2018
commit cbf8386f2806356629bf0a4782822c0c67d41614
@@ -112,12 +112,21 @@ def project
@project ||= Xcodeproj::Project.open(path)
end
# xcodeproj doesn't include schemes that are under the .xcworkspace folder.

This comment has been minimized.

@dantoml

dantoml Mar 21, 2018

Member

Could you add a TODO with a link to CocoaPods/Xcodeproj#557 if this is merged before we bump Xcodeproj please?

This comment has been minimized.

@loufranco

loufranco Mar 21, 2018

Contributor

It looks like it might take a day for my job to get me on the CLA, so I'll either put the TODO or just do the bump and call to load_schemes (depending on where xcodeproj is)

This comment has been minimized.

@loufranco

loufranco Mar 21, 2018

Contributor

@dantoml I added a "To Do" (this project's rubocop disallows TODO). This is ready to merge -- I also added a PR to Xcodeproj -- if you would prefer to close this PR, and merge the xcodeproj one -- I'd be happy to bump Xcodeproj here and add the load_schemes call.

# So, get a list of them to include.
# This is based on xcodeproj's Project::schemes method.
def workspace_contained_schemes
Dir[File.join(path, 'xcshareddata', 'xcschemes', '*.xcscheme')].map do |scheme|
File.basename(scheme, '.xcscheme')
end
end
# Get all available schemes in an array
def schemes
@schemes ||= if workspace?
workspace.schemes.reject do |k, v|
v.include?("Pods/Pods.xcodeproj")
end.keys
end.keys + self.workspace_contained_schemes
else
Xcodeproj::Project.schemes(path)
end

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B83E0CD92061E2CB00DEE246"
BuildableName = "WorkspaceSchemesApp.app"
BlueprintName = "WorkspaceSchemesApp"
ReferencedContainer = "container:WorkspaceSchemesApp/WorkspaceSchemesApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B83E0CD92061E2CB00DEE246"
BuildableName = "WorkspaceSchemesApp.app"
BlueprintName = "WorkspaceSchemesApp"
ReferencedContainer = "container:WorkspaceSchemesApp/WorkspaceSchemesApp.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B83E0CD92061E2CB00DEE246"
BuildableName = "WorkspaceSchemesApp.app"
BlueprintName = "WorkspaceSchemesApp"
ReferencedContainer = "container:WorkspaceSchemesApp/WorkspaceSchemesApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B83E0CD92061E2CB00DEE246"
BuildableName = "WorkspaceSchemesApp.app"
BlueprintName = "WorkspaceSchemesApp"
ReferencedContainer = "container:WorkspaceSchemesApp/WorkspaceSchemesApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.