1 网络请求问题
今天运行了下以前的项目发现项目要提示:
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
想到之前听说IOS9 应用改为HTTPS 请求,以前项目都是HTTP请求。不过之前的项目已经不维护了,所以搜了一圈找到如下方法:
- 在Info.plist中添加
NSAppTransportSecurity类型Dictionary。 - 在
NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES 
试了一下 解决问题。
                
                  
                  
                  
                  
                            
本文介绍了在iOS应用中遇到的资源加载失败问题,原因是App Transport Security策略要求使用安全连接。通过在Info.plist中添加NSAppTransportSecurity类型的Dictionary并设置NSAllowsArbitraryLoads为YES,成功解决了HTTP请求的问题。
          
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					1906
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            