I submitted my app to app store, they said it's crash when type url & press "Done" from keyboard, But my real device, my tester friends devices and simulator we tested on 13.3.1 it's working fine! Not able to find whats the issues here.
this crash log from apple developer :
my code:
//MARK:-- TEXTFIELD DELEGATE
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
let detector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue)
let matches = detector.matches(in: textField.text!, options: [], range: NSRange(location: 0, length: textField.text!.utf16.count))
for match in matches {
guard let range = Range(match.range, in: textField.text!) else { continue }
let url = textField.text![range]
print("return: " + url)
let Turl = String(url)
DispatchQueue.main.async {
self.tableView.reloadData()
}
if Turl.isEmpty {
self.name.becomeFirstResponder()
return false
}else{
self.url.becomeFirstResponder()
UserDefaults.standard.set(Turl, forKey: "URL")
DispatchQueue.main.async {
self.tableView.reloadData()
}
textField.resignFirstResponder()
dismiss(animated: true){
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "load"), object: nil)
}
//apped data to array and save to userDefault
var saved = URLArray as! [String]
var named = nameArray
let PlaylistName = name.text!
if !saved.contains("\(textField.text!)"){
saved.append(Turl)
named.append(PlaylistName)
UserDefaults.standard.set(saved, forKey: "URLs")
UserDefaults.standard.set(named, forKey: "name")
print(named, saved)
self.tableView.reloadData()
}else{
print("was saved")
dismiss(animated: true, completion: nil)
}
}
}
if textField == name{
self.name.resignFirstResponder()
self.url.becomeFirstResponder()
}
self.tableView.reloadData()
return true
}

Exception has Exception Code = 1 (second line in your exception):
which is usually the result of force unwrapping values that are
nil.For instance
try!andtextField.text!, or any other force unwrap you have may cause it. Instead, use guards and return from function (possibly with error) if they fail. E.g:Also it will be much easier for you to debug if you include symbol files with your build.