Xcode iOS organizer submit to app store yields “The archive is invalid” error

前端 未结 21 1196
萌比男神i
萌比男神i 2021-01-01 18:35

I just switched from Xcode 3 to 4. When I attempt to upload an app that I have archived to the organizer, I receive this error:

The archive is invalid

相关标签:
21条回答
  • 2021-01-01 18:43

    Make sure that you are signing with keys for correct product/bundle ID. If I remember correctly, mixing that up could lead in archiving problems. Also, go to that temp folder and check what IS created. Maybe xCode is creating the IPA under a different name, that could give you a hint.

    0 讨论(0)
  • 2021-01-01 18:45

    I had the same issue for both TestFlight and App Store. The solution for me was to archive the app, and in the organizer select "Don't sign" when you try to validate/submit or share (in the case of TestFlight).

    Hope this helps.

    0 讨论(0)
  • 2021-01-01 18:45

    A good way to test is to run the build from the command line. Change to your project folder and run 'xcodebuild' and look carefully at the outputs, especially around the 'codesign' command.

    I did this and discovered the following:

    architecture armv7 object: /Users/chris/Documents/x/x/build/Release-iphoneos/x.app/x malformed object
    object file format invalid or unsuitable
    

    So it isn't a solution, but it at least lets you zero in on what the problem is. Anyway, for me, looks like an architecture config error.

    Update - to fix this problem, i replaced the copy of codesign_allocate in my /usr/bin folder with the one in /Developer/somewhere and that fixed it.

    0 讨论(0)
  • 2021-01-01 18:45

    i did have this very same issue using xcode_4.2_and_ios_sdk_5_beta__snow_leopard, my working solution.

    Install the previous (non-beta) version of Xcode in a different location and work with that version, and that's it, it worked i was able to upload my app to the AppStore without any inconvenience.

    regards,

    Jorge.

    0 讨论(0)
  • 2021-01-01 18:45

    Never try to submit using apps you built using beta SDKs as your base SDK.

    I got rid of this problem by uninstalling all developer tools with the below command

    sudo /Developer/Library/uninstall-devtools --mode=all

    and then restarted my system and installed that latest non-beta version of XCode and non-beta iOS SDK.

    0 讨论(0)
  • 2021-01-01 18:49

    If you are running an Xcode beta version (Apple calls it a "developer preview") you will get this error because you're not allowed to submit apps from a beta version. This restriction is not mentioned in the Read Me file or on the Xcode download page. To submit an app, you will need to uninstall Developer Tools, then reinstall the latest non-beta version, then restart your computer.

    Here's the command-line command to uninstall:

    sudo /Developer/Library/uninstall-devtools --mode=all
    
    0 讨论(0)
提交回复
热议问题