问题
I am trying to archive and distribute my ios app but out of nowhere it just stopped working. I have deployed my app many times and also had this problem before because xcode somehow creaded some bad xml lines in my project.pbxproj file, but eventually I edited the xml source code and it was ok (app archive and upload/distribution to AppStore). Now xcode is showing my new created archive in "Other items" sections and i cannot upload to AppStore. I opened the archive and I noticed that key elements are missing from the Info.plist file inside:
I looked into other archives (after upload/distribution) and it should look like this:
I tried about 10-11 links on google or stackoverflow, summerized very well here (see accepted answer): Xcode creating generic Xcode archive instead of iOS App Archive?
I tried everything and also cocoapods update to 1.10.0, cleanup cache, reinstall pods, no luck. My app uses another framework project (developed also by me as described here: https://www.raywenderlich.com/5109-creating-a-framework-for-ios) but I haven't changed that one either. I set Skip install to YES to everything except my app's main TARGET and PROJECT Build settings and checked for private header files. I also distributed another app that uses that exact framework project and everything is ok there.
I checked the new changes compared to last commit and the only modifications (except the source code files) was the build and version number of my app.
In the end, I opened my archive and added the missing entries manually in with an xml editor inside the Info.plist, and restarted xcode (as described at the end of the accepted answer in the link above). After that I was able to distribute my app. The problem is that I do not want this approach because I do not know what is causing this and also what other problems it may cause. Does anyone have any other ideas? It seems a lot of people come across this issue, it has tens of possible causes and it makes me lose hours of work everytime it happends (about once every few months this issue just pops out of nowhere).
来源:https://stackoverflow.com/questions/64896305/xcode-creates-generic-archive-of-ios-app-because-of-malformed-incomplete-info-pl