Xcode can't open Info.plist — error says “there is no such file”

前端 未结 12 1309
悲&欢浪女
悲&欢浪女 2020-12-13 08:16

I switched to Xcode 4 and loaded my project, which worked perfectly in Xcode 3. When I run it, I get an error that says:

The file “Info.plist” couldn’

12条回答
  •  情书的邮戳
    2020-12-13 08:54

    In my case one of the key was missed out while adding ATS compliance flag

    NSAppTransportSecurity
    

    Instead of the correct one as below

    
    NSAppTransportSecurity
    
        NSAllowsArbitraryLoadsInWebContent
        
        NSAllowsArbitraryLoads
        
        NSExceptionDomains
        
            some-service1.com
            
                NSExceptionAllowsInsecureHTTPLoads
                
            
            some-service2.com
            
                NSExceptionAllowsInsecureHTTPLoads
                
            
        
    
    

    I was having this

    
        NSAllowsArbitraryLoadsInWebContent
        
        NSAllowsArbitraryLoads
        
        NSExceptionDomains
        
            some-service1.com
            
                NSExceptionAllowsInsecureHTTPLoads
                
            
            some-service2.com
            
                NSExceptionAllowsInsecureHTTPLoads
                
            
        
    
    

    Although some of the online XML Validators did say the XMLs are correct, (which was not), I used

    plutil filename.plist
    

    going to the directory where plist file is present (from terminal) and got to know the exact line number that had issues Reference :(https://stackoverflow.com/a/32494850/5438240)

提交回复
热议问题