Fetch parameters from URL in Swift

Updated 5 April 2018

Save

Fetch parameters from URL

In Swift,  Many times you need to fetch parameters from URL. Like you are using a web view where every time you get a URL in return and then you have to fetch particular parameter for match result you have to traverse complete URL and it also needs to fetch Parameter from URL when you are using Universal linking it’s tough to fetch by using string match functions so find an easy way. Let’s take an example:-

You have a URL for an ex:-  www.xyz.com?name=hello&id=1&status=true

So you want to fetch the value of id parameter. By using this function you fetch you parameter.

How to fetch:-

 

Thanks for go through this blog. Stay cool and stay updated.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home