Alamofire 3.0-iOS 9.1上的EXC_BAD_ACCESS [英] Alamofire 3.0 - EXC_BAD_ACCESS on iOS 9.1

查看:95
本文介绍了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中:
https://github.com/Alamofire/Alamofire/issues/ 881

So I stumbled across this post in the Github: https://github.com/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-iOS 9.1上的EXC_BAD_ACCESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆