I'm having problems with the new fast conversion 2.0.
I converted my application, everything seemed to work fine, however the connection to the web server completely stopped working together.
source:
let tempstring: String? = "\(urlBase)"
let url = NSURL(string: tempstring!.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)!)
var key: NSString?
key = NSString(contentsOfURL: url!, encoding: NSUTF8StringEncoding, error: nil)
temp string will be http://www.zephyrpanthur.com/ - other variables and subdirectories
conversion completed:
let tempstring: String? = "\(urlBase)"
let url = NSURL(string: tempstring!.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)!)
var error: NSError?
var key: NSString?
do {
key = try NSString(contentsOfURL: url!, encoding: NSUTF8StringEncoding)
print(key)
}
catch var error1 as NSError {
error = error1
print(error)
key = nil
}
Basically just added try / catch, which is awesome. However, keyit is always equal nil.
I tried a lot of things, and eventually realized that if I download http://www.google.com , it worked and loaded the site. I tried with Yahoo, Facebook and some other pages that are not the main names, and they all worked.
zephyrpanthur.com, . , , , 8bitfox.com, . www. ssl (https/http)
, , , . . iPhone, iPad , ...
, . , , , , , , , .
" zepyrpanthur.com" , , .
, 2.0, -, . , ssl ? , , ssl, , ?