Write the know-how of compiling Xcode projects and exporting IPA packages using Jenkins's Pipeline function.
ステップ ガイド
Import developer profile.
importDeveloperProfile(importIntoExistingKeychain: false, profileId: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX')
Build the project and output the archive.
xcodeBuild( xcodeSchema: "${PROJECT_SCHEMA}", ipaOutputDirectory: 'Release', ipaExportMethod: 'app-store', generateArchive: true, buildIpa: true, ipaName: "${BUILD_TARGET}", bundleID: 'com.example.TargetApp', developmentTeamName: "${DEVELOPMENT_TEAM_NAME}", cleanBeforeBuild: true, configuration: 'Release', cfBundleShortVersionStringValue: '1.0.0', cfBundleVersionValue: '1' )
Export the IPA file from the archive.
exportIpa( archiveDir: "${WORKSPACE}/${repositoryName}/build/Release-iphoneos", xcodeSchema: "${PROJECT_SCHEMA}", developmentTeamName: "${DEVELOPMENT_TEAM}", configuration: "AdHoc", infoPlistPath: "${INFO_PLIST}", manualSigning: true, provisioningProfiles: [ [provisioningProfileAppId: "${BUNDLE_ID}", provisioningProfileUUID: 'TestApp_AdHoc_Profile.mobileprovision'] [provisioningProfileAppId: "${BUNDLE_ID}.watchkitapp", provisioningProfileUUID: 'TestApp_AdHoc_Profile.mobileprovision'], [provisioningProfileAppId: "${BUNDLE_ID}.watchkitapp.watchkitextension", provisioningProfileUUID: 'TestApp_AdHoc_Profile.mobileprovision'] ], ipaExportMethod: "ad-hoc", ipaName: "${BUILD_TARGET}", ipaOutputDirectory: "AdHoc" )
Upload the exported IPA file.
When using "XCode's" Automatically manage signing ", various ways are required, so please note the points to be noted separately.
関連記事