热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

“此应用程序不允许查询方案cydia”IOS9错误-“Thisappisnotallowedtoqueryforschemecydia”IOS9error

IhaveanappwhereIhitaHTTPRequest我有一个应用程序,我点击HTTP请求<NSURLConnection:0x12d755110>{

I have an app where I hit a HTTP Request

我有一个应用程序,我点击HTTP请求

{ request: { URL: http://XX.XX.XX.XXX/webService/dataService.svc/SearchLocation } }

{request: {URL:http://XX.XX.XX.XXX/webService/dataService.svc/SearchLocation}}

Now, whenever the above request is made I get the following error and no data is received in the response. After 60 Sec I get "Time Out error". It is working fine on IOS8 and below but not working gin IOS9. Could anybody let me know what else have I got to do with this issue. Also, I have done the following changes regarding ATS for iOS9 in info.plist, but still facing the issue. Please let me know how to fix this? Thanks in advance.

现在,无论何时发出上述请求,我都会收到以下错误,并且响应中没有收到任何数据。 60秒后我得到“超时错误”。它在IOS8及以下版本上工作正常,但不适用于IOS9。谁能让我知道我还有什么与这个问题有关。另外,我在info.plist中对iOS9的ATS进行了以下更改,但仍然面临着这个问题。请让我知道如何解决这个问题?提前致谢。

Info.plist

的Info.plist

NSAppTransportSecurity
    
        NSAllowsArbitraryLoads
        
        NSIncludesSubdomains
        
        NSTemporaryExceptionAllowsInsecureHTTPLoads
        
        NSTemporaryExceptionMinimumTLSVersion
        TLSv1.1
    

Error

错误

2015-09-22 22:19:58.333 App[751:139449] regionDidChangeAnimated>>>>>>>>>>>>>>>>>: = 40.844278,-74.130561
2015-09-22 22:19:58.344 App[751:139449] Reachability Flag Status: -R ------- networkStatusForFlags
2015-09-22 22:19:58.350 App[751:139449] request:My Device UDIDSecretKey/SecretKey>LOCATION12040.844276-74.13056225
2015-09-22 22:19:58.357 App[751:139449] -canOpenURL: failed for URL: "cydia://package/com.fake.package" - error: "This app is not allowed to query for scheme cydia" 2015-09-22 22:19:58.945 App[751:139449] theXML contains: 2015-09-22 22:19:58.959 App[751:139449] refreshLocationList maxRecordsSelected:::::::::::::20 2015-09-22 22:19:58.960 App[751:139449] refreshLocationList maxNumOfRecords:::::::::::::20 2015-09-22 22:19:58.960 App[751:139449] refreshLocationList LocationCount::::::::::::::0 2015-09-22 22:19:58.960 App[751:139449] isTempleMaxRecordChanged :::::::::::::0

3 个解决方案

#1


10  

This problem only happens in iOS 9 since Apple made some changes impacting URL schemes.

此问题仅发生在iOS 9中,因为Apple进行了一些影响URL方案的更改。

I think that one of your libraries is checking to see if you are running on a jailbroken device by checking if it can open cydia://URL...

我认为您的某个库通过检查是否可以打开cydia:// URL来检查您是否在越狱设备上运行...

"Up until iOS 9, apps have been able to call these methods on any arbitrary URLs. Starting on iOS 9, apps will have to declare what URL schemes they would like to be able to check for and open in the configuration files of the app as it is submitted to Apple"

“直到iOS 9,应用程序才能在任意URL上调用这些方法。从iOS 9开始,应用程序必须声明他们希望能够在应用程序的配置文件中检查和打开的URL方案因为它被提交给Apple“

Link: http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes

链接:http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes

#2


23  

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

第一个解决方案: - 只需在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.

使用SDK 9构建的任何应用程序都需要在其plist文件中提供LSApplicationQueriesSchemes条目,声明它尝试查询哪些方案。

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:

假设有两个应用TestA和TestB。 TestB想要查询是否安装了TestA。 “TestA”在其info.plist文件中定义了以下URL方案:

CFBundleURLTypes

    
        CFBundleURLSchemes
        
            testA
        
    

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

第二个应用程序“TestB”试图通过调用以确定是否安装了“TestA”:

[[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:

但这通常会在iOS9中返回NO,因为需要将“TestA”添加到TestB的info.plist文件中的LSApplicationQueriesSchemes条目中。这是通过将以下代码添加到TestB的info.plist文件来完成的:

LSApplicationQueriesSchemes

    TestA

#3


0  

Delete the Splunk Mint framework if you have it added in the project because Xcode 7 does not support the framework.

如果您在项目中添加了Splunk Mint框架,则删除Splunk Mint框架,因为Xcode 7不支持该框架。

Also add this key to your .plist :

同时将此密钥添加到.plist中:

NSAppTransportSecurity

    NSAllowsArbitraryLoads
    


推荐阅读
author-avatar
星夜幂语_525
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有