How to export swift library and use same library in another swift project?

I have created a swift library in swift project using Xcode.
library contains the following type of file :
1) bridging-header.h
2) c.dylib file
3) cheader.h file
4) .swift file

In order to use function and structure of c.dylib file and cheader.h . I have created bridging header file inside swift library . After creating bridging header file in library .
I am able to use function/structure of .h and .dylib directly into my projects and librarys .swift file ,after adding the following code to the bridging header file.

#import "Cheader.h"

I have created some structure in .swift file of the library. structures ( in .swift of the library) uses the function from the .dylib . .dylib file function are made available by using bridging header file.
I am able to use these structure of library in same projects file by using import statment in main.swift.

import libraryname

I want to export above swift library and use it in another swift project .

Tried :
After building & running project in xCode . I have copied .dylib file of the swift library into another swift project but when i am trying use import statement for the same library .I am getting error

use of unresolved identifier libraryname

Question :
Q1) What are the steps to be followed in order to export/share swift library ?
Q2) Do i have to add some extra statment like export before structure defination in order to export function ?

Project strucutre :

Terms of Service

Privacy Policy

Cookie Policy