반응형

ios 9 -- http 사이트 접속 장애 해결하기


환경 : 맥 요세미티, ios9, xcode 7.1.1, objective-C


참고 : 

http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http

https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33



< 문제점 >


xcode 7 에서 NSURLConnection 로 http 사이트 접속시 아래와 같은 에러 발생한다.


App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.







< 해결책 >

Info.plist 에 아래 그림의 빨간 박스 부분을 입력하고 실행하면 ok!


NSAppTransportSecurity 입력후 엔터치면 App Transport Security Settings 라고 자동으로 바뀐다.







** 참고 


The APIs that provide App Transport Security (ATS) are the NSURLConnection and NSURLSession classes and the CFURLRef opaque type.





반응형
Posted by 자유프로그램
,