I am using URL scheme in my iPhone app,from a page I switch user to safari,and a button click from Web page,I am reverting back to app At that time ,some parameters are passed by the web page like
myapp://parameter=1
How can I find this parameter from my app ? I have placed a break point in
-(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)ur
but while revert back.it is not get called.
Try this code. this ll useful even if you had numbers of parameters and values in url.
Now you got all strings in queryComponents like
Now you can get first value like that
You can use this
url host
to find out the parameters, where parameters could be of any kind, anything afterhttp://
or custom tagcustom://
will be caught in the following codeIf you have multiple parameters then you could use
componentsSeparatedByString
method to separate the parameters