I was trying out the tutorial of building a simple web browser using UIWebView. In which there is feature to prefix the scheme "http://" to the url if user just types in the address without any scheme. For Ex: user types in google.com instead of http://google.com This is achieved using the NSURL's scheme property. All is well until the address is simple.
If the address is something like this: "test1.samplewebsite.com:81" NSURL scheme detect the string "test1.samplewebsite.com" as scheme instead of no scheme.
This works fine on safari, it detects no scheme and promptly prefixes http.
Before jumping into writing code to detect scheme, I wanted to check, Is there any system API's for detecting valid scheme?