wojciech-kulik / xcodebuild.nvim

Neovim plugin to Build, Debug, and Test applications created for Apple devices (iOS, macOS, watchOS, etc.)
MIT License
686 stars 17 forks source link

Would you be willing to provide an example `project.yml` file for Xcodegen? #89

Closed webdavis closed 7 months ago

webdavis commented 7 months ago

I am currently trying to use this plugin to work on a Vapor project. Though I am struggling getting things to work.

So far I have tried to generate a .xcodeproj file using xcodegen.

Here is the project.yml file I am using:

---
name: hello
targets:
  hello:
    type: application
    platform: macOS
    sources: [Sources]
    settings:
      configs:
        Debug:
          PRODUCT_BUNDLE_IDENTIFIER: com.domain.hello
        Release:
          PRODUCT_BUNDLE_IDENTIFIER: com.domain.hello
    dependencies:
      - package: hello
packages:
  hello:
    path: ./

When running XcodebuildSetup I always get the error Could not get build settings after selecting the device.

I noticed in the discussions that you mentioned people who are using xcodegen to generate the project file so I was wondering if you would be able to provide an example project.yml to help people get up and running and maybe a brief explanation in the docs of the requirements to do so?

wojciech-kulik commented 7 months ago

Hi, this plugin is meant for iOS/macOS app development. It most likely won't work with Vapor. The question is what would you like to gain from using this plugin for Vapor? Most features is iOS/macOS app related. If you need code completion, you can just set up LSP.

The problem with this approach is that it's most likely not possible to import Vapor package into macOS/iOS app. Even if you do that, then what would be the meaning of having this package included inside the app? You wouldn't be able to run this code most likely.

In general, I would recommend first trying to create a project from Xcode and then converting it to xcodegen if needed. Easier this way :).

webdavis commented 7 months ago

Okay, thank you for the direction! I'm mostly looking for test feedback. I don't know why I didn't think about the build targets. It seems obvious now. I came across neotest, which covers what I am looking for.

wojciech-kulik commented 7 months ago

Great to hear! I was going to recommend you neotest, but I noticed that it doesn't support Swift. Did you manage to set it up?

webdavis commented 7 months ago

Unfortunately no. I tried to use the vim-test adapter but I couldn't get it working. I think I'm going to take a shot at building a swift adapter. In the meantime, I got an overseer/justfile combo going that takes care of the basics.