Parse.com 错误“启用固定时不允许使用方法."当我使用 PFQueryTableViewController 子类时 [英] Parse.com error 'Method not allowed when Pinning is enabled.' when I use a PFQueryTableViewController subclass

查看:14
本文介绍了Parse.com 错误“启用固定时不允许使用方法."当我使用 PFQueryTableViewController 子类时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前通过 CocoaPods 使用 1.6.1(= 最新版本)

在我的 swift 项目中,我启用了 localdatastore,然后设置了解析应用程序 ID.之后,我加载了一个故事板,它是一个 PFQueryTableViewController 子类.那里真的没什么特别的.但它仍然崩溃.它似乎在 [PFQuery setCachePolicy:]

内部在 Parse 中崩溃

可能有什么问题?如何使离线功能正常工作?

*** 由于未捕获的异常NSInternalInconsistencyException"而终止应用程序,原因:启用固定时不允许使用方法."*** 首先抛出调用堆栈:(0 核心基金会 0x00000001078a0f35 __exceptionPreprocess + 1651 libobjc.A.dylib 0x0000000107ea3bb7 objc_exception_throw + 452 CoreFoundation 0x00000001078a0e6d +[NSException raise:format:] + 2053 NMC-Goes 0x00000001044abe44 -[PFQuery setCachePolicy:] + 354 NMC-Goes 0x00000001043f6e85 -[PFQueryTableViewController queryForTable] + 3415 NMC-Goes 0x00000001043f712e -[PFQueryTableViewController loadObjects:clear:] + 1106 NMC-Goes 0x00000001043f70ba -[PFQueryTableViewController loadObjects] + 587 NMC-Goes 0x00000001043f69f9 -[PFQueryTableViewController viewDidLoad] + 738 NMC-Goes 0x000000010425ae1a _TFC8NMC_Goes23TripTableViewController11viewDidLoadfS0_FT_T_ + 749 NMC-Goes 0x000000010425bca2 _TToFC8NMC_Goes23TripTableViewController11viewDidLoadfS0_FT_T_ + 3410 UIKit 0x00000001063f3a90 -[UIViewController loadViewIfRequired] + 73811 UIKit 0x000000010642206b -[UINavigationController _layoutViewController:] + 4412 UIKit 0x00000001064225b5 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 21613 UIKit 0x00000001064226b4 -[UINavigationController _startTransition:fromViewController:toViewController:] + 9214 UIKit 0x0000000106423487 -[UINavigationController _startDeferredTransitionIfNeeded:] + 52315 UIKit 0x0000000106423f47 -[UINavigationController __viewWillLayoutSubviews] + 4316 UIKit 0x0000000106569509 -[UILayoutContainerView layoutSubviews] + 20217 UIKit 0x0000000106347973 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 52118 QuartzCore 0x0000000105fdbde8 -[CALayer layoutSublayers] + 15019 QuartzCore 0x0000000105fd0a0e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 38020 QuartzCore 0x0000000105fd087e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 2421 QuartzCore 0x0000000105f3e63e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 24222 QuartzCore 0x0000000105f3f74a _ZN2CA11Transaction6commitEv + 39023 UIKit 0x00000001062cc54d -[UIApplication _reportMainSceneUpdateFinished:] + 4424 UIKit 0x00000001062cd238 -[UIApplication _runWithMainScene:transitionContext:completion:] + 264225 UIKit 0x00000001062cbbf2 -[UIApplication workspaceDidEndTransaction:] + 17926 FrontBoardServices 0x000000010b6a12a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 1627 核心基金会 0x00000001077d653c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 1228 核心基金会 0x00000001077cc285 __CFRunLoopDoBlocks + 34129 核心基金会 0x00000001077cc045 __CFRunLoopRun + 238930 核心基金会 0x00000001077cb486 CFRunLoopRunSpecific + 47031 UIKit 0x00000001062cb669 -[UIApplication _run] + 41332 UIKit 0x00000001062ce420 UIApplicationMain + 128233 NMC-Goes 0x000000010427840e top_level_code + 7834 NMC-Goes 0x00000001042784ea main + 4235 libdyld.dylib 0x000000010877a145 开始 + 136 ???0x0000000000000001 0x0 + 1)

解决方案

我已经制作了一个示例项目来向 Parse.com 演示该问题(请参阅错误:https://developers.facebook.com/bugs/1544122569192939/).

我从 Parse 得到的回应是,cocoapods 的 ParseUI 框架已知存在此问题.

他们建议我从 https://parse.com/docs/downloads

我会尝试看看是否可以解决我的 PFQueryTableViewController 的问题

我手动添加了框架并将其从 Podfile 中取出.现在不再发生崩溃.所以这个错误就在 ParseUI cocoapod 中,就像 parse 在developers.facebook.com 上告诉我的一样

I am currently using 1.6.1 via CocoaPods (= latest)

In my swift project I enable the localdatastore and then set the parse application id. After that, I load a storyboard which is a PFQueryTableViewController subclass. Really nothing special there. But it still crashes. It seems to crash in Parse internally on [PFQuery setCachePolicy:]

What could be wrong? How do I make offline functionality working?

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Method not allowed when Pinning is enabled.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001078a0f35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000107ea3bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x00000001078a0e6d +[NSException raise:format:] + 205
    3   NMC-Goes                            0x00000001044abe44 -[PFQuery setCachePolicy:] + 35
    4   NMC-Goes                            0x00000001043f6e85 -[PFQueryTableViewController queryForTable] + 341
    5   NMC-Goes                            0x00000001043f712e -[PFQueryTableViewController loadObjects:clear:] + 110
    6   NMC-Goes                            0x00000001043f70ba -[PFQueryTableViewController loadObjects] + 58
    7   NMC-Goes                            0x00000001043f69f9 -[PFQueryTableViewController viewDidLoad] + 73
    8   NMC-Goes                            0x000000010425ae1a _TFC8NMC_Goes23TripTableViewController11viewDidLoadfS0_FT_T_ + 74
    9   NMC-Goes                            0x000000010425bca2 _TToFC8NMC_Goes23TripTableViewController11viewDidLoadfS0_FT_T_ + 34
    10  UIKit                               0x00000001063f3a90 -[UIViewController loadViewIfRequired] + 738
    11  UIKit                               0x000000010642206b -[UINavigationController _layoutViewController:] + 44
    12  UIKit                               0x00000001064225b5 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 216
    13  UIKit                               0x00000001064226b4 -[UINavigationController _startTransition:fromViewController:toViewController:] + 92
    14  UIKit                               0x0000000106423487 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523
    15  UIKit                               0x0000000106423f47 -[UINavigationController __viewWillLayoutSubviews] + 43
    16  UIKit                               0x0000000106569509 -[UILayoutContainerView layoutSubviews] + 202
    17  UIKit                               0x0000000106347973 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
    18  QuartzCore                          0x0000000105fdbde8 -[CALayer layoutSublayers] + 150
    19  QuartzCore                          0x0000000105fd0a0e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    20  QuartzCore                          0x0000000105fd087e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    21  QuartzCore                          0x0000000105f3e63e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
    22  QuartzCore                          0x0000000105f3f74a _ZN2CA11Transaction6commitEv + 390
    23  UIKit                               0x00000001062cc54d -[UIApplication _reportMainSceneUpdateFinished:] + 44
    24  UIKit                               0x00000001062cd238 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2642
    25  UIKit                               0x00000001062cbbf2 -[UIApplication workspaceDidEndTransaction:] + 179
    26  FrontBoardServices                  0x000000010b6a12a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
    27  CoreFoundation                      0x00000001077d653c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    28  CoreFoundation                      0x00000001077cc285 __CFRunLoopDoBlocks + 341
    29  CoreFoundation                      0x00000001077cc045 __CFRunLoopRun + 2389
    30  CoreFoundation                      0x00000001077cb486 CFRunLoopRunSpecific + 470
    31  UIKit                               0x00000001062cb669 -[UIApplication _run] + 413
    32  UIKit                               0x00000001062ce420 UIApplicationMain + 1282
    33  NMC-Goes                            0x000000010427840e top_level_code + 78
    34  NMC-Goes                            0x00000001042784ea main + 42
    35  libdyld.dylib                       0x000000010877a145 start + 1
    36  ???                                 0x0000000000000001 0x0 + 1
)

解决方案

I've made an example project to demo the problem to Parse.com (see the bug: https://developers.facebook.com/bugs/1544122569192939/).

The response that I got from Parse was that the ParseUI framework from cocoapods is known to have this problem.

They suggested I get ParseUI from https://parse.com/docs/downloads

I'll try and see if that fixes the problem with my PFQueryTableViewController

Edit: I've added the framework manually and took it out of the Podfile. The crash now no longer occurs. So the bug is in the ParseUI cocoapod like parse told me on developers.facebook.com

这篇关于Parse.com 错误“启用固定时不允许使用方法."当我使用 PFQueryTableViewController 子类时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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