Skip to content

Releases: giginet/Crossroad

4.2.0

22 May 11:30
Compare
Choose a tag to compare

This version adds macOS support and improves dev environments.

What's Changed

New Contributors

Full Changelog: 4.1.0...4.2.0

4.1.0

02 Dec 14:11
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @0x0c made their first contribution in #40

Full Changelog: 4.0.1...4.1.0

4.0.1

24 Nov 12:26
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.0.0...4.0.1

4.0.0

20 Nov 08:58
Compare
Choose a tag to compare

Crossroad 4.0.0

This release includes breaking API changes. Please read README.

If you have any problems migrating to this version. Feel free to create an issue 😄

3.1.0

16 Jan 05:48
217686b
Compare
Choose a tag to compare

Add tvOS Support #25
Thanks @mdyson !

3.0.1

07 Nov 13:09
Compare
Choose a tag to compare

3.0.0

08 Aug 02:05
b92a257
Compare
Choose a tag to compare

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.

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 [].

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.

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.

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

public protocol Extractable {
    static func extract(from: String) -> Self?
}

After

public protocol Parsable {
    init?(from: String)
}

2.1.0

26 Jun 09:39
2a8a55b
Compare
Choose a tag to compare

2.0.0: Merge pull request #12 from giginet/swift5

12 Apr 07:59
9ece0a4
Compare
Choose a tag to compare

Support omission a URL Scheme on URLPattern

08 Jul 01:54
Compare
Choose a tag to compare