Xcode “Build and Archive” from command line

前端 未结 20 1344
死守一世寂寞
死守一世寂寞 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 13:56

    Open Terminal & drag and drop your project folder:

    cd /Users/username/Desktop/demo/

    Execute the following commands one by one:

    Builds app as-"demo.xcodeproj" into an archive

    xcodebuild archive -project demo.xcodeproj -scheme demo -archivePath /Users/username/Desktop/demo.xcarchive

    If your app has Podfile fie as-"demo.xcworkspace"-

    xcodebuild -workspace Project-Name.xcworkspace -scheme Scheme-Name -sdk iphoneos -configuration Release Provisioning_Profile=“Provision-Name” Development_Team=“Team-ID” archive -archivePath /Path/To/Output/AppName.xcarchive archive

    IPA Export Build Command

    Download ExportOptions.plist file from Here

    xcodebuild -exportArchive -archivePath /Users/shilpa/Desktop/demo.xcarchive -exportPath /Users/shilpa/Desktop/demo.ipa -exportOptionsPlist /Users/shilpa/Downloads/ExportOptions.plist

    You will find .xcarchive to .ipa using terminal details in the article.

提交回复
热议问题