vknabel / vscode-swift-development-environment

New home of Swift Development Environment for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment
Apache License 2.0
175 stars 14 forks source link

support ios for Sourcekit-lsp #64

Closed haifengkao closed 4 years ago

haifengkao commented 4 years ago

sourcekit-lsp needs additional arguments to find iOS SDK the arguments are the same as swift build, so I pass these arguments to sourcekit-lsp as well

example setting: 截圖 2020-03-09 下午6 32 45

    "sde.swiftBuildingParams" : [
        "build",
        "-Xswiftc",
        "-sdk",
        "-Xswiftc",
        "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk",
        "-Xswiftc",
        "-target",
        "-Xswiftc",
        "x86_64-apple-ios12.1-simulator"
    ],

To test this feature, please follow the instruction under the section Create a Swift Package in https://funnyitworkedlasttime.dev/posts/2020-01-10-swift-vscode-sourcekit-lsp/

vknabel commented 4 years ago

Thanks for your contribution! It looks really promising. I will test and probably release your PR within the next few days.

If you wish you can add a new Changelog entry and link yourself.

vknabel commented 4 years ago

Thank you very much again. I released your PR as 2.9.1.

vknabel commented 4 years ago

Hi @Funny-It-Worked-Last-Time. Thanks for your great article. In this PR and in #65, @haifengkao did some great improvements regarding iOS/watchOS development using sourcekit-lsp.

Hope it helps you vknabel/vscode-swift-development-environment#how-do-i-get-autocompletion-for-uikit. Sorry for the inconvenience. Whenever you experience any problems, feel free to open an issue.