Search code examples
iosxcodedistributionadhoc

Getting OSStatus error 100021 when trying to ad hoc distribute ios app


OSStatus error 100021

Im getting this awful and weird error when having selected an ad hoc distribution certificiate in Xcode in the Distribute for Ad Hoc section. Anyone know how to fix this error? :-)

Thanks!


Solution

  • I just fixed the same error in my project. I'll explain the fix, and I'd love to know if it helps.

    I had just added the YAJL library to my iOS project. The problem was that I had followed the Mac OS X instructions, rather than the iOS. The Mac OS X instructions include the creation of a Copy Files Build Phase, that copies the YAJL.framework/ folder to the .app bundle.

    This is a huge mistake. enter image description here

    Now, what does a framework folder look like inside? It looks like this:

    enter image description here

    See those symbolic links? (The files with the curvy arrows) They are the culprits. Delete all of those out of the .app folder, and I was able to save the .ipa file with no trouble at all. Actually, you don't need the .framework/ folder in the app bundle at all. That should be compiled into the binary.

    So, check your .app file. Are there any weird folders that don't need to be there? Are there any symbolic links hanging around?