Archive validation error NSSetM

喜欢而已 提交于 2019-12-11 00:41:14

问题


I'm preparing a new version of an app, working in XCode 5. I've built the app, signed it and archived it without any issues and have prepared a new version in iTunes connect. When I validate the archive in Organizer I however get the following error message:

**-[__NSSetM addObject:] object cannot be nil

I find the error very strange. Why do I get the error when the archive is validated? If there are issues in the code why don't they show up when I build or run the app?

I tried the usual desperate stuff - everything from rebuilding the archive to rebooting the computer.

Any suggestions? Googling didn't give any clues.


回答1:


This means that you have used Mutatble NSSet. And while adding object to it you are adding nil object. Search where you have used NSSet and adding object to it




回答2:


If anyone else runs in to the issue, the problem was that there were some empty lines in the info.plist file. The section with the problem looked something like this

<key>CFBundleIconFiles</key>
<array>
    <string>80x80</string>
    <string>58x58</string>
    <string>29x29</string>
    <string>120x120</string>
    <string>114x114</string>
    <string>57x57</string>
    <string></string>
    <string></string>
</array>

When we removed the empty string values the validation error was gone.



来源:https://stackoverflow.com/questions/19551019/archive-validation-error-nssetm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!