Closed rafaelpedretti-toast closed 1 hour ago
Hello! Could you please describe your case in detail? Are they completely separate programs? When you launch an application, do you launch only one app at a time, or do you launch multiple applications in parallel?
@rafaelpedretti-toast Hello! I've added basic support for workspaces in the recently released version.
My first attempt to implement this feature was to parse Xcode configuration files manually, but I failed. I couldn't properly determine the schema list for the projects. Finally, I've decided to utilize the xcodebuild -list output, similar to single project workspaces. It's not ideal, but should work for some workspaces
@hyzyla would be possible to add workspace configuration to specify a workspace name or a project name? Apparently, I have a similar problem where the directory contains multiple projects at the same time and in that case, xcodebuild can't provide correct output for listing schemes.
For instance, if you're using workspaces with multiple projects or SPM modules, you want to be able to specify a workspace instead of using just the first project from xcodebuild command.
@milanhorvatovic, Yeah, I think it's not a problem to add some configuration to specify a workspace or a project. I just need more information about how your project looks like to reproduce it locally. Could you provide the structure of your project and workspace? It can be the output of a comman find . \( -name "*.xcworkspace" -o -name "*.xcodeproj" \)
:
➜ find . \( -name "*.xcworkspace" -o -name "*.xcodeproj" \)
./sweetpad-demo-app1/sweetpad-demo-app1.xcodeproj
./sweetpad-demo-app2/sweetpad-demo-app2.xcodeproj
./sweetpad-demo-workspace.xcworkspace
./sweetpad-demo-app4/sweetpad-demo-app4.xcodeproj
./sweetpad-demo-app3/sweetpad-demo-app3.xcodeproj
Maybe the better would be to add an option for developers to specific path to the workspace or project. In that case, you don't need to worry about the structure itself because it would suit almost every needs. What do you think?
Many developers have mono repositories or different directory organization for project structure and so on.
It's not ideal, but you can get the idea from this:
./TestCombineExt/TestCombineExt.xcodeproj
./TestCombineExt/TestCombineExt.xcodeproj/project.xcworkspace
./Test.xcodeproj
./Test.xcodeproj/project.xcworkspace
./TestFoundation/TestFoundation.xcodeproj
./TestFoundation/TestFoundation.xcodeproj/project.xcworkspace
./TestSDK.xcodeproj
./TestSDK.xcodeproj/project.xcworkspace
./Test.xcworkspace
./Pods/Pods.xcodeproj
./TestUI.xcodeproj
./Playground.playground/playground.xcworkspace
./SampleApp.xcodeproj
./SampleApp.xcodeproj/project.xcworkspace
@milanhorvatovic I've added a new configuration for setting the Xcode workspace path in VSCode's settings.json
Set Xcode workspace path. Let me know if it works for you 🙏 (remember to update extension before)
@hyzyla sorry about my timing, but it works nicely, thanks again.
In one project I work on we have two apps on the same repo and the extension cannot find the schemes because the response from
xcodebuild -list -json
has a different structure:where inside a project it is
It would be nice to support this configuration