diff --git a/README.md b/README.md index 6e99722..5e55807 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,24 @@ Add the dependency to Package.swift: .package(url: "https://github.com/vapor-community/sendgrid.git", from: "4.0.0") ~~~~ +~~~~swift +.target(name: "App", dependencies: [ + .product(name: "SendGrid", package: "sendgrid"), + .product(name: "Vapor", package: "vapor"), +]), +~~~~ + Make sure `SENDGRID_API_KEY` is set in your environment. This can be set in the Xcode scheme, or specified in your `docker-compose.yml`, or even provided as part of a `swift run` command. +To set it in the Xcode Scheme you can click in edit scheme and it shows a list of +Environment Variables where you can create a new entry for `SENDGRID_API_KEY`. + +![Xcode Scheme SendGrid API Key Environment Variables](XcodeSchemeSendGrid.png?raw=true "Xcode Scheme SendGrid API Key Environment Variables") + +## Initialize + Optionally, explicitly initialize the provider (this is strongly recommended, as otherwise a missing API key will cause a fatal error some time later in your application): diff --git a/XcodeSchemeSendGrid.png b/XcodeSchemeSendGrid.png new file mode 100644 index 0000000..06c6f0e Binary files /dev/null and b/XcodeSchemeSendGrid.png differ