“This app is not allowed to query for scheme cydia” IOS9 error

后端 未结 3 1730
长情又很酷
长情又很酷 2020-12-09 03:53

I have an app where I hit a HTTP Request

{ request: { URL: http://XX.XX.XX.XXX/we

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 03:54

    First solution:- just add bellow code in your info.plist

    NSAppTransportSecurity
    
        NSAllowsArbitraryLoads
        
    
    

    Second solution:-

    Any app built with SDK 9 needs to provide a LSApplicationQueriesSchemes entry in its plist file, declaring which schemes it attempts to query.

    LSApplicationQueriesSchemes
    
     urlscheme
     urlscheme2
     urlscheme3
     urlscheme4
     
    

    Assuming two apps TestA and TestB. TestB wants to query if TestA is installed. "TestA" defines the following URL scheme in its info.plist file:

    CFBundleURLTypes
    
        
            CFBundleURLSchemes
            
                testA
            
        
    
    

    The second app "TestB" tries to find out if "TestA" is installed by calling:

    [[UIApplication sharedApplication]
                        canOpenURL:[NSURL URLWithString:@"TestA://"]];
    

    But this will normally return NO in iOS9 because "TestA" needs to be added to the LSApplicationQueriesSchemes entry in TestB's info.plist file. This is done by adding the following code to TestB's info.plist file:

    LSApplicationQueriesSchemes
    
        TestA
    
    

提交回复
热议问题