Last month, our friends at Android launched the Android Developer Challenge, and asked you to submit your ideas focused on helpful innovation, powered by on-device machine learning.
ML Kit for Firebase helps power many of these experiences, including adidas’ new in-store shopping experience for their London store. Shoppers can scan products on their phones while they are in the store and the app lets them check stock and request their size without the need for queues.
If you’ve used ML Kit for Firebase to create a great user experience, or if you’ve got a great idea for how you might use it, submit your idea by December 2! You can also check out more examples on the Android Developers blog.
Firebase Authentication provides an end-to-end identity solution for your applications, which allows you to authenticate and verify users with passwords, phone numbers and popular federated identity providers such as Google, Facebook, Twitter, and Microsoft.
Today, we are pleased to announce beta support for Sign in with Apple in Firebase Authentication. Sign in with Apple allows your users to sign in to your applications and websites using their Apple ID.
Firebase also provides FirebaseUI, a customizable drop-in authentication UI that allows developers to easily implement a variety of authentication flows using any of the authentication services supported by Firebase, including Sign in with Apple.
Support for Sign in with Apple is available in beta now, and can be integrated in your applications using the latest versions of the Firebase SDKs for iOS, Android, and the web.
Hello, Cloud Firestore developers! We wanted to let you know about some useful new querying features we've added to Cloud Firestore this week. Starting with… in queries!
in
With the in query, you can query a specific field for multiple values (up to 10) in a single query. You do this by passing a list containing all the values you want to search for, and Cloud Firestore will match any document whose field equals one of those values.
in queries are a good way to run simple OR queries in Cloud Firestore. For instance, if the database for your E-commerce app had a customer_orders collection, and you wanted to find which orders had a "Ready to ship", "Out for delivery" or "Completed" status, this is now something you can do with a single query, like so:
customer_orders
We've launched another feature similar to the in query, the array-contains-any query. This feature allows you to perform array-contains queries against multiple values at the same time.
array-contains-any
array-contains
For example, if your app had a products collection, and those documents contained an array of categories that every item belongs in, you could now look for items that were in the "Appliances" or "Electronics" category, by passing these values into a single array-contains-any query.
Note that the baby monitor document will only be returned once in your query, even though it matches with multiple categories.
These queries are also supported in the Firebase console, which gives you the ability to try them out on your dataset before you start modifying your client code.
This also seems like a good time to remind you that you can apply filters directly in the Firebase console. Neat, huh?
Security rule behavior for these queries is pretty straightforward. Cloud Firestore will look at each potential value passed in for your in or array-contains-any operation and make sure your query would be allowed for that value. If any value is not allowed, the entire query fails.
For example, if your project was set up with these security rules…
match /projects/{project} { allow read: if resource.data.status != "secret"; ... }
This request would work…
db.collection("projects").where("status", "in", ["public", "unlisted"]);
...but this entire request would fail, because it's possible that our query will return documents that are forbidden in our security rules.
db.collection("projects").where("status", "in", ["public", "unlisted", "secret"]);
Not sure why we couldn't just send you back the allowed documents? Make sure to review the 'Rules are not filters' section of this video.
While we're excited to have you unlock the potential of in queries and array-contains-any queries, you should know about a few important limitations:
I think there's a lot of exciting things you can do now with in queries, and we're looking forward to hearing what new functionality you've added to your apps. So make sure you've upgraded your client libraries to the latest versions to take advantage of the new features, check out the documentation, and happy databasing!
At Firebase, our mission is to help mobile and web developers succeed, but with over 2 million apps actively using Firebase every month, we know that success means different things to different developers. For example, to Le Figaro, the oldest and largest French newspaper, success means increasing paid subscriptions significantly with the help of a combination of Firebase products. For Mighty Immersion, a three person startup on a journey to improve patient care with VR technology, success means scaling their apps to more hospitals as fast as possible using Firebase backend products.
Stories like these are what inspire us to continue investing in our developer community. We all benefit from a vibrant and open ecosystem that helps bring ideas to life.
We’re excited to be in Madrid at the fourth annual Firebase Summit to hear about what you’re building, and share updates on how we’re simplifying your app development workflows and infrastructure needs. Read on to learn about everything that’s new at Firebase Summit 2019! You can also check out the keynote and sessions on our YouTube channel or the summit website.
Save time on everyday development tasks with Firebase Extensions
Repetitive app development tasks can slow you down, leaving less time for creating amazing user experiences. To save you time, we’re thrilled to introduce Firebase Extensions, pre-packaged bundles of code designed to automate common tasks in your projects. Whether you want to resize an image, add people to an email list or shorten URLs, we’ve built an array of solutions that you can easily deploy to your projects. There’s no need to write or debug code–it’s all done for you, but you still have the flexibility to configure extensions for your specific use cases. Firebase Extensions are open-source and integrate seamlessly with other Firebase and Google Cloud Platform products. Starting today, you can discover extensions suited to your specific use cases on the Extensions Directory page on our website or Firebase Extensions GitHub repository.
Launch extensions available in Firebase Console
Increase your development velocity with the Firebase Emulator Suite
The Firebase Emulator Suite is a fast, rich and safe environment that provides you with a set of local tools for building your next app or feature. Based on your feedback, we’ve expanded the functionality of our emulator suite to include hot reloading for changes to Security Rules and added broader support for client and server side SDKs. We’ve also included support for Realtime Database triggered Functions and developed a new command to tighten how it works with CI. Learn more here.
Firebase Emulator suite now supports Realtime Database & broader client and server side SDKS
Enhance app stability and usability before publishing with Firebase App Distribution
Building apps inevitably comes with bugs, which are important to address before your app is live so they don’t affect the user experience, or your ratings and reviews. Today, we’re excited to announce Firebase App Distribution, which gives you an easy and flexible way to distribute pre-release versions of your apps to trusted testers. App Distribution provides one central hub where you can distribute both iOS and Android test apps. You can also build pre-release testing into your existing workflows with CLI support for Gradle, fastlane and the Firebase CLI. There’s no SDK to install, forms to fill out or review process to go through. Get started with Firebase App Distribution here.
Send pre-release versions of your app to trusted testers via the Firebase console
Expand your web app capabilities with Google Analytics, Firebase Remote Config and Firebase Cloud Messaging
Once your app is running, the next step is to understand your users and identify ways to increase engagement. Users often interact with your business across multiple touch points and on different devices, so today we’re excited to announce we're expanding our integration with Google Analytics to include support for the web. You can now use the powerful analytics features you’ve enjoyed for native mobile apps–like the ability to segment your audience, trigger actions, and record events and user properties–for web apps. This makes it easier to understand how users are interacting with your apps, no matter what device or platform they're on. You’ll also now have access to closed funnels just a click away in the Google Analytics UI. And with our recently-upgraded audiences feature, you can create a more personalized experience for your web users with Remote Config or Firebase Cloud Messaging, which are now also available for web.
Google Analytics now supports web apps
Easily forecast user behavior with Firebase Predictions
Last year we launched Firebase Predictions into general availability, letting you apply the power of machine learning to your app analytics and create smart segments of your users based on their predicted future behavior. We’ve made some recent improvements to the Predictions experience to give you more information and more control. Most significantly, we’ve updated the Predictions interface so you can see the full spectrum of your user’s predicted behavior and target any segment of users depending on your use case. Learn more here.
Peek under the hood with more open-sourced SDKs
We believe an open platform is essential to creating powerful software and a connected community. Over the past few months, we’ve open-sourced four additional iOS libraries and four additional Android libraries. Today we’re open-sourcing the new Web SDK releases for Remote Config and Analytics. We’ve also worked closely with Invertase, a company that has created a comprehensive React Native library for Firebase, to ensure their libraries cover all Firebase products. The new React Native Firebase v6 release adds support for every Firebase service and includes a new documentation website, quick start guides, and upgraded SDKs. Get started here.
Limit access to your Firebase projects
In addition to making our platform more open, we’re also making sure you have the right processes in place to keep your data secure. To help you do this, we’re happy to share Firebase Roles and Permissions has graduated into general availability. This battle-tested system lets you use either predefined Firebase roles or create your own custom roles in order to limit access to your Firebase projects and data to the appropriate people. Learn more here.
Reduce test run time with Firebase Test Lab
We’ve made improvements to Firebase Test Lab that allow you to speed up tests with Test Sharding. Test Sharding enables you to divide tests into subgroups (shards), and run them in parallel. Learn more here.
Update on Fabric migration
With the launch of App Distribution, we’ve completed our journey to bring the best of Fabric to Firebase. All of the Fabric features you love can now be accessed in Firebase, and to take advantage of the latest updates, we recommend migrating your Fabric apps and teammates to Firebase today. The Fabric dashboard will sunset on March 31st 2020 and an early migration will ensure that you’re set up for success in your new home. Get started here.
We're continuing to invest in Firebase to provide a more helpful platform that simplifies your app development workflows and infrastructure needs, so you can focus on building amazing user experiences. As we continue to grow and enhance the platform, we'd love to get your feedback. Join our Alpha program to get a sneak peek of what we're building next, share your thoughts with us, and help shape the future of Firebase.
Today, we’re delighted to announce that we’ve doubled the concurrent connections limit for the Firebase Realtime Database from 100k to 200k. This takes effect today, for all existing databases and new projects. And while this level of scalability will be enough for the majority of projects out there, some of you might want to support even more concurrent users. For that, you might want to consider sharding your database.
Many kinds of apps can scale much higher by sharding their data across multiple Realtime Database instances in a single project. The 200k concurrent user limit applies to each individual database, so the total number of concurrent connections increases linearly as you add more instances.
Sharding is a good strategy to employ when each client interacts with isolated parts of the database. Imagine a virtual whiteboard app, which is the sort of high-frequency, low-latency collaboration app for which the Realtime Database really excels. Whiteboard sessions don’t interact with each other -- just with the handful of users that are drawing together. So they can be sharded across an unlimited number of instances. When multiple users create a session, your app could assign that session to a random shard; then the clients only need to be connected to that database in order to receive their realtime updates.
Most IoT apps can also take advantage of sharding. If you want to have a gigantic number of tiny sensors sending periodic updates, they probably don’t all need to write to the same RTDB instance. You can create lots of shards (we support up to 1000), and assign each sensor to a shard. If you're interested in working with multiple versions of the Realtime Database in the same project, make sure to check out our documentation.
Of course, if you're looking for a powerful realtime database that scales without sharding, we still recommend our newer database, Cloud Firestore, for most new projects. It has the same magical realtime, offline, serverless functionality as the Realtime Database, but has been architected for higher reliability, has more powerful queries, and locations around the world.
Nonetheless, there are some use cases for which the Realtime Database is the right choice, even for new applications. That’s why we’re continuing to invest in making it even better for these purposes.
When should you pick the Realtime Database for a new project? The short answer is that if you are building an application that will have lots of tiny operations, the Realtime Database may be less expensive and more performant. For the whiteboarding app, you’d want to send lots of frequent little updates as the users draw on the whiteboard, and you’d want latency to be as low as possible. In the IoT case, performance may not be as important, but the Realtime Database may end up cheaper than Cloud Firestore if you are sending a massive stream of tiny writes.
Of course, you can use both Cloud Firestore and the Realtime Database together in the same project — we encourage it! For instance, you can use the Realtime Database to power the live whiteboard feature, but then persist the whiteboard contents to Firestore periodically to take advantage of its 99.999% availability and less expensive storage.
We hope you are excited about the increased scaling capabilities of the Realtime Database. And we also hope this guidance helps you decide between Cloud Firestore and the Realtime Database for new projects. As always if you have any questions, feel free to reach out on StackOverflow, or the firebase-talk discussion group.