For instructions how to add a Swift package to your projects look here:
Apple - Adding package dependencies to your app
Example to get all characters as an array of character struct:
1. Init Rick_MortySDK:
let client = Rick_MortySDK()
2. Call an SDK method for example: getAllCharacters
var cancellable: AnyCancellable?
cancellable = client.getAllCharacters()
.sink(receiveCompletion: { _ in }, receiveValue: { characters in
characters.forEach() { print ($0.name) }
})