It won’t come as a surprise to any iOS developer out there that iOS apps need to be signed before they can be installed on physical devices and shipped to end users via App Store. All you need for that is an Apple developer account, a valid signing certificate, a matching provisioning profile… and a Mac to generate these files.

Sounds like a lot of trouble? Judging by the number of questions related to iOS code signing on Stackoverflow, many developers struggle with it. We understand that setting up code signing can be a headache, especially when you’re trying to get it work in a CI/CD environment, and even more so when you’re developing for multiple platforms, as you can do with the Flutter SDK, and don’t own a Mac.

But wait, we have good news to all the Flutter developers! Codemagic has made the entire code signing business easier than ever before by eliminating some of the steps required in conventional iOS code signing process.

In the end, Codemagic’s automatic code signing feature is not just for people without a Mac: it simply takes the pain out of the entire process by automating yet another aspect of app development.

Introducing an alternative to conventional iOS code signing

What if we told you that you don’t need a Mac anymore to be able to sign your Flutter app for iOS? And what if you didn’t need to worry about the signing files and could have Codemagic take care of all that for you at no cost?

That’s exactly what we’re saying: Codemagic offers automatic code signing of Flutter apps for iOS by generating the signing certificate and the provisioning profile in-app, allowing you to sign and ship the app to App Store as part of the build process.

Read on for an overview of code signing basics and Codemagic’s automatic code signing feature.

Understanding the basics of iOS code signing

Before we’re going to describe how Codemagic does its magic with signing your Flutter app for iOS, let’s go over what is normally needed for iOS code signing.

  • Apple developer account. Enrollment in the Apple Developer Program is required to use TestFlight for beta testing or releasing the app to end users on App Store. It’s also needed to be able to request certificates and download provisioning profiles. However, if you’re only looking for a way to get a build that can be installed on a real device, you can follow this tutorial on how to deploy your app on an iPhone without signing up for Apple Developer Program (but you do need a Mac for that).
  • Signing certificate. The certificate is a public/private key pair that enables to identify who developed the code. There is a personal development certificate for code signing the app during the development process and a (shared) App Store or Ad Hoc distribution certificate that’s used when you’re code signing the app for distribution.
  • Provisioning profile. A provisioning profile contains information about the app ID, the devices on which the app can be installed and the certificates that can be used for signing the app. Just like with certificates, there is a development provisioning profile for code signing the app during the development process and distributionprovisioning profiles (Ad Hoc or App Store) for distribution. More specifically, the Ad Hoc distribution profile can be used for distributing the app to non-Testflight testers (e.g. via Testmagic), while you need to use the App Store distribution profile for testing on TestFlight or releasing to App Store. Unlike other provisioning profiles, App Store distribution profile is not linked to particular devices.
  • A Mac. You need a Mac to first request a certificate from Apple and later to generate the certificate file that can be uploaded to third-party systems. A Mac is not really required when you’re developing Flutter apps, so this part of the code signing process might turn out to be a problem when you don’t have a Mac that you could use.

To sum up, you will need to use a development certificate along with a development provisioning profile to sign the code and install your app on real devices while developing.

When you’re planning to publish the app to testers or release it to App Store, you will need to use your distribution certificate along with the appropriate distribution provisioning profile. And to be able to do all that, you have to be a member of the Apple Developer Program and own a Mac to get the necessary files for signing.

#ios #flutter

How to sign Flutter apps for iOS automatically without a Mac
21.90 GEEK