-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用YTKNetwork在ios8.2、8.3、8.4的系统app启动不起来,app直接闪退 #303
Comments
See #223 升级到新版本 |
我这个是最新的版本,都已经是2.0.3的版本了 @skyline75489 |
使用 Carthage 集成目前这个问题没有好的解决办法,可以改用 Pod 集成,或者修改源码,去掉 priority 有关内容 |
谢谢,我通过修改源代码已经解决了8.0+系统的奔溃问题! |
@skyline75489 真心奇怪了,想知道为什么Carthage不能够解决,而用pod可以呢。。。说是新增CFNetwork.framework,但是并没有什么用 |
难道是?:carthage已经编译好了framework,在工程里面即使添加了CFNetwork,但是只是在自己的工程里链接,YTKNetwork.framework找不到;而pod是源码编译,能够链接上 |
注释掉这部分代码并不会引发其他什么问题的!可以放心使用的。这部分代码只是设置这个网络请求的优先级!
发自网易邮箱大师
在2017年08月05日 14:29,liujidan941209 写道: 你好,因为我有需要改动的地方,所以不能用pod安装来解决这个问题,我这能修改源码,我注释了 if ([request.requestTask respondsToSelector:@selector(priority)]) {
switch (request.requestPriority) {
case YTKRequestPriorityHigh:
request.requestTask.priority = NSURLSessionTaskPriorityHigh;
break;
case YTKRequestPriorityLow:
request.requestTask.priority = NSURLSessionTaskPriorityLow;
break;
case YTKRequestPriorityDefault:
/!!fall through/
default:
// request.requestTask.priority = NSURLSessionTaskPriorityDefault;
break;
}
}
中的request.requestTask.priority = NSURLSessionTaskPriorityDefault;
现在程序是能运行起来了,也有数据,作为初学者还有很多不懂,你能大概给我讲下这个的作用吗?我去掉对项目的影响是什么呀?会在别处造成崩溃吗? @skyline75489
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/yuantiku/YTKNetwork","title":"yuantiku/YTKNetwork","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/yuantiku/YTKNetwork"}},"updates":{"snippets":[{"icon":"PERSON","message":"@liujidan941209 in #303: 你好,因为我有需要改动的地方,所以不能用pod安装来解决这个问题,我这能修改源码,我注释了 if ([request.requestTask respondsToSelector:@selector(priority)]) {\r\n switch (request.requestPriority) {\r\n case YTKRequestPriorityHigh:\r\n request.requestTask.priority = NSURLSessionTaskPriorityHigh;\r\n break;\r\n case YTKRequestPriorityLow:\r\n request.requestTask.priority = NSURLSessionTaskPriorityLow;\r\n break;\r\n case YTKRequestPriorityDefault:\r\n /*!!fall through*/\r\n default:\r\n// request.requestTask.priority = NSURLSessionTaskPriorityDefault;\r\n break;\r\n }\r\n }\r\n中的request.requestTask.priority = NSURLSessionTaskPriorityDefault; \r\n现在程序是能运行起来了,也有数据,作为初学者还有很多不懂,你能大概给我讲下这个的作用吗?我去掉对项目的影响是什么呀?会在别处造成崩溃吗? @skyline75489 "}],"action":{"name":"View Issue","url":"#303 (comment)"}}}
|
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提出问题前请先确认完成了下列几项步骤 New Issue Checklist
问题描述 Issue Description
您好,我们app新建的swfit项目是用YTKNetwork作为网络请求的的库,使用carthage集成进来,然后在ios8.2、8.3、8.4的系统模拟器app启动就闪退,而9.0以上的系统运行都没有问题,我们app支持的最低部署版本时8.2的系统,Xcode的奔溃日志信息时下面的内容:
dyld: Symbol not found: _NSURLSessionTaskPriorityDefault
Referenced from: /Users/romance/Library/Developer/CoreSimulator/Devices/6D9D54BE-C804-4D1A-B9BF-5A91AE51D41E/data/Containers/Bundle/Application/D21360C5-B815-4E43-BA22-1A1351CD8059/FCSBookRoomDemo.app/Frameworks/YTKNetwork.framework/YTKNetwork
Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
in /Users/romance/Library/Developer/CoreSimulator/Devices/6D9D54BE-C804-4D1A-B9BF-5A91AE51D41E/data/Containers/Bundle/Application/D21360C5-B815-4E43-BA22-1A1351CD8059/FCSBookRoomDemo.app/Frameworks/YTKNetwork.framework/YTKNetwork
项目上线紧急问题,希望能给解决方案!(我们公司测试机只有9.0的设备,以上测试的信息时在模拟器上的,出现这个问题是在项目上线后大量的苹果用户8.3、8.4系统的用户反馈安装app就直接闪退,我们就一个一个查,因为新提交的版本才加入这个网络请求的库,最后锁定的这个问题)
The text was updated successfully, but these errors were encountered: