Víctor Pimentel
Sep 6, 2018 · 1 min read

Honestly, I just forgot about it and whip it a quick custom query components method, but you are right. It's definitely more correct and future-proof to use Apple's URLComponent.

If you want to look at a possible approach with URLComponents, I played today a little bit and reached this solution:

Thanks for noticing!

    Víctor Pimentel
    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade