Member-only story
Create your own Library With Swift Package Manager in Xcode
Detailed description to easily create your own library
In this tutorial we will see how to create your own Library using Swift Package Manager and Xcode 14. Creating your own library helps for good quality code, less complex projects and of course share your library with other projects.
Create The Library
Open Xcode -> File -> New -> Package and select Swift Package
In the next screen type the name of your library (in our case will be NetworkLibrary) and hit create.
Xcode will create all the necessary files for you and your library should look something like this:
You will notice a folder called Sources. There you can put all your code and files. In our case we open Sources folder and NetworkLibrary file adding directly there our code to just call a service. It looks like this: