Fabric Beta tool is very helpfull for app development. But now I would like to manage users from external app.
This means to be able at least Add Tester and Remove Testers. Did some work with such Fabric API?
I know about distribution plugins, but we would like to split tester administration from new release distribution.
Fabric/Firebaser here -
Fabric doesn't have a public API for doing this on the fly in an external way or in your own app. The most versatile ways to add testers would be our plugin with fastlane or distributing via Gradle commands, but you've already noted that you know about the distribution plugins.
Related
so currently we are exporting APK to the play store and we are using Firebase app distribution for our testing track but now we want to start using App bundles instead of APK but the issue here that Firebase app distribution does not support App bundles, I thought of deploying an APK for the testing track and then publish an App bundle for play store release, but I think there is a risk here since the app bundle is not tested and may contain undiscoverable issue, our options are to migrate the testing track to the internal app sharing in the play console, is there a way to make Firebase app distribution support App Bundles or any other options?
Update May 2021: This is now available with Firebase App Distribution! You have to link Firebase to your Google Play account and then distribute .aab files without problems 👍
More info: https://firebase.google.com/docs/app-distribution/troubleshooting?platform=android#distribute-aabs
That's actually the only way for now. You have to upload AAB to playstore and APK to app distribution. Using app bundle will not cause any kind of testing issues or undiscoverable problems. I have worked at two mass-scale product companies, both are using the same formats and haven't faced any issue.
The best solution I have for now is to use Bundletool to create a universal .apk from my app bundle.
For our team, it was necessary to do this, since we had a dynamic feature module with <dist:fusing dist:include="true"/>, so ./gradlew assemble would not include this module in the build.
The command in CI looks something like this:
java -jar bundletool-all-1.0.0.jar build-apks --bundle=PATH_TO_YOUR_BUNDLE_FILE --mode=universal --output=zip.apks --ks=PATH_TO_KEYSTORE_FILE --ks-key-alias=YOUR_KEY_ALIAS --ks-pass=pass:YOUR_KEYSTORE_PASSWORD
Firebase App Distribution supports Android App Bundles (AAB)
This is documented on Firebase Distribute Android apps to testers using the Firebase console, just click the AAB button.
This guide describes how to upload Android App Bundles (AABs) to App Distribution and distribute generated APKs using the Firebase console. To follow this guide, you'll need to have access to a Google Play account for which you're an Admin or Owner, and an app that's been published on the Play account.
Caution: When you register your app with Firebase, make sure to enter the same package name as the app you're distributing. The package name value is case-sensitive and cannot be changed for your app in Firebase after it's registered with your Firebase project.
PS: Just upload your App Bundle (with caveats). That's what I'm gonna do now :)
My company is trying out Flutter to create mobile applications and I'm currently in the process of trying to distribute both iOS and Android beta builds through Fabric.
The flutter plugin repo doesn't have any Fabric plugins and I can't seem to find any guides at the flutter home page nor elsewhere online on how to achieve this.
I had planned to focus first on iOS since I'm an iOS developer and figure android out later and use fastlane-match to manage my codesigning on iOS. What I've come up with so far is that I'm gonna try to create post-build-scripts discussed in this fabric guide and thus upload my builds manually after flutter builds and creates an IPA file. I'd say this is not optimal since it differs from the rest of our build setup, as in the fabric kit is not directly embedded in to our iOS project.
So I'm wondering if anybody has any experience in distributing flutter apps with Fabric and if you had any tips on how to achieve this, preferably with Fabric integrated into my iOS and android project respectively.
Edit:
For anybody interested in the solution, I ended up adding the Fabric and Crashlytics cocoapod into the generated cocoapod file by flutter and installing them via pod install. I'm not sure if that cocoapod file will get overwritten in the future as my experience with Flutter is quite limited.
After that I was able to import both Fabric and Crashlytics into my AppDelegate and Initializing the Fabric kit from there just like in a normal iOS project, as well as adding the runscript phase and plist entries as recommended by the fabric iOS install guide.
I also set the project up to use manual code signing and managed the codesigning with fastlane match.
After that I created a fastlane script that uploads to crashyltics. The build script I ended up with is:
flutter build ios --release --no-codesign
cd ios
fastlane ios beta
where ios references to my platform and beta is the name of the lane that exectues the fabric upload. The beta lane first builds with gym (to sign the IPA file) and then that signed IPA file is uploaded to crashlytics.
Fabric is now integrated to Firebase. It was deprecated after March 31, 2020. With this, you can now refer to Firebase App Distribution as an official documentation.
Flutter also has a bunch of documentation regarding distribution of Flutter applications to beta testers.
Continuous delivery with Flutter
Follow continuous delivery best practices with Flutter to make sure
your application is delivered to your beta testers and validated on a
frequent basis without resorting to manual workflows.
You can also check this blog for some useful tips and more information on Deploying Flutter apps to Firebase App Distribution using Fastlane:
Deploying Flutter app to Firebase App Distribution using Fastlane
In this article, I will be showing how to set up and deploy your
Flutter app to Firebase App Distribution with the help of
fastlane.
Hi I see that Android Studio allows to build different APK for instant and installed app.
Does Google Play Developer console allows to upload different APK for instant and installed app there ? How does it manage ?
Does Google Play Developer console allows to upload different APK for instant and installed app there ? How does it manage ?
Yep. You need to upload different APK for instant and installed application. Google Play Developer Console has new menu Release management > Android Instant Apps to release instant app in addition to installed app.
You should go through this link to understand more Distribute your instant app
Yes, Play console allows you to add two different APK for the installable and instant app.
a picture is worth a thousand words
The developer console now separates your uploads by 'App Releases' vs 'Android Instant Apps', as illustrated by Pinkesh's answer. Better labeling would have been 'Installable Apps' instead of 'App Releases' in my opinion, as the later implies all versions. You are forced to use a different versionCode numbers for each type, even for otherwise identical APKs. The installable versionCode must be higher so the installable version will be an 'upgrade' from the instant version.
As to whether you would want to use the same codebase for both APKs ('bundles' now), like I do for my game app, the process has gotten better for arguing to do so. You used to have to do a 20+ step very code invasive process to break your app into three parts, installed, instant, and base modules here https://codelabs.developers.google.com/codelabs/android-multi-feature-instant-app/#0. For me, separate codebases would have been easier and less risky than this, but I still wasted a lot of time practicing with Google Codelab's example Topeka app before finding out it's all been depreciated. Now you can just add a separate module to store large resources and assets, flaging the module for just 'install-time' delivery, keeping the rest of your app under the 10G instant limit. You can include an 'isInstantapp' flag in your code to branch between instant and installable implementations.
Can I have both production and beta versions of my application available to the selected users?
The use case is the following, there are some users that are willing to try new versions of my app, but the are already using stable version for work. Beta version may have bug/crashes, making it inadvisable for work use. Therefore it would be nice to have both versions installed.
If beta APK is published separately (e.g. on my website), the user has anyway to remove the stable APK.
If beta APK has different package name, I have to fork the repository, and then manage merge, which I what to avoid.
Is there a standard way to do that on Play Store?
Can user select which version to install from Play Store?
Is there some tool that may simplify the package renaming?
I am looking for a method that I can use to automatically publish an application to both the alpha and beta testing streams on the Google Play store, from my CI server.
My CI setup is as follows:
The Android app is written using Android Studio (using Eclipse really isn't an option for us).
The build scripts are written in Rake, and run the Gradle tasks, as well as Calabash-Android tests.
The build server is Teamcity 8+, that is currently hosted locally (though we could be moving across to Jenkins in the cloud).
Having scanned through stackoverflow for an answer to this question, the only one found is API to automatically upload apk to Google Play? the answer to this is however over a year old, and as we all know a year is a lifetime in software development, so I hope things may have improved some what.
I also have a sub-question, after publishing to these two streams, how long should it take for testers to see them in the store? I'm hearing 24 to 48 hours, which considering apps published to production only take a couple of hours seems a little odd.
Edit
The plugin below no longer works because Google shut down old versions of their API. Consider using Gradle Play Publisher instead.
Update: The plugin is now available as com.savillians.gradle:android-publisher:0.4 from maven central. Add it to your buildscripts definition in build.gradle and apply it as I stated below.
I had the exact same question, and thanks to #edovino's comment and the Google Play API samples, I was able to create a gradle plugin that does the publishing to any track you wish for any flavor/variant you wish.
See the sources here: https://github.com/bluesliverx/gradle-android-publisher
I'm working on publishing this to maven central so it can be used in a build script, but for now you can grab the android-publisher subdirectory in the repo, put it in the root of your gradle build, and rename the folder to buildSrc. Use the following line in the build.gradle file for the android project you want to publish:
apply plugin: com.savillians.gradle.androidpublisher.AndroidPublisherPlugin
You can then set your publishing settings using an androidPublisher block in the build.gradle file.
android {
...
}
androidPublisher {
applicationName = "Company-Name-Product-Name/1.0"
packageName = "<package name>"
serviceAccountEmail = "<service account email>"
serviceAccountKeyFile = file('<p12 keyfile - NOT the json file>')
track = "alpha" // default, don't need to specify
variantName = "release" // default, don't need to specify
}
Make sure the service account you create has "release manager" permissions, download the p12 key file and put it in the project's directory. Then run this command:
gradle androidPublish
That will send it to Google Play using the credentials you specified. Good luck and let me know if you have questions since this is brand new.
If you're using Jenkins, the Google Play Android Publisher Plugin lets you automatically upload alpha or beta builds.
You can also use it to "promote" an APK from alpha, to beta, or from beta to a staged rollout, for example.
Multiple APK support and the ability to upload (or reuse) expansion files are included as well.
By integrating with the credentials functionality in Jenkins, the plugin can securely access your Google Play account(s) without having to check the private key in to the repository or similar.
There is now a straight forward CLI tool you can call in a build server build step:
https://github.com/codebysd/java-play-store-uploader
It uses google publisher API and uses the new JSON key format.