{"id":4010,"date":"2018-10-04T12:59:16","date_gmt":"2018-10-04T12:59:16","guid":{"rendered":"https:\/\/blog.jetbrains.com\/objc\/?p=6673"},"modified":"2020-07-03T14:20:50","modified_gmt":"2020-07-03T14:20:50","slug":"spm-support-clion","status":"publish","type":"appcode","link":"https:\/\/blog.jetbrains.com\/fr\/appcode\/2018\/10\/spm-support-clion","title":{"rendered":"Swift Package Manager support in CLion"},"content":{"rendered":"<p>Hi everyone, <\/p>\n<p>Today we are excited to announce that the Swift plugin for the latest <a href=\"https:\/\/blog.jetbrains.com\/clion\/2018\/10\/clion-2018-3-eap-new-build-and-rebuild-actions\/\">CLion 2018.3 EAP build<\/a> <strong>supports Swift Package Manager projects directly<\/strong>! Simply open the SPM project and work with it \u2013 no additional configuration required. <\/p>\n<p>Read on to learn about all the available features, or watch the short demo below to see them in action:<\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/PGgtes-TfrU\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><br \/>\n<!--more--><\/p>\n<h1 id=\"project\">Project<\/h1>\n<p>Have all project dependencies resolved automatically:<br \/>\n<img decoding=\"async\" alt=\"Dependencies\" width=\"690\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-dependencies@2x.png\"\/><br \/>\nEdit <code>Package.swift<\/code> with code completion and highlighting available:<br \/>\n<img decoding=\"async\" alt=\"Completion\" width=\"690\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-completion@2x.png\"\/><br \/>\nAdd dependencies easily with a code completion for project targets:<br \/>\n<img decoding=\"async\" alt=\"Target completion\" width=\"690\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-target_completion@2x-1.png\"\/><br \/>\nImport changes in one click:<br \/>\n<img decoding=\"async\" alt=\"Import\" width=\"689\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-import@2x.png\"\/><br \/>\nInvoke Swift Package Manager actions right from the context menu or via <code>Tools | Swift Package Manager<\/code>:<br \/>\n<img decoding=\"async\" alt=\"Actions\" width=\"688\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-actions@2x.png\"\/><\/p>\n<h1 id=\"code\">Code<\/h1>\n<p>Code faster using the same code generation and refactoring actions that you have in the latest AppCode EAP:<br \/>\n<img decoding=\"async\" alt=\"Generate\" width=\"690\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-generate@2x.png\"\/><\/p>\n<p>Have SourceKit inspections and fix-its displayed right in your code editor:<br \/>\n<img decoding=\"async\" alt=\"SourceKit\" width=\"689\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-sourcekit@2x.png\"\/><\/p>\n<h1 id=\"run_debug_test\">Run, Debug, Test<\/h1>\n<p>Run Configurations are created automatically for all products in your Package.swift:<br \/>\n<img decoding=\"async\" alt=\"Run Configurations\" width=\"690\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-run_configurations@2x.png\"\/><\/p>\n<p>To <strong>Run<\/strong> or <strong>Debug<\/strong> your application or tests, select the corresponding Run Configuration and press <code>\u2303R<\/code> or <code>\u2303D<\/code>:<br \/>\n<img decoding=\"async\" alt=\"Run and Debug\" width=\"690\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-debug@2x.png\"\/><\/p>\n<h1 id=\"linux_support\">Linux support<\/h1>\n<p>Develop your SPM projects on Linux having almost the same features as on macOS:<\/p>\n<p><img decoding=\"async\" alt=\"Linux support\" width=\"800\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/10\/objc-linux@2x.png\"\/><\/p>\n<p>Please note that LLDB in Swift 4.1.x toolchains does not work correctly on Linux, so we recommend using Swift 4.2 toolchains. In addition, we have <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-17867\" target=\"_blank\" rel=\"noopener\">an issue<\/a> when it\u2019s not possible to Run or Debug all tests on Linux. <\/p>\n<h1 id=\"future_plans\">Future plans<\/h1>\n<p>During the 2018.3 EAP cycle, we plan to focus on fixing bugs and implementing such features as first-class unit-testing support, on the same level AppCode already offers for macOS. Other features are linked <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-14252\" target=\"_blank\" rel=\"noopener\">here<\/a> as <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/OC?q=Subtask%20of:%20OC-14252%20%23Unresolved\" target=\"_blank\" rel=\"noopener\">subtasks<\/a>. After finishing most of these tasks, we plan to add support for Swift Package Manager projects in AppCode. <\/p>\n<p>Here\u2019s hoping CLion will become your IDE of choice for cross-platform Swift development!<\/p>\n<p><em>Your AppCode Team<\/em><br \/>\n<em>JetBrains<\/em><br \/>\n<em>The Drive to Develop<\/em><\/p>\n","protected":false},"author":437,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[89,601],"tags":[743,720,723,91,724,721],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/appcode\/4010"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/appcode"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/types\/appcode"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/users\/437"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/comments?post=4010"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/appcode\/4010\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/media?parent=4010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/categories?post=4010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/tags?post=4010"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/cross-post-tag?post=4010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}