通过在初始化引发异常之前调用enableLocalDatastore来启用Parse上的本地数据存储 [英] Enabling local data store on Parse by calling enableLocalDatastore before initialization throws exception

查看:62
本文介绍了通过在初始化引发异常之前调用enableLocalDatastore来启用Parse上的本地数据存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Parse文档中,它明确指出[Parse enableLocalDatastore];应该在[Parse setApplicationId:clientKey:];之前调用: https://parse.com/docs/ios_guide#localdatastore-find/iOS

In Parse docs, it clearly states that [Parse enableLocalDatastore]; should be called before [Parse setApplicationId:clientKey:];: https://parse.com/docs/ios_guide#localdatastore-find/iOS

但是,就我而言,它立即引发异常:

However, in my case, it immediately throws an exception:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You have to call setApplicationId:clientKey: on Parse to configure Parse.'

如果我将代码移到[Parse setApplicationId:clientKey:];之后执行,我不会收到错误消息,但是本地存储似乎无法正常工作.

If I move the code to execute after [Parse setApplicationId:clientKey:]; I don' get an error, but local store doesn't seem to work.

似乎Parse自己的文档具有误导性.任何人都有解决方案吗?

Seems that Parse's own docs are misleading. Anyone got a solution?

推荐答案

此问题应在新的 v1.6.1中修复. 版本的Parse SDK.

This should be fixed in the new v1.6.1 version of the Parse SDK.

这篇关于通过在初始化引发异常之前调用enableLocalDatastore来启用Parse上的本地数据存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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