2016年3月9日 星期三

iOS筆記:iOS9後與HTTP

Apple在iOS9之後強迫預設使用HTTPS才能建立連線,若是沒使用HTTPS,建立連線會發現⋯⋯送出去的請求一去不回來了,什麼反應也沒有

keyword: Ajax not working,  NSURLSession not working ...


解決方法:
打開專案,找到info.plist
新增一個Dictionary欄位叫App Transport Security Settings,裡面新增一個Boolean參數Allow Arbitrary Loads值設為YES


沒有留言:

張貼留言