In today’s fast-paced mobile app landscape, delivering high-quality software quickly is non-negotiable. For Flutter developers, Continuous Integration and Continuous Deployment (CI/CD) is a game-changer that automates builds, tests, and deployments to ensure seamless releases.
At Proshore, a leading offshore software development firm in Nepal, we’ve seen firsthand how CI/CD transforms workflows—thanks to experts like Rajendra Shrestha, a senior Flutter developer on our team.
Rajendra recently shared his technical insights in a detailed article on Medium, breaking down how to deploy Flutter iOS apps to TestFlight using Azure Pipelines.
In this guide, we’ll expand on Rajendra’s expertise, blending his hands-on experience with Proshore’s proven strategies to help you master CI/CD—whether you’re a developer refining your craft or a business seeking scalable solutions.
Flutter’s cross-platform prowess is undeniable, but as Rajendra emphasizes, “even the most elegant codebase can falter without a reliable release process.” Here’s why CI/CD matters:
For businesses, CI/CD isn’t just a technical nicety—it’s a strategic advantage. Offshore teams like Proshore use these pipelines to deliver predictable, high-quality results across time zones. As Rajendra puts it, “Automation isn’t just about speed—it’s about trust. Clients know their releases will happen like clockwork.”
Microsoft’s Azure Pipelines offers a flexible, cloud-native solution for CI/CD. Rajendra, who has configured dozens of pipelines for Proshore clients, highlights the key benefits:
Cross-Platform Support
Build iOS, Android, and web apps from a single pipeline.
Scalability
Handle projects of any size with parallel jobs.
Cost-Effectiveness
Free tiers for small projects and pay-as-you-go pricing.
“Azure’s flexibility lets us tailor pipelines to each project’s unique needs,” Rajendra notes. At Proshore, we’ve leveraged Azure Pipelines to streamline deployments for startups and enterprises alike.
Let’s break down how Azure pipelines work for Flutter iOS apps with insights from Rajendra’s playbook.
Ensure you have an active account and App Store Connect access.
Generate an Apple Distribution Certificate and Provisioning Profile. Let’s break down how it works for Flutter iOS apps.
Host your Flutter project on Azure Repos, GitHub, or Bitbucket.
Here’s a simplified snippet:
trigger:
- main
variables:
- iosVmImage: 'macos-latest'
- flutterVersion: '3.24.0'
- archivepath: 'build/ios/archive/Runner.xcarchive'
- runnerAppPath: 'build/ios/archive/Runner.xcarchive/Products/Applications/Runner.app'
- builtAppPath: 'build/ios/ipa'
- exportPlistPath: 'exportOptions.plist'
- PROVISIONING_PROFILE_UUID: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
- SIGNING_IDENTITY: 'Apple Distribution: account_name (team_id)'
- appIdentifier: 'com.xxxxxx.xxxxx'
- teamId: 'xxxxxxxxx'
- artifactName: 'release_artifact_name'
- appStoreServiceConnectionName: 'apple_service_connection_name'
- appSpecificAppleId: 'xxxxxxxxxx'
- buildFlavor: 'Production' #Optional
- entryPoint: 'lib/main_prod.dart' #Optional
steps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'your-certificate.p12'
certPwd: $(certificate_password)
- task: InstallAppleProvisioningProfile@1
displayName: Install provisioning file
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'your-provision.mobileprovision'
- task: FlutterInstall@0
inputs:
mode: 'auto'
channel: 'stable'
version: 'custom'
customVersion: $(flutterVersion)
- task: FlutterCommand@0
displayName: 'Run Flutter diagnostics'
inputs:
projectDirectory: '.'
arguments: 'doctor -v'
- task: FlutterBuild@0
inputs:
target: 'ipa'
buildFlavour: $(buildFlavor)
entryPoint: $(entryPoint)
extraArgs: '--no-codesign'
- script: |
security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/$(PROVISIONING_PROFILE_UUID).mobileprovision > decoded.plist
plutil -extract Entitlements xml1 -o Runner.entitlements decoded.plist
chmod +x generate_export_plist.sh
./generate_export_plist.sh $(PROVISIONING_PROFILE_UUID)
codesign --entitlements Runner.entitlements -f -s "$(SIGNING_IDENTITY)" $(runnerAppPath)
xcodebuild -exportArchive -archivePath $(archivepath) -exportPath $(builtAppPath) -exportOptionsPlist $(exportPlistPath)
displayName: "Sign ipa"
- task: CopyFiles@2
displayName: 'Copy app to staging directory'
inputs:
sourceFolder: '$(Agent.BuildDirectory)'
contents: '**/ipa/*.ipa'
targetFolder: '$(Build.StagingDirectory)'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: 'Publish IPA file'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: $(artifactName)
publishLocation: 'Container'
- task: AppStoreRelease@1
inputs:
serviceEndpoint: 'Deheus App Store Connect Key'
releaseTrack: 'TestFlight'
appIdentifier: $(appIdentifier)
appType: 'iOS'
ipaPath: '$(Build.ArtifactStagingDirectory)/**/*.ipa'
appSpecificId: $(appSpecificAppleId)
Azure’s secure file storage and variable groups keep sensitive data (like certificates) encrypted. Rajendra’s advice: “Automate certificate installation with the <InstallAppleCertificate> task—it’s saved us hours of debugging.”
The AppStoreRelease task uploads the .ipa file to App Store Connect. “Monitor builds in Azure’s dashboard,” Rajendra suggests. “Clients love it when they can track progress on a dashboard without touching Xcode.”
Rajendra Shrestha, Senior Flutter Developer
With over 5 years of experience in cross-platform development, Rajendra specializes in CI/CD pipelines and DevOps automation. When he’s not streamlining deployments, he mentors junior developers and writes technical guides for the Flutter community.
Want more detailed steps on deploying iOS apps?
Even with automation, pitfalls can arise. Here’s how Rajendra and his team tackle them:
As an offshore partner, we help clients navigate these hurdles through offshore development teams with experts like Rajendra who know the ins and outs of mobile app development and deployment.
Choosing a Nepalese offshore team like Proshore offers unique advantages:
Implementing CI/CD for Flutter with Azure Pipelines isn’t just about automation—it’s about building a foundation for scalable, stress-free app development. Whether you’re a solo developer looking to optimize your workflow or a business seeking a reliable offshore partner, Proshore is here to help.
We can help you get started in 15 minutes.