昨天晚上运行teamtalk发现一个问题由于时间太晚没来得及写,今天过来写一下
起因是这样的,后台添加了一些数据,运行程序加载好友时总是崩,
检查了一下是这里的错



图2中,第一次下载程序运行,可能导致错误,亦或者是程序卸载了,再重新运行安装,输入用户名很密码,同样会报错,此处声明为string类型,但运行时不一样是..如果第二次运行,由于是从数据库中取,是string类型,从而可以避免崩溃.第一次运行,Word 是由图3 得到的.继续往下走...

错误就在这里,由于这里是一个NSNumber类型的,从而可能导致错误

此处的version是一个时间戳,,,后台时不时会新增或修改一些用户的信息 然后会更新用户在数据库中updated的字段 你请求带上这个值 服务器就会返回updated比这个值大的用户列表给你了
程序运行次序




网友评论