Xcode “Build and Archive” from command line

前端 未结 20 1048
死守一世寂寞
死守一世寂寞 2020-11-22 13:52

Xcode 3.2 provides an awesome new feature under the Build menu, \"Build and Archive\" which generates an .ipa file suitable for Ad Hoc distribution. You can also open the O

相关标签:
20条回答
  • 2020-11-22 14:19

    With Xcode 4.2 you can use the -scheme flag to do this:

    xcodebuild -scheme <SchemeName> archive
    

    After this command the Archive will show up in the Xcode Organizer.

    0 讨论(0)
  • 2020-11-22 14:22

    You mean the validate/share/submit options? I think those are specific to Xcode, and not suited for a command-line build tool.

    With some cleverness, I bet you could make a script to do it for you. It looks like they're just stored in ~/Library/MobileDevice/Archived Applications/ with a UUDI and a plist. I can't imagine it would be that hard to reverse engineer the validator either.

    The process I'm interested automating is sending builds to beta testers. (Since App Store submission happens infrequently, I don't mind doing it manually, especially since I often need to add new description text.) By doing a pseudo Build+Archive using Xcode's CLI, I can trigger automatic builds from every code commit, create IPA files with embedded provisioning profiles, and email it to testers.

    0 讨论(0)
提交回复
热议问题