Release an iOS app with Flutter in 7 steps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
LEIGHA JARETT: Hi there, Flutter developer. If you're watching this video, I'm going to assume you've already created a Flutter app that looks and feels great on iOS, and now you're ready to deploy it to the App Store, like the Wondrous app that I have here. Before we jump in, there's a few prerequisites that you'll need to have. First, to build and release an iOS app, make sure that you have Xcode installed on your Mac computer. Second, to publish your app to the App Store, make sure that your app adheres to the App Store review guidelines. And finally, you'll need to be enrolled in the Apple Developer Program. No worries if you're not. You can find a link to sign up below. Now that we've got those prereqs out of the way, let's get started. [MUSIC PLAYING] Start by registering your app's bundle ID. You can register a bundle ID with your Apple development team by going to Apple's Identifiers page under Certificates, IDs, and Profiles, and then filling out the details of your app. If you haven't heard of a bundle ID before, it's a unique identifier for your app. Apple encourages reverse domain-name notation to avoid conflicts with other apps. Let's say you work at a company where you use the domain mycompany.com. In that case, all of your app bundle IDs might start with com.mycompany. If you created an app called myapp, the entire bundle ID could look something like this, com.mycompany.myapp. Once that's done, create a record for your app in App Store Connect, which you'll use to submit and manage your app. Head over to the Apps page under App Store Connect and click the Plus button to create a new record. Next, fill in the details like the name and the target platform. Then select the bundle ID that you registered. Now that you're all set with your record, head over to Xcode to double check some project settings. Oh, and by the way, if you're looking for more information on how Flutter works with Xcode, then check out our video Flutter for iOS Developers. Open up the relevant iOS files in Xcode by right clicking on the iOS folder in your Flutter app project, or run this command on the terminal from your project's root directory. To view your app settings, open up the runner target. Take a look at the General tab. Add a category and a display name for your app, and check the bundle identifier. If you don't explicitly set your org, Flutter fills it in with a placeholder reverse domain, com.example, plus the name of your app. Quick tip-- you can save time and skip this step by passing your reverse domain org as a parameter when you create a Flutter project, or just modify the settings in VS Code so all your new Flutter apps will use that org domain. Either way, you'll need to make sure that this bundle identifier matches the one you registered earlier. In addition to confirming the identity of your app, make sure that the deployment information is correct. Now specify the minimum version of iOS that your app users must have. If your app or plugins make use of newer APIs, you'll need to make sure that this meets the minimum requirement. Next up, head to the Signing and Capabilities tab. Before we talk through the settings, it's helpful to understand just what code signing is. Code signing assures users that your app is from a known and approved source and hasn't been tampered with. Before your app can be run on a device or submitted to the App Store, its binary must be signed with a certificate that's issued by Apple. The certificate basically says that you are who you say you are, and when you're ready to distribute your app, a provisioning profile is used to tie your certificates to your app ID and authorizes your app to use particular services. Thankfully, Xcode has a setting to automatically manage app signing for you, and Flutter projects have it enabled by default. [DING] To use it, specify the development team that should publish the app. Now on to adding your app icon. You may have noticed that Flutter creates a placeholder icon, the infamous Flutter F. In Xcode, click on Assets in the runner project. Here you see the different sized icons based on their usage. Historically, developers would use an app-icon generator to create all the different file sizes based on a single input. But if you're using Xcode 14 or later, you can just change the setting to use a single 1,024 by 1,024 image and upload one icon. OK, so we have our settings finished up in Xcode. Let's head back to our Flutter repository. Before you build an archive for a new version of your app, you'll want to increment its version number. In iOS, this is tracked under the CFBundleVersion Core Foundation key. This key is a machine-readable string composed of one to three period-separated integers, such as 2.0.13. The first number represents a pretty major overhaul of the app, like changing the design system. The second number likely represents minor changes, like a few new features. And the last number represents a patch, so pretty minor changes like little bug fixes. In Flutter apps, we change the version by modifying the pubspec.yaml file. You can also optionally include a build number to track different builds during development. Finally, you're ready to create a build archive and upload it to App Store Connect. To build an app means to compile the source code and app assets into something that can be run or distributed. When you're debugging and testing your app, you're usually running your app. Whether you're working in an IDE and pressing the Run button or using the flutter run command, both processes create a dot app bundle in debug mode and launches it on the connected simulator or device. Debug mode means that the compilation is optimized for fast development cycles. So you can quickly make changes, and by the magic of Flutter's hot reload, you can see those changes reflected almost immediately on the device. When it's time to distribute your app, you'll want to build in release mode. Release mode compilation is optimized for fast startup, fast execution, and small package sizes. To build your app in release mode, run flutter build release. This creates a dot app bundle which is good for local development and testing, but to distribute the app, you'll need a dot ipa. In Xcode, an app bundle is used to create an archive, which is then used to create an IPA. In Flutter, we do the same thing, only we've tried to simplify this process by creating a single command, flutter build ipa. When building an IPA, you have the option to prepare your app to be distributed inside or outside of the App Store. By default, we prepare the IPA for the App Store, but you can use the export-method flag to change this. For example, you may want to use the enterprise export method, which allows you to distribute your app to users in your organization. You can also consider adding the obfuscate and split-debug-info flags to obfuscate your Dart code so that it's more difficult to reverse engineer. Once you've run the build ipa command, you can find the Xcode build archive in your project's build/ios/archive directory and the dot IPA file in the build/ios/ipa. Now we're in the home stretch. It's time to add your IPA file to App Store Connect. There are a few different ways to do this, but the easiest is to use the Apple Transport macOS app. Drag and drop the IPA into the Transport app and wait for it to process. Once it's all ready, deliver it to App Store Connect. Over in App Store Connect, you can choose whether or not you want to deploy your app to the App Store or to TestFlight. TestFlight lets you push your apps to internal and external testers before making it available to a larger audience. Just create your groups of testers to get started. Keep in mind if you choose to invite external testers, your app is submitted to beta app review, which means that you may need to wait a few days before your app becomes available to testers. Testers can install the TestFlight app on their device and use it to install your app and share feedback. When you're ready to release your app to the world, complete all the required fields and click Add for Review. Apple will notify you when the review process is complete and your app is live in the App Store. And that's how you deploy your Flutter app in the App Store in seven steps. For more details on all the steps that we went through today and ways that you can automate the process, check out the step-by-step guide included in the video description. I'm Leigha. Thanks for watching, and I can't wait to see your Flutter app in the App Store. [MUSIC PLAYING]
Info
Channel: Flutter
Views: 90,763
Rating: undefined out of 5
Keywords: Release an ios app with flutter, release an ios app, ios app, Flutter for ios developers, flutter for ios, ios developers, flutter for ios tutorial, how to use flutter on ios, introduction to flutter on ios, intro to flutter on ios, how flutter works on ios, how flutter works, ios, flutter developer, flutter developers, flutter latest, flutter tutorial, flutter updates, developer, developers, code, coding, flutter, google, Leigha Jarett
Id: iE2bpP56QKc
Channel Id: undefined
Length: 9min 52sec (592 seconds)
Published: Mon Sep 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.