0

This is the error -

The following URL schemes found in your app are not in the correct formats.Please see RFC1738 for more detail.

This is my code -

@IBAction func webdropbox1(_ sender: Any) {
    let safariVC = SFSafariViewController(url: NSURL(string: "www.dropbox.com")! as URL)
    self.present(safariVC, animated: true, completion: nil)
    safariVC.delegate = self
}

Also I have added the URL to my info.plist file -

Info.plist file screenshot:

https://i.stack.imgur.com/xeEIw.png

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Ashish Verma
  • 113
  • 1
  • 5

1 Answers1

0

A URL scheme is the part before the colon: http, https, ftp, mailto, file, etc.

www.dropbox.com is not a URL scheme. It's not even a valid URL.

You have two issues.

  1. Your Info.plist needs to be updated to specify actually valid schemes, not a partial URL.
  2. Your code to create the Dropbox URL needs to use "https://www.dropbox.com".
rmaddy
  • 314,917
  • 42
  • 532
  • 579