If you check the screenshot of Apple sample project of Backyard Birds, it has three Swift Packages which is local and private to the project only. Also, there is no Sources folder like other normal SPM. How can i do the same thing?

enter image description here

Thanks!

1

There are 1 answers

0
Joakim Danielson On BEST ANSWER
  • Create a local package from inside Xcode, File->New->Package...
  • Make sure to select your project in the "Add to" picker in the file saving dialog.
  • Remove the Source folder
  • Right click on the package icon and select "New Folder" for each folder you want to add and then create or add source files to your folder(s).
  • To make it work with the new folders instead of Source you need to edit Package.swift and add path: "." to the .target definition as can be seen in the screenshot in the question.