Unfortunately there is not a straight forward way for the iOS application with App extension in Azure. But to make it work you'll have to do a couple of changes in the project that I'll share later.
As per my recent experience to create the pipeline for such sort of application, the given xcode task from Azure is not capable to handle this case.
And I have later confirmed this from the PG team by reaching out to Azure DevOps support.
"The current version
Xcode@5
has the limitation to build the application with App extension."
- Modify project file
project.pbxproj
- Use
xcodebuild
command in terminal to compile commands for the pipeline
We have modified the project configuration in project.pbxproj
file as proposed in the following link.
https://stackoverflow.com/a/29605731/3611427
This way we have a variable for each provisioning profile and later in the terminal we can assign values to it. I have gathered few commands to build and archive and used the same in
Declare the following variables.
signingIdentity='iPhone Distribution: XXXX YYYY'
sdkOption='iphoneos'
configurationOption='Release'
workspaceName='MyApplication.xcworkspace'
schemeName='MyApplication'
APP_PROFILE_ID='00110011-0011-101-0011-000011110000'
APP_EXT_PROFILE_ID='00110011-0011-101-0011-000011110000'
/usr/bin/xcodebuild -sdk $sdkOption -configuration $configurationOption -workspace $workspaceName -scheme "$schemeName" build -allowProvisioningUpdates CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="$signingIdentity" APP_PROFILE="$APP_PROFILE_ID" EXTENSION_PROFILE="$APP_EXT_PROFILE_ID"
/usr/bin/xcodebuild -sdk $sdkOption -configuration $configurationOption -workspace $workspaceName -scheme "$schemeName" archive -allowProvisioningUpdates CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="$signingIdentity" APP_PROFILE="$APP_PROFILE_ID" EXTENSION_PROFILE="$APP_EXT_PROFILE_ID"
/usr/bin/xcodebuild -exportArchive -archivePath ~/Desktop/TestBuild.xcarchive -exportOptionsPlist $Build.SourcesDirectory/MyApplication-Info.plist -exportPath ~/Desktop/MyApplication.ipa
it's work. thx