Create a swift package from a framework

Hi guys, I am very new to Swift & apple development in general, looking for a solution to the following -

I have a project of type framework which already contains some code. Currently it is being distributed using Carthage, but I would like to add support for SPM to the same project (in same repo).

How can I achieve this?

The current structure of the project looks something like below:

| - DemoFramework
|. |----Sources
|. | |----- File1.swift
......
......
| - DemoFrameworkTests
|. |----- Unit Tests
|. | | - TestFile.swift

Would appreciate help on this.

To support SwiftPM, you'll need to refine your directory structure and add a Package.swift manifest. More details are available in Apple Developer Documentation.