How check webrequest is not http or https url in swift?

Solution:

Here we will check that our web request url contains the "tel" or something else except http or https.
In your webviewdelegate method you can write the below code and check.

        let str = request.url?.absoluteString

        if str?.startIndex.distance(to:str?.index(of: "tel")) != 0 {

}

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift