iOS 国际化报错read failed: Couldn't parse property list because the input data was in

282 阅读1分钟

如果在国际化中遇到 read failed: Couldn't parse property list because the input data was in an invalid format 报错

常见错误一般3种

1.缺少分号
2.有不支持的文本格式
3.错误的缩进

在文件比较大的情况下很难找到具体的错误位置。所以我们需要更加详细的报错信息。

在终端中cd到国际化的目录下

plutil -lint Localizable.strings

然后就能打印出具体错误的行号了。