怀疑这是一个普遍存在的问题,但希望有人遇到类似问题时能有所帮助。
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
发布评论