今天老大突然告诉我,他的手机升了iOS12,APP不能正常工作了。

我试着升级之后运行了一下,果然有问题!

iOS 12 sqlite3_exec insert时崩溃崩溃在这一行sqlite3_exec

    int result = sqlite3_exec(db, [sqlite UTF8String], nil, nil, &error);

原因暂时不清楚,如果有清楚的麻烦告诉我一下,感谢!

解决方法:

替换为下面的方法:

 int result = sqlite3_prepare_v2(db, [sqlite UTF8String], -1, &stmt ,&error);

希望碰到这个问题的朋友少走点弯路。

相关文章:

  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2020-12-26
  • 2021-09-03
猜你喜欢
  • 2021-05-05
  • 2022-12-23
  • 2021-09-07
  • 2021-06-06
  • 2021-07-12
相关资源
相似解决方案