Publishing a Flutter App to the Play Store (The Boring Flutter Development Show, Ep. 8.4)

Publishing a Flutter App to the Play Store (The Boring Flutter Development Show, Ep. 8.4)

Show Video

Welcome. Back everyone this. Is again this is your favorite, hosts. Of flutter boring show Emily and I and, we. Are very impressed with our work we like, the app that we have quality, yeah the quality is amazing and we. Hear that there's a. Drought, of Ekron, news apps on the Play Store so, we're good man yes, yes, yes they calling Google like when. So, so. We are going to fill that gap by, publishing, our flora, hacker news app to, the Play Store disrupt. The hacker. News yes yes. Next, next episode is going to be about startups, and and you, know investments, devices anyway so so, we, have our app it's it, has caching, and everything it's a regular flora, right, we've, been actually now. That I think of it we've been only testing it in iOS, I'm only. Hoping that it's also working, for Android because. The. Play Store, so. How. Do you do something like that there's actually, a really good article and, Florio. About. Publishing. And. That's. Maybe. I should just use, Google so flutter, publish. Good, thing our employer is that good at finding things on the Internet. Right. So this one as you can see I've seen, this recently and. This. Is. All, you need so let's go, through this quickly I have, done. This recently as, I, mentioned, before and I, think, all. Of this, should. Be pretty. Pretty. Good so all right so. Review. The app manifest so this is the Android instructions, right. App. Manifest, is located, in Android, app source. Main, so. We're, going to. Android. Would, I say. Yes. AB source. Main, Android manifest. So, this, is the name of the package. Verify. The values application. Edit, the application data reflect the final name of the app. Was. The application, oh so. The label is, probably, something, like. H. And just, I don't know if it's a trademark or something so -, you're so H an app in, flutter. That's. Probably. Not H&M. Or flutter, hm. So. As. The. Great yes. User. Permissions, we. Doing it Internet yes we do and, we. Have it okay. So. That's, done review the build configuration. So, we. Need our application. ID. That's. Unique, as our. App ID in the Android. App. So. That's not this. Build.gradle. And. We. Get to default. Config. Okay. We can use that right we can live with this. Yes. Our own, unique application, ID do you need registered or anything it's, just mmm, I don't think so I think it just needs to be unique we'll see we'll see version. Called version, version name specify, the internal. App version, number and the. Tuda. To consult the version information guidance. Version. Name a version name okay. Min. SDK it, should work on on everything. Including. SDK. 16 so it's great. Launcher. Icon we we, have the. Regular. Flour launcher, icon so we're, not going to add a new. One it's going to look, ugly but that's fine. Signing. The app this, is actually. Pretty. Pretty. Complicated. If you do this for the first time and also, I, don't want to I. Trust. You but I'm not going to show you on. YouTube my. Yes. So, I'm, going, to go, through these things. Very. Quickly, and, we, either cut in the abstract, yes. -. Thank you okay. So. Um, well, Phillip is doing that I I, know, it's actually a couple other little tweaks that I. Think, we should make in, the future or maybe, while, Phillip is doing that I'll do it a little, bit. Right. Now it, looks like I, think, when I did, the animation. I, had. It always appeared, just so that we could see, what was happening and, debug. It but then we never took it out so now it's that little Y Combinator, why is always there and. I was noticing so, it should just be, we. Have this comment if the. Snapshot. For is loading, that stream, of like are we loading or not. In. Fact I'm going to rename this from snapshot, to loading. Because I think that's a little more descriptive and. Then. I'm. Gonna fix the, indentation. And. Great. And because, I don't trust my hot reload right now I'm gonna. Load. It again. And. Next. Episode, you all are in for a treat because we're, going to bring in someone who actually knows how to make apps look pretty, and he's, going to you. Can see how we take a basic, looking material app and make, it better we, still have a problem okay. Philip, feel free to, no. No I'm still, thank you for covering for me okay. Never. Return no. Okay. That's. Right so right now. We're. Saying if it's loading we return this, fading. Transition otherwise we're not doing anything I'm saying you can't do that because, you. Know so, instead, I'm going to return, a. Very. Exciting, container. If. I spell it right. So. Now if I tap, on this there. It is you get the little y combinator. Popping, up and actually now because, we implemented, caching you don't even see it at all so.

We. Could add it in briefly, to make it appear. But. Yeah. That's, a little. Animation, cleanup. There. But. I think I'm, done. With. Sensitive. Stuff so. Okay. So as, as. Discussed, before I, had, to create this key properties, file. With a lot of secrets and then. And. Then, I can go to Android. App build.gradle. So. Android. App. Built, Gradle, this. Is by the way it so it's a little I, always get tripped up because there's to build cradles, and when I say never anyway so and. Then. I it. Tells, me replace. This with, this, which. Is basically using, my file. From earlier with. The secrets. And. Then. I. Also. Replace. This, with. This. So. Bill types where's bill types right. Here. Okay. And then. Bills, builds enabling. ProGuard we don't need to building. Quarry these days really I just want to skate, your code right. We're. Open source already people can see it who cares, so, now. Flutter. Build, apk. That by, default, is in release and. Fingers. Crossed so yeah this is actually. Building. It down to machine, code and so. If, you run this version you won't be able to do hot reload cuz we're. Not running um, yes. Yes but, it's gonna be super fast as a result right, if you want to get closer. To this you can run this and profile, which. Is this but not normal I'm running, now but. Actually. Let me just close this. But. With. Profile, mode it's very close to what you'd get with release, mode but, it doesn't it, isn't signed with the things that you. Need for actual, release and it. Has some instrumentation. For doing profiling. So. That's that's the closest, you get for that otherwise. You know everything, else is the same and as. You can see we're. Assembling release. I'm. Gradle, yeah, building, Gradle. Looks. Good and. Were there any other. So. I. Can open this. And. Now, we have. 6.7. Megabytes, of things. Just to you. Know so. You. See that the, debug release is 30, megabytes so don't get ever scared, about the the the, you, know size. Of your debug, build it's always going to be much bigger than your, actual build and our, six point seven megabytes that includes, I, think. The icons, and, some, other stuff, alright and and I will say the photo team is, actively, working on reducing the size of that even. That released apk, so, it's, six mega six point seven megabytes right now, but. It, is continuing, to go down yes. Okay, so I went, to Play Store I have. You. Know we're not going to go through like you know creating, a user, in the Play Store and anything, like that but we, have our flutter. H. And F. That's, gonna default. In English and, then. Sure. Description, it's, H, an app in Florida and. Yeah. Right. And. Oh. We, need assets, okay, so that's. Come maybe gonna be another intermission. Because we somehow, need to come down. Screenshots. Is the, easier, one, let's. Do screenshots, but. Two. Screenshots are required. That's. Fine okay so you know what we, just wanna which. Is gonna do. Quick. Quick. Android maybe, the screenshot in iPhone would not work for. For, the place to other people appreciate it yeah. So. Let's. Run, it this. Is gonna run it in debug mode to be honest so not. Great but you know, by. The way we're not actually, really seeing it like for public, consumption, we're going to release it for private, beta. We're. Just trying to show you how. So. Okay so phone. Then. The, iock, on. What. Do we get an icon okay so let me give you in an icon, yeah. Okay. You have it I have, like a I. Can. Make it I have a -, I could or do you want the hacker news I know, - chakra is breaking yeah. And then. At. 1024. Times, 5. PNG, this, is obviously, this is just you, know getting the app to there. I'm. Gonna go through the rest of these things, so. It's, an application in. The category, of. Limitation. On size of icon. No. Just well I will, need a 512. To 512. Size. It, needs like an exact size on unfortunately, oh I. Need a questionnaire. On content, rating, it's. Just my things. Privacy. Policy. Okay. Right. I just, want to. Produces. Okay. So, and, maybe, you. Know we can just, postpone, the actual. Images. And stuff like this because I can imagine that a lot of the things, will. Be all this super, cute so. I. Don't, know if we're gonna do that. Like. Fully. But at least I want you to show. You how you would like upload.

It To the Play Store so. As. I said this is not going to yes. This, is not going to be a. Production, app yet. So, we're going to use, the internal test track and the internal test track is great because it. Is only open to people who. You. Will you, know you will give the email, addresses to, that. It, only, needs. To be less than 100 people but. Whenever, you make a change their. App will update, in, something, like five seconds, or maybe, a minute or five minutes so that's really helpful especially, like, if you want to test it on your own device as well and you want to see like how does the production, code production. App look like with everything then use the internal test track so. I'm going to click manage here, and create. A release. And. Produce. Okay. Can, you. And. Now all, I need to do hopefully. It's. Just, put. This here and. So, there were two. Right. Yes so, this, is this. Is the de Becque one this is the release one and then I think this is just, but. This is the same as the debug one it's just, like a symlink or something okay but. Yeah you definitely want to put that really small even, like if you even try the dip back one it will just scream at you that this is a deeper pond so, so, okay, oh. Another, thing that we I, wanted, to show you is if, you. Whenever. You release to the store you need to have a different release, name. And release number right we have version, con one and release, name 1.0, this. Is actually, coming from. Yeah. I thought it's coming from our. From. Our pops back and I don't see it here now so. Yeah. Maybe this. Is a new pop spec and this is this pub spec that were using for IH an app is, coming. From you, know you. Just, specify version. Yeah. Okay. So this, would be 0 0 1. Plus, 1 the plus one is is important. Because. That's, what this. Is going to be right. So you could at, some point you could have like +8, and still. Have a zero zero one so why is it not version. 1.0. We. Could do that in 1.0 yeah you can do whatever but. Yeah. I mean it's pretty release so I like, oh I see I see no it's ok. Ok. So one point. So. So. Now we have to actually rebuild. So let's. Do it again. Because, that's what actually so, far will, we'll update some of the great things. That. Will make it, sign. As that right. This. Time it's not going to be 40, seconds, so. Then yes, so, we're done okay. So. Yeah, actually want to use. This. You. Need to use a different version code for your apk because. You already have one with version one C so, even. Though we didn't publish we, just need to do this goodness. Yeah. So. This is why many people will, go with continuous, delivery is something like fast line and again. Like if you go too far, I owe you will find a good. Article about how to do this automatically. On, both stores, and, continuously. Right, but like again. For, testing and for small apps you. Might, just want to use this do or nothing yes. The. One that yeah. I. Don't. Know if you actually rebuild. After you saved oh I, didn't, ya.

Also. Do, this. Another. File. Yeah. Take. Our apk. Seriously. Wait. So did we already upload, one yeah. We did we just use that. Yeah. I know if. We wanted to show the process yeah. So. No so this is basically you have a release it hasn't been rolled. Out. Yeah. I mean. Yeah. Let's, not dwell on this like you you would have to rebuild. It or create, a new release but. For, now we just have version, 1, review. And then. You. Should provide release notes for every release. Okay. So. Initial. Release. Please. Test. Review. The. Warning, message will. Not be able to any users because you haven't specified any testers for ready yet okay and then. Okay I could I could add, at least me as a tester and so and so forth so from. Now on it's it's really just like pizzette procedural. Things like, adding. Testers, and then. Oh. Yeah. This. Is this okay. Right, so you just add emails, and a, list, so. Yeah so I mean it's, it. Takes its time and for, the first time you will have to you, know get. Screenshots. And you will have to get. Icons. And stuff like this you will need, to go through all this process but, after that it's, really just like copy, pasting. Or. Dragging, and dropping your. Latest. Release, version, and it's. Signed, completely. Automatically, and it's. And, it's just flutter build apk and that's it. Similar. Process, for this flight for for. IPhone and maybe at, some point we could do that as well but not today. So. Yeah, we've, released, almost, released, our app to Play, Store I think it's doing, great and I think that's that's, it for today's. Episode. Of. The flutter boring show thanks for watching thanks for watching.

2018-10-11 20:08

Show Video


Great video, thanks! PS: What is Flutter Friday .. is it a *thing*?

Oh, did we say Flutter Friday at some point? I can't remember. If so, we meant the #FlutterFriday hashtag on Twitter: I'm trying to post a little useful code snippet on Twitter every week.

Great show, now we need for iOS

You guys might be interested in these websites for making feature graphics and app icons: I stumbled upon them recently and they have been a huge help.

No you didn´t but a calendar notification was flashing by :)

Maybe build.gradle for versioncode and versionname... From the previous chapter you could also use the widget property called "key" to avoid rebuilding itself because caching won't work if article properties are modified(I think it will be still using the article in the cache and not the updated version)

Booooooooooooooooring!!! p.s: I think the problem with version number that you have is because you should change it in android manifest

Absolutely, that was my mistake. For new apps, Flutter now takes care of updating your version numbers directly from pubspec.yaml. But the HN app project structure was created before this feature was in effect. Good suggestion with the Key, especially if we used ValueKey.

Manually editing AndroidManifest.xml is the old way of managing version numbers. Now, gradle automatically rebuilds the version number for you using android.defaultConfig.versionCode and .versionName in android/app/build.gradle. My mistake was that I didn't check that, and assumed I'm using the new way, when in fact I wasn't.

ProGuard not only obfuscate, but it also optimize your code. For example, it can convert Enums to Int constants, which speeds up the system and take a lot less memory (Android doesn't deal well with Enums....that's not a huge problem in 2018 though)

I got this error when I try to generate a signed apk in the android studio of my flutter app - Process 'command 'E:\Flutter Apps\flutter\bin\flutter.bat'' finished with non-zero exit value 1

At 12:52 Filip's email is still visible in the video even though in the next scene its blurred out :D

Can you do one for iOS. Thx Failed to read key key from store "/Users/yoda/key.jks": keystore password was incorrect This error keep appearing, i re-run the first command multiple times paying extra attention on the password i was typing yet this erro keep appearing, can anyone help me?

Other news