Archive with Xcode's command line build tool (xcodebuild archive)

前端 未结 3 761
生来不讨喜
生来不讨喜 2021-01-31 10:09

The command line tool to build Xcode projects, xcodebuild, has a new build action available in Xcode 4: archive.

From man xcodebuild:



        
相关标签:
3条回答
  • 2021-01-31 10:36

    Is this working from the GUI ? Project -> Build for Archive Then you can find the archive back in Organizer (archive Tab) It is working for me in the GUI

    0 讨论(0)
  • 2021-01-31 10:43

    For information I'm 99% sure that xcodebuild archive was working in a previous Xcode 4 version, maybe a Beta... And this is really frustrating since -verbose and syslogs doesn't bring much details.

    So I would call that... a Bug!

    If automating your build is what you are looking for, there is a way to generate IPA archive from command line using xcrun PackageApplication

    With xcrun to package and xcodebuild to build, you can almost achieve what xcodebuild archive is supposed to do. I would prefer to use xcodebuild since we can expect this to generate a .xcarchive (.app + .dSYM), more interesting than an IPA.

    Not so off-topic, but if anyone knows how to get more logs from xcodebuild and Xcode, I'm really interested!

    EDIT: After looking in Apple Forums, I confirm this is an Xcode BUG introduced with GM2... I guess Apple Xcode engineers are working on Xcode 4.1 that I think final version will be released with OSX Lion... In june maybe? With a fix? :(

    0 讨论(0)
  • 2021-01-31 10:53

    This seems to work for me:

    xcodebuild -project TestApp.xcodeproj  -scheme TestApp -configuration "Ad Hoc" archive
    
    0 讨论(0)
提交回复
热议问题