Cocoa错误3840只解析代码iOS7

编程入门 行业动态 更新时间:2024-10-23 17:28:22
本文介绍了Cocoa错误3840只解析代码iOS7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

背景:我几天前决定,我将从Facebook-iOS-SDK v3.24更新Facebook SDK到FBSDKCoreKit。我更新了我的Podfile相应和安装所有的库很好。然后我开始更新一些代码以使用更新的SDK规范。

在短时间工作后,我改变了主意,决定回滚到旧版本。我做了所有必要的cocoapods更改和安装,放弃所有本地变化在Xcode,重新编译和运行。

现在,当我尝试在旧的iOS7测试设备上运行时,每当应用程式启动时,我都会收到错误讯息。以下是确切的控制台输出:

2015-10-15 20:14:31.271 hiatus [184:6003] :无法运行命令最终与错误:错误域= NSCocoaErrorDomain代码= 3840操作不能完成。(可可错误3840.)(JSON文本没有开始与数组或对象和允许片段未设置的选项。)UserInfo = 0x14d67d20 {NSDebugDescription = JSON文本没有以数组或对象和选项启动,允许片段未设置}

在控制台中显示此错误后,无法使用Parse功能。这意味着,在我的情况下,用户无法登录。会显示空白的错误。

在iOS8和iOS9(模拟器和真实设备)上一切正常。我正在使用Parse v1.9。我试过清理项目,重置等,但没有任何成功。

我已经能够跟踪到PFEventuallyQueue.m中的特定函数。它似乎发生在(void)_runCommandsWithRetriesCount:。我只是没有办法知道如何解决它。

解决方案

这是SDK v1.9.0的一个已知问题( github/ParsePlatform/Parse-SDK-iOS-OSX/issues/388 )。它已经修复,但尚未发布(它将是1.9.1版本的一部分)。

您有3个选项:

  • 使用1.8.5,直到1.9.1发布。
  • 进行此更改,自行修复错误: github/ParsePlatform/Parse-SDK-iOS-OSX/commit/edde3bfa8a4476ba460dddbef6f75772960e1718
  • 使用git存储库的主分支获取最新提交。如果你使用cocoapods你可以这样设置你的pod像这样: pod'Parse',:git => 'github/ParsePlatform/Parse-SDK-iOS-OSX.git'

Background: I decided a couple days ago that I was going to update Facebook SDK to FBSDKCoreKit from Facebook-iOS-SDK v3.24. I updated my Podfile accordingly and installed all libraries fine. I then began updating some of the code to work with the updated SDK spec.

After working on it for a short amount of time, I changed my mind and decided to rollback to the old version. I made all necessary cocoapods changes and installs, discarded all local changes in Xcode, recompiled and ran. Everything worked fine... or so I thought.

The Problem: Now, when I try to run on my old iOS7 test device, I get an error whenever the app launches. Below is the exact console output:

2015-10-15 20:14:31.271 hiatus[184:6003] [Error]: Failed to run command eventually with error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x14d67d20 {NSDebugDescription= JSON text did not start with array or object and option to allow fragments not set.}

After this error is displayed in the console, no Parse functionality works. Which means, in my case, that a user is unable to login. An empty error is displayed instead.

Everything works fine on iOS8, and iOS9 (simulators and real devices). I'm working with Parse v1.9. I've tried cleaning the project, resetting, etc, but without any success.

I've been able to track this down to a specific function within PFEventuallyQueue.m. It seems to occur within (void)_runCommandsWithRetriesCount:. I just have no way of knowing how to fix it.

解决方案

This is a known issue with SDK v1.9.0 (github/ParsePlatform/Parse-SDK-iOS-OSX/issues/388). It has been fixed but not released yet (it will be part of the 1.9.1 release).

You have 3 options :

  • Use 1.8.5 until 1.9.1 is released.
  • Fix the bug yourself by making this change : github/ParsePlatform/Parse-SDK-iOS-OSX/commit/edde3bfa8a4476ba460dddbef6f75772960e1718
  • Use the master branch of the git repository to get the latest commits. If you're using cocoapods you can do it by setting your pod like this : pod 'Parse', :git => 'github/ParsePlatform/Parse-SDK-iOS-OSX.git'

更多推荐

Cocoa错误3840只解析代码iOS7

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

发布评论

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

>www.elefans.com

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