Help with swift application on AppCode
Hi there, I'm just starting with swift programming. After struggling a lot with PackageManager and XCode to sync, I was referred to AppCode by a friend (note I'm a long time IDEA subscriber and seems like a match made in heaven to me using another IDE from jetbrains)
I'm not getting how to start the project, as simple and silly as that.
I bootstrap everything using swift cli:
swift package init
swift package generate-xcodeproj
But when I open the project on AppCode, and open my Package.swift says that there's no such module as `PackageDescription`
I found a few blog entries on Clion but they are also missing the bootstraping steps, assuming you have a project already configured and only add a new dependency such as HeliumLogger.
Could someone share a very simple entry on how to start a command line application on appcode using package manager?
Thank you
Please sign in to leave a comment.
Hi,
unfortunately our Swift Package Manager support is only available on the CLion Swift plugin for now. Here is the corresponding issue for AppCode support: https://youtrack.jetbrains.com/issue/OC-17702
AppCode works with Xcode's project format and therefore doesn't know how to handle Package.swift. Generally things should work if you ignore the Package.swift file, but you won't be able to use any smart features inside Package.swift. (I've created an issue to hide these unhelpful messages: https://youtrack.jetbrains.com/issue/OC-18229) Of course you could also use CLion for a command line app. (It's missing iOS device and simulator support, though.)
Also a word of personal advice: If you're just starting out with Swift, you should know that Swift PM is not as mature and established as Swift, yet. Many Swift devs haven't even tried it. The de-facto standard is still creating Xcode projects directly and using CocoaPods or Carthage for dependencies. So that might be easier to start with.
If there's anything else I can help with, please let me know.
Thank you very much for the answer and the advice.
I gave CLion a try, and I think it really is what I need. I'm looking at swift just for cli and some server side via vapor use cases.
And I use kotlin on my day to day, CLion seems like a natural fit as soon as Kotlin Native becomes a bit more mature.
Cheers