Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcrun command to export ipa file xcode8 for iphoneos10.0

xcrun xcodebuild -log -sdk iphoneos PackageApplication "$OUTPUTDIR/$APPNAME.app" -o "$OUTPUTDIR/$APPNAME.ipa" -sign "$DEVELOPER_NAME" -embed "$PROVISIONING_PROFILE"

This is the command now i am using in xcode7.3.1. i updated xcode to 8.0 version. while running this command in terminal I am getting error as "warning: PackageApplication is deprecated, use xcodebuild -exportArchive instead."

is there any alternative command???

like image 574
SUNiL iOS Avatar asked Sep 24 '16 08:09

SUNiL iOS


People also ask

What is Xcrun command?

xcrun is a tool that helps managing Xcode versions on your system. It allows you to write scripts that don't need to know where your Xcode instance or developer tools are installed. The path to the Xcode version (or developer tools) is set/read via xcode-select . You can reset it via: sudo xcode-select --reset.

How do I export an Xcode archive?

The Step archives your Xcode project by running the xcodebuild archive command and then exports the archive into an . ipa file with the xcodebuild -exportArchive command. This . ipa file can be shared, installed on test devices, or uploaded to the App Store Connect.


1 Answers

In Xcode8, xcrun PackageApplication is deprecated, so I was successful with the use of this way.

#archive
xcodebuild -sdk iphoneos10.0 -project Unity-iPhone.xcodeproj \
-scheme Unity-iPhone \
-configuration Release build \
-archivePath $ARCHIVE_DIRECTORY'/'$APP_NAME'.xcarchive' \
archive

#export ipa
xcodebuild -exportArchive \
-archivePath $ARCHIVE_DIRECTORY'/'$APP_NAME'.xcarchive' \
-exportPath $OUT_PATH'/' \
-exportOptionsPlist exportOptions.plist

And the contents of exportOptions.plist is (for adhoc),

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>method</key>
    <string>ad-hoc</string>
    <key>teamID</key>
    <string>YOUR_TEAM_ID</string>
    <key>uploadBitcode</key>
    <true/>
    <key>uploadSymbols</key>
    <true/>
  </dict>
</plist>
like image 71
robita Avatar answered Oct 18 '22 15:10

robita