The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
This version adds macOS support and improves dev environments.
## What's Changed
* Modify GitHub Action hooks by @giginet in https://github.com/giginet/Crossroad/pull/44
* Fix sample code in README.md by @simorgh3196 in https://github.com/giginet/Crossroad/pull/45
* Support macOS by @itaru0724 in https://github.com/giginet/Crossroad/pull/47
## New Contributors
* @simorgh3196 made their first contribution in https://github.com/giginet/Crossroad/pull/45
* @itaru0724 made their first contribution in https://github.com/giginet/Crossroad/pull/47
**Full Changelog**: https://github.com/giginet/Crossroad/compare/4.1.0...4.2.0
## What's Changed
* Update README.md by @0x0c in https://github.com/giginet/Crossroad/pull/40
* Conceal some models by @giginet in https://github.com/giginet/Crossroad/pull/42
* Remove UserInfo from unnecessary methods by @giginet in https://github.com/giginet/Crossroad/pull/41
## New Contributors
* @0x0c made their first contribution in https://github.com/giginet/Crossroad/pull/40
**Full Changelog**: https://github.com/giginet/Crossroad/compare/4.0.1...4.1.0
## What's Changed
* Fix universal link parser by @giginet in https://github.com/giginet/Crossroad/pull/39
**Full Changelog**: https://github.com/giginet/Crossroad/compare/4.0.0...4.0.1
## Crossroad 4.0.0
This release includes breaking API changes. Please read [README](https://github.com/giginet/Crossroad/blob/4.0.0/README.md).
If you have any problems migrating to this version. Feel free to create an issue 😄
Add tvOS Support #25
Thanks @mdyson !
- [Add Module stability by sidepelican · Pull Request #24 · giginet/Crossroad](https://github.com/giginet/Crossroad/pull/24)
Crossroad 3.0.0 includes dramatically changes.
## Careful treating URL in its RFC #18
According to the URL RFC, URL schemes and hosts must be case-insensitive.
However, other path components must be case-sensitive.
Crossroad now treats case-insensitive URL.
```swift
router = DefaultRouter(scheme: "pokedex")
router.register([
("/pokemons", { context in
let type: Type? = context[parameter: "type"]
presentPokedexListViewController(for: type)
return true
}),
// ...
])
let canRespond25 = router.responds(to: URL(string: "POKEDEX://POKEMONS")!) // Accept!!!
```
## Support subscript #22
You can get arguments and parameters via `[]`.
```swift
let pokemonID: Int = context[argument: "pokemonID"]
let query: String = context[parameter: "query"]
```
## More Support relative path #17
I recommend to use relative path for routing patterns especially for Universal Links. It should be readable.
```swift
router = DefaultRouter(url: URL(string: "https://my-awesome-pokedex.com")!)
router.register([
("/pokemons", { context in
let type: Type? = context[parameter: "type"]
presentPokedexListViewController(for: type)
return true
}),
// ...
])
```
## Introduce `URLParser` #16
In some use cases (such a complex applications), you need to use separated URL parser.
Now, Crossroad 3 provides `URLParser` to make Context.
```swift
let parser = URLParser<Void>()
let context = parser.parse(URL(string: "pokedex:/pokemons/25")!,
in: URLPattern("pokedex://pokemons/:id")))
```
## Rename `Extractable` to `Parsable` #19
Now rename `Extractable` to `Parsable`. You have to use constractors instead of the static methods.
### Before
```swift
public protocol Extractable {
static func extract(from: String) -> Self?
}
```
### After
```swift
public protocol Parsable {
init?(from: String)
}
```
- [Support Universal Links by giginet · Pull Request #14 · giginet/Crossroad](https://github.com/giginet/Crossroad/pull/14)
Support omission a URL Scheme on URLPattern
5 years ago
- Support omission a URL Scheme on URLPattern. [Type scheme once only by rob-nash · Pull Request #5 · giginet/Crossroad](https://github.com/giginet/Crossroad/pull/5)