Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
346 views
in Technique[技术] by (71.8m points)

WEEX storage 模块在iOS端setItem失败

同样的代码在安卓可以正确保存数据
在iOS无法保存,返回event.result是failed.

是不是需要什么特殊配置才能使用?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

原来是因为setItem只能输入String,而不是json对象。
安卓上可能自动把json对象转成字符串了,而iOS没有,所以产生安卓没问题iOS有问题的假象。。。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...