Hi, I have a problem with Xcode.
Solution? Thanks!
override func viewWillAppear() {
if manifest == nil {
let path = Bundle.main.path(forResource: "PWAinfo/manifest", ofType: "json")
let url = URL(fileURLWithPath: path!)
do {
let jsonData = try Data(contentsOf: url)
let json = try JSONSerialization.jsonObject(with: jsonData) as! [String:Any]
manifest = Manifest(json: json)
webUrl = manifest.getAppStartUrl()
} catch {
print(error)
}
}
(Error in line: let url = URL(fileURLWithPath: path!))
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file
Solution? Thanks!
override func viewWillAppear() {
if manifest == nil {
let path = Bundle.main.path(forResource: "PWAinfo/manifest", ofType: "json")
let url = URL(fileURLWithPath: path!)
do {
let jsonData = try Data(contentsOf: url)
let json = try JSONSerialization.jsonObject(with: jsonData) as! [String:Any]
manifest = Manifest(json: json)
webUrl = manifest.getAppStartUrl()
} catch {
print(error)
}
}
(Error in line: let url = URL(fileURLWithPath: path!))
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file