I am getting URL schemes error while archiving my iOS app

1.6k views Asked by At

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

1

There are 1 answers

1
rmaddy On BEST ANSWER

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".