Hey everyone, Has anyone here integrated a <https...
# multiplatform
w
Hey everyone, Has anyone here integrated a Microsoft Azure CI/CD pipeline with a KMP project? We’re running into an issue where, during the build, the pipeline is profiling not only the iosApp target but also the SPM packages. We’re using manual profiling instead of automatic, and this is causing problems. If anyone has faced this and found a solution, your help would be greatly appreciated! 🙏
h
This Azure CI build is frustrating. I am working on it, too, in the past 3-4 days without a success. The build works fine locally, but it takes a lot of time on Azure CI and the CI fails my build when it takes more than 60 min. The root cause for me is the Xcode "Run Script" when it reaches to gradle task
embedAndSignAppleFrameworkForXcode
, this alone take around 30 minutes 🤦 I am trying to figure what should I with this, but yeah, it is super frustrating! I also use SPM in my project.
😥 1
w
yeah... @Hesam but in our case timing is not the issue the build is being failed due to following error
/Users/runner/Library/Developer/Xcode/DerivedData/iosApp-cizixmtkcntpmffbslhqmtffyjso/SourcePackages/checkouts/firebase-ios-sdk/Package.swift: error: Firebase_FirebaseCoreInternal does not support provisioning profiles. Firebase_FirebaseCoreInternal does not support provisioning profiles, but provisioning profile Adhoc_dist_jan29_dist has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Firebase_FirebaseCoreInternal' from project 'Firebase')....
When the profiling of the IOS is done it also start profiling the installed SPM packages 😕 which should not be the case
h
I remember I had seen that issue when I started to implement Azure pipeline. From what I recall, my issue was having Xcode's Automatically manage signing checked. It is unchecked for yours, right? To verify this, you would need to: 1. Open the iosApp.xcodeproj in Xcode. 2. Go to the iosApp target. 3. Go to the "Signing & Capabilities" tab. 4. Ensure that "Automatically manage signing" is unchecked for all your build configurations (Debug and Release). 5. Manually select your development/adhoc provisioning profile. Once you've made and committed that change to the project file, the Firebase signing error should be resolved permanently. For the Release build you can use
exportOptions.plist
to define your profiles. This is mine, in case it helps.
1
Copy code
- task: Xcode@5
      displayName: 'Xcode Build & Export IPA (Release)'
      inputs:
        actions: 'archive'
        configuration: "prod_Release"
        sdk: 'iphoneos'
        xcodeProjectPath: 'iosApp/iosApp.xcodeproj'
        scheme: "AutoHawk_prod"
        xcodeVersion: 'specifyPath'
        xcodeDeveloperDir: '/Applications/Xcode_16.2.app/Contents/Developer'
        packageApp: true
        exportOptions: 'plist'
        exportOptionsPlist: 'iosApp/iosApp/exportOptions.plist'
        useXcpretty: true
        archivePath: "$(Build.ArtifactStagingDirectory)/iosApp.xcarchive"
        exportPath: "$(Build.ArtifactStagingDirectory)/ipa_output"
        args: "BUILD_NUMBER=$(BUILD.BUILDNUMBER) MARKETING_VERSION=$(BUILD_DATE) DISABLE_AUTOMATIC_PACKAGE_RESOLUTION=YES"
w
Thank you so much @Hesam
Will try that for sure
h
No problem, I had though time to get things working.
Now I am stuck on running my UI tests on Firebase Testlab 😅
K 1
Good luck! 👍