6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit e58d2fd4
Changed files
azure/templates/build-ios.yml | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-)
Diff
diff --git a/azure/templates/build-ios.yml b/azure/templates/build-ios.yml
index 93d2e592..d15bcf46 100644
--- a/azure/templates/build-ios.yml
+++ b/azure/templates/build-ios.yml
@@ -4,14 +4,15 @@ variables:
value: releasetest
pool:
- vmImage: 'macOS-14'
+ vmImage: 'macOS-14'
+
steps:
# Download secure file from Azure library
- task: DownloadSecureFile@1
inputs:
secureFile: '.env'
- # Copy the .env file
+ # Copy the .env file to the project directory
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.TempDirectory)'
@@ -19,6 +20,7 @@ steps:
targetFolder: '$(Build.SourcesDirectory)/comwell_key_app'
cleanTargetFolder: false
+ # Install Apple certificate for code signing
- task: InstallAppleCertificate@2
displayName: Install certificate
inputs:
@@ -26,12 +28,14 @@ steps:
certPwd: '$(cppwd)' # Assuming cppwd is a parameter or pipeline variable
keychain: 'temp'
+ # Install Apple provisioning profile
- task: InstallAppleProvisioningProfile@1
displayName: Install provisioning file
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'CP_Test.mobileprovision'
+ # Install Flutter SDK
- task: FlutterInstall@0
displayName: "Install Flutter SDK"
inputs:
@@ -39,23 +43,26 @@ steps:
channel: 'stable'
version: 'latest'
+ # Run Flutter diagnostics
- task: FlutterCommand@0
displayName: "Run Flutter diagnostics"
inputs:
projectDirectory: '.'
arguments: 'doctor -v'
+ # Run custom Pigeon script
- task: ShellScript@2
displayName: "Run Pigeon script"
inputs:
scriptPath: "$(Build.SourcesDirectory)/mobilekeys_sdk_plugin/pigeon.sh"
+
+ # Analyze Flutter code
- task: FlutterAnalyzeTask@0
inputs:
projectDirectory: '$(Build.SourcesDirectory)/comwell_key_app'
pubGet: true
extraArgs: --no-fatal-infos --no-fatal-warnings
-
# Install CocoaPods dependencies
- task: Bash@3
displayName: "Install CocoaPods dependencies"
@@ -65,7 +72,8 @@ steps:
flutter pub get
cd $(Build.SourcesDirectory)/comwell_key_app/ios
pod install
- # Copy SeosMobileKeysSDK to the Xcode project directory
+
+ # Copy SeosMobileKeysSDK to the Xcode project directory
- task: CopyFiles@2
displayName: "Copy SeosMobileKeysSDK framework to Xcode project"
inputs:
@@ -73,16 +81,31 @@ steps:
contents: 'SeosMobileKeysSDK.xcframework/**'
targetFolder: '$(Build.SourcesDirectory)/comwell_key_app/ios/Frameworks/'
flattenFolders: false
+
+ # Ensure the custom XCFramework is added to the Xcode project
+ - task: Xcode@5
+ displayName: "Integrate XCFramework into Xcode project"
+ inputs:
+ actions: "build"
+ scheme: "$(flavor)" # Make sure to use the correct scheme that includes the custom XCFramework
+ sdk: "iphoneos"
+ configuration: "Release"
+ xcWorkspacePath: "$(Build.SourcesDirectory)/comwell_key_app/ios/Runner.xcworkspace"
+ xcodeVersion: "default"
+ packageApp: false
+ args: |
+ -target Runner
+ -project $(Build.SourcesDirectory)/comwell_key_app/ios/Runner.xcodeproj
+ -destination generic/platform=iOS
+
# Build the iOS application
- # Generate the iOS project files using Flutter with the specified flavor
-
- task: FlutterCommand@0
displayName: "Build Flutter iOS project"
inputs:
projectDirectory: '$(Build.SourcesDirectory)/comwell_key_app'
arguments: 'build ios --no-codesign --flavor=$(flavor) --build-name=1.0.0 --build-number=1'
- # Use Xcode to build and sign the iOS application using the xcworkspace
+ # Code Sign ipa for Distribution
- task: Xcode@5
displayName: "Code Sign ipa for Distribution"
inputs:
@@ -104,6 +127,7 @@ steps:
# generateCodeCoverageReport: true
# projectDirectory: '$(Build.SourcesDirectory)'
+ # Copy app to staging directory
- task: CopyFiles@2
displayName: "Copy app to staging directory"
inputs:
@@ -112,9 +136,10 @@ steps:
targetFolder: '$(Build.StagingDirectory)'
flattenFolders: true
+ # Publish IPA file
- task: PublishBuildArtifacts@1
displayName: "Publish IPA file"
inputs:
PathtoPublish: '$(Build.StagingDirectory)'
ArtifactName: 'IPA'
- publishLocation: 'Container'
+ publishLocation: 'Container'
\ No newline at end of file