Contents

jordanekay/url

`URL` is a freestanding Swift macro that provides an unwrapped `Foundation URL` for the string literal argument.

Usage

import URL

let url = #URL("https://www.apple.com")

This will automatically generate the following code:

URL(string: "https://www.apple.com")!

Installation

The package can be installed using Swift Package Manager. To add URL to your Xcode project, select File > Add Package Dependancies... and search for the repository URL: https://github.com/davidsteppenbeck/URL.git.

License

URL is available under the MIT license. See the LICENSE file for more info.

Acknowledgements

The URL macro example is described in detail in Antoine v.d. Lee's blog post.

Package Metadata

Repository: jordanekay/url

Default branch: main

README: README.md