EDIT : In a day, I can share another thought. Although git cloning works, the problem occurs after some changes are made. This makes me wonder if the problem is due to poor file formatting (like non-unix-like EOF or the like) or just an error in Xcode. In any case, my workflow currently looks like this:
1) git clone to another directory 2) archive 3) if there is an error, I need to fix it, 4) git commit & git push 5) repeat steps 1 & 2 ...
Which is annoying, but this is the only way I can archive my project and upload it to the App Store ...
ORIGNAL POST: I also encountered this error. My project uses CocoaPods, several goals and build schemes, and group rights. Sometimes I can’t build, although this is a fix (see below), but the archiving problem persists for a longer time. After two days of fighting it, my resume looks like this:
I followed all the answers and I see that sometimes I do:
1) clean project
2) (optional - not required) restart Xcode
3) delete the contents of the data folders.
allows me to compile and run the application. But I still can’t archive. Sometimes it seems that I have to do it twice.
In addition to the above, I tried (and could not archive) the following sentences:
- rename the target names (and containing folders) to NOT include spaces, Extension and WatchApp goals do not have spaces in their names, but the project will not be archived (without changes)
- I checked that there are no embedded binaries in Extension Target (watchApp does not have this option)
- I tried to change the deployment target (the default was iOS 8.3 for Xcode 6.4) for both 8.2 and 8.4 without any luck in archiving.
- I updated the AppID and all training profiles for both "adHoc" and "release schemes" were also out of luck.
- and I checked that there are no spaces in the current scheme that I am trying to archive, but it still does not change anything.
- I even tried the last sentence, that is, changed the default location of the Derived Data folder, but, as I suspected, it did not change anything.
Interestingly, in fact, HAVE WORKED is Mike Manh's suggestion: check the repo on another folder .
After cloning the repo into a new empty folder, everything suddenly worked. This leads me to conclude that there may be some remaining files / broken links / something else in my current project folder. I guess this could happen when I tried to reinstall the watchKit development branch into the current main branch. Which began to silence me with crazy conflicts, and I finally interrupted the permutation. Perhaps this was the moment when the archive option ceased to function normally.
mikett Aug 18 '15 at 9:34 2015-08-18 09:34
source share