Alamofire 3.0

编程入门 行业动态 更新时间:2024-10-06 16:16:49
本文介绍了Alamofire 3.0-iOS 9.1上的EXC_BAD_ACCESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

怀疑这是一个普遍存在的问题,但希望有人遇到类似问题时能有所帮助。

Doubtful that this is a widespread issue, but hoping someone could help if they've had a similar problem.

我遇到了这个奇怪的问题,该问题仅在设备上运行我的应用程序时出现,Alamofire在模拟器中可以正常工作。 当我在设备上升级到iOS 9.1之后,这种情况开始出现。

I'm having this weird issue that only appears when running my App on the device, Alamofire works fine in the simulator. This started to appear after I upgraded to iOS 9.1 on my device.

现在,当我第一次在设备上测试应用程序时, Alamofire请求,EXC_BAD_ACCESS出现在var组件行的defaultHTTPHeaders> acceptLanguage块下(参见图片)

Now when I test the app on my device, as soon as I make my first Alamofire request, an EXC_BAD_ACCESS appears on the var components line under the defaultHTTPHeaders > acceptLanguage block (see Image)

发出请求的代码是:

Alamofire.request(.GET, "/api/index.php", parameters: ["version": "1"]).responseJSON{ response in if(response.result.isSuccess) {...

使用断点显示该代码无法升级到ResponseJSON方法。

Using Breakpoints shows that the code does not progress to the ResponseJSON method.

任何帮助都很感激!

谢谢

推荐答案

所以我偶然发现了这个pos t在Github中: github/Alamofire/Alamofire/issues/ 881

So I stumbled across this post in the Github: github/Alamofire/Alamofire/issues/881

事实证明,无论出于何种原因,如果这种情况开始发生,您可能都需要删除派生数据文件夹。

Turns out that for whatever reason - you may need to delete your Derived Data folder if this starts happening.

为此,请在此处导航:

〜/ Library / Developer / Xcode / DerivedData

删除与导致此问题的应用相关的文件夹。 这应该可以解决!

Delete the folders that relate to your app causing this issue. This should fix it!

更多推荐

Alamofire 3.0

本文发布于:2023-11-26 21:47:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635321.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Alamofire

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!