kiri
kiri

Reputation: 2007

Getting Issue in Jenkins Continues Integration to HockeyApp in Xcode 8.3.2

All,

We are using Jenkins Continuous integration for App Uploads Below is the Script in Execute Shell in the Job.

rm -fr ~/Library/Caches/CocoaPods/ rm -fr Pods/ rm -rf ~/Library/Developer/Xcode/DerivedData/* pod install xcodebuild -configuration Release -scheme MyApp_Test -workspace MyApp.xcworkspace SYMROOT="${WORKSPACE}/MyApp/Build/" /usr/bin/xcrun -sdk iphoneos PackageApplication -v "${WORKSPACE}/MyApp/Build/Release-iphoneos/MyApp_Test.app" -o "${WORKSPACE}/MyApp/Build/Release-iphoneos/MyApp.ipa"

Earlier it is working perfectly and able to the integration, Recently we updated he Xcode to 8.3.2, From then we are getting errors below are the Errors we are getting

xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH Build step 'Execute shell' marked build as failure Build step 'Upload to HockeyApp' marked build as failure

Can any one help in solving the issue seems PackageApplication is deprecated and exportArchive is added, how can we change to that syntax

Upvotes: 0

Views: 195

Answers (1)

blahartinger
blahartinger

Reputation: 292

Before: xcrun with PackageApplication
# Build the application
xcodebuild \
-scheme "${SCHEME_NAME}" \
-sdk "${TARGET_SDK}" \
-configuration Release build

# Package the application
/usr/bin/xcrun \
-sdk "${TARGET_SDK}" \
PackageApplication \
-v "${PROJECT_BUILDDIR}/${SCHEME_NAME}.app" \
-o "${BUILD_OUTPUT_DIR}/${APP_NAME}.ipa" \
--sign "${DEVELOPER_NAME}" \
--embed "${PROVISIONING_PROFILE}"
After: xcodebuild with -exportArchive
# Archive the application
xcodebuild \
-scheme "${SCHEME_NAME}" \
-sdk "${TARGET_SDK}" \
-archivePath "${PROJECT_BUILDDIR}/${SCHEME_NAME}.xcarchive" \
-configuration Release \
PROVISIONING_PROFILE="${PROVISIONING_PROFILE}" \
archive 

# Export the archive to an ipa
xcodebuild \
-exportArchive \
-archivePath "${PROJECT_BUILDDIR}/${SCHEME_NAME}.xcarchive" \
-exportOptionsPlist "${EXPORT_PLIST}" \
-exportPath "${BUILD_OUTPUT_DIR}"

Upvotes: 1

Related Questions