In my application, when the user add an object, can also add a link for this object and then the link can be opened in a webView.
I tried to save a link without http://
If you're checking for "http://" you'll probably want case-insensitive search:
// probably better to check for just http instead of http://
NSRange prefixRange =
[temp rangeOfString:@"http"
options:(NSAnchoredSearch | NSCaseInsensitiveSearch)];
if (prefixRange.location == NSNotFound)
Although I think the url scheme check is a better answer depending on your circumstances, as URLs can begin with http or https and other prefixes depending on what your use case is.