[Solved] unexpectedly found nil while unwrapping an Optional value
I have already solved the problem.When I use 4 g, access to the dataServer!ServerURL is nil.My solution is to give it a local IP if davServer?.serverURL == nil { serverAddress = NSURL.init(string: “http://localhost/playts.m3u8”)! }else{ serverAddress = (davServer?.serverURL.URLByAppendingPathComponent(self.m3u8!))! } solved unexpectedly found nil while unwrapping an Optional value