ios – Parse.com错误“启用固定时不允许使用方法”.当我使用PFQueryTableViewController子类

前端之家收集整理的这篇文章主要介绍了ios – Parse.com错误“启用固定时不允许使用方法”.当我使用PFQueryTableViewController子类前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我目前正在使用1.6.1通过 CocoaPods(=最新)

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

可能是错的?如何使离线功能正常工作?

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

解决方法

启用固定时,不能使用旧的查询缓存策略.

看这里:
PFQuery Class Reference – cachePolicy

猜你在找的iOS相关文章