I want to split my codebase into a library which I want to upload to github and an GUI application. I hope that using recently introduced SwiftPM is a good idea.
But all examples I've been able to find show creating a console application with swift package init --type executable
.
I want to know how to create a skeleton for macOS Cocoa Application with all the pregenerated stuff like assets, storyboard and so on?
It would be great to have access to such useful thing as:
swift package build
swift package test
swift package update
...
Any ideas?
Thank you!
This is my working solution for creating cocoa apps with SPM.
swift package init --type executable
Package.swift
swift package update
or swift package fetch
swift package generate-xcodeproj
+
button below the list, and create your cocoa/gui appGeneral
tab locate Embedded Binaries
section.+
to add binaries, and select your referenced libraries.If you update your packages.swift
, you should repeat above, except creating the new target; you'll just need to add it to the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With