Unable to generate .ipa through xcodebuild with universal distribution for enterprise account
Asked Answered
P

0

2

I'm trying to generate Enterprise distribution build from jenkins job. I was able to build and generate the .ipa for Adhoc Distribution(Developer Account), but when i create a new job and set up the configuration for enterprise build(Enterprise Account) archive is successful, but generate .ipa getting failed with below error.

 error: exportArchive: Provisioning profile "Project xxxxx InHouse Prod" is not an 
 "iOS Ad Hoc" profile. Error Domain=IDEProfileQualificationErrorDomain Code=3 
 "Provisioning profile "Project xxxxx InHouse Prod" is not an "iOS Ad Hoc" profile." 
 UserInfo={IDEProfileQualificationError_Profile=<DVTEmbeddedProvisioningProfile 
 0x600000cfab80: name: Project xxxxx InHouse Prod, UUID: 8df09c09-5c58-4356-80d0- 
 6ac76450edea, teamName: xxxxxx INTERNATIONAL xxxxxxx, xxxxxxxx, 
 teamIdentifierPrefixes: ( 5NV8XFN9EY ), entitlements: { "application-identifier" = 
 "5NV8XFN9EY.com.xxxxx.projectxxxx.prod"; "aps-environment" = production; 
 "com.apple.developer.team-identifier" = 5NV8XFN9EY; "get-task-allow" = 0; "keychain- 
 access-groups" = ( "5NV8XFN9EY.*", "com.apple.token" ); }, appIdentifierName: 
 Xxxxx xxxxx xxxxx App Prod, applicationIdentifierPrefixes: ( 5NV8XFN9EY ), 
 dateCreated: 2021-10-05 07:52:05 +0000, dateExpired: 2022-10-05 07:52:05 +0000, 
 certificateKinds: {( "1.2.840.113635.100.6.1.4" )}, certificateSHA1Hashes: {( 
 A4E018F29FD36D0DA3B79DC48DBEB205EFC7F785 )}, supportedUDIDs: {( )}, isUniversal: 1, 
 isXcodeManaged: 0, platforms: {( 
 
 <DVTPlatform:0x6000017ddc80:'com.apple.platform.watchos'

 <DVTFilePath:0x6000017ddc00:'/Applications/Xcode.app/Contents/Developer/Platforms
 /WatchOS.platform'>>, <DVTPlatform:0x6000017dd980:'com.apple.platform.iphoneos': 
 <DVTFilePath:0x6000017dd900:'/Applications/Xcode.app/Contents/Developer
 /Platforms/iPhoneOS.platform'>> )}, filePath: 
 <DVTFilePath:0x6000008fbe80:'/Users/zebrajenkins/Library/MobileDevice/Provisioning 
  Profiles/8df09c09-5c58-4356-80d0-6ac76450edea.mobileprovision'>>, 
  NSLocalizedDescription=Provisioning profile "Project xxxxx InHouse Prod" is not an 
  "iOS Ad Hoc" profile., IDEDistributionIssueSeverity=3} ** EXPORT FAILED ** Failed 
  to build /Users/zebrajenkins/jenkins_dir/workspace/Zebra-iOS-Builds/Zebra-iOS-QA2- 
  Staging/Archive/xxxxxxApp-Staging-2.23.0.2-0.ipa 

  Build step 'Xcode' marked build as failure 
  Skipping due to upstream build failure
  Finished: FAILURE

This is my xcodebuild command in jenkins job

 echo "=>>"$PATH/usr/bin/xcodebuild -exportArchive -archivePath 
 "/Users/zebrajenkins/jenkins_dir/workspace/Zebra-iOS-Builds/Zebra-iOS-QA2- 
 Staging/Archive/xxxxxxApp-Staging.xcarchive" -exportPath 
 "/Users/zebrajenkins/jenkins_dir/workspace/Zebra-iOS-Builds/Zebra-iOS-QA2- 
 Staging/Builds" -exportOptionsPlist 
 "/Users/zebrajenkins/jenkins_dir/workspace/Zebra-iOS-Builds/Zebra-iOS-QA2- 
 Staging/ExportOptions.plist" -allowProvisioningUpdates

When i checked my profile distribution type from apple developer account, it is shown as Universal Distribution type and my exportOption.plist shows method as "enterprise" and signing certificate as "Apple Distribution".

Any thoughts/suggestions on what is going wrong here? Much Appreciate. Thanks

Purpleness answered 5/5, 2022 at 13:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.