In this edition: Cloud Firestore, Flutter, search with Algolia, Phone Auth, and the brand new ML Kit!
Hey there, Firebase developers! The weather is really starting to warm up here in California as we approach summer, and if you're like me, it's the perfect time of year to go outside, find a nice shady tree, and cozy up with a programming project.
Ok, maybe some of you prefer going to the beach when it's nice out, but I can't seem to figure out how to keep the sand out of my computer! Anyway, when I'm feeling inspired to start a new project, I love having a tutorial to help out. Luckily, the Firebase community is creating new material all the time to keep me busy! If you're looking to find out more about a Firebase product, there's a good chance someone has tried it out and shared their experiences in a blog or video.
Since content can be scattered all over, I figured I'd do the work of scouring the Internet to bring you some of the best Firebase tutorials released over the past couple months. While I'd love to highlight every article and video about Firebase, there simply isn't time or space for them all, so I'm going to showcase a few that I'm most excited about.
Author: The Net Ninja
In this series, Shaun walks you step by step through incorporating Cloud Firestore into a simple web app. He starts with an intro to Cloud Firestore, and continues on through reading data, creating queries, writing data, and real-time updates. The illustrations really helped me visualize the content. The videos also include links to the code on GitHub.
Author: Tensor Programming
As the title suggests, this tutorial shows developers how to get users logged into your Flutter app with Firebase Authentication. This video picks up in the middle of a series, so you may want to go back to the beginning to learn about incorporating Cloud Firestore with Flutter. I've never worked with Dart before, but the instructor does such a great job of explaining each step, it was still very easy to follow along!
Author: Angular Firebase
The Angular Firebase channel creates a myriad of rich tutorials that use different features of Firebase. I'm highlighting this one in particular because so many developers want to know how to implement full text search in Firestore. I also like the use of Cloud Functions, especially the demonstration on how to hide secret API keys in environment variables. Even if you don't use Angular, you'll still learn a lot from this video. If you do use Angular, even better!
Don't want to choose between written and video tutorials?! Check out this Firebase Phone Authentication tutorial from Belal Khan, that also includes a video of the content. Khan's writing style includes larger blocks of code with explanations in between rather than adding and explaining line-by-line. This is great for those of you who like to learn by examining the code as a whole. I know when I'm learning a new feature, I like to look at a complete sample to see how the pieces fit together, so this was really cool to me.
Author: Anže Kravanja
I love this tutorial because, quite frankly, I know little about Google Analytics and nothing about Big Query. This is a great resource for developers who want to get more out of their data stored in Google Analytics for Firebase. The tutorial explains how sessions are tracked in Google Analytics for Firebase and demonstrates step by step how to group Firebase events into user sessions.
Adam Talcott looks at a couple of fun and useful cases for ML Kit for Firebase. As a fellow Swift developer, I love to see how other iOS folks are using Firebase.
I hope that these resources inspire you to build something great! I know after checking them out, I'm ready to slather on the sunblock and enjoy some UV rays while I code my next Firebase project!
Thanks to all of the developers who shared their knowledge with us through their tutorials! Firebase wouldn't be what it is without you. I'm going to feature tutorials here every couple of months, so when you find a tutorial you love, be sure to tell me about it! Find me on Twitter at @ThatJenPerson.
WWDC has drawn to a close and we wanted to share the photos of our party on the night of June 4th. It was great to meet and celebrate app development with many of you, including talented developers from Slack, Adidas, Coinbase, DJI and many more. We were blown away by your enthusiasm to come party with us!
Since we can't travel back in time, here are some highlights so you can relive the night of fun.
We were excited to roll out the red carpet for our guests at the entrance. Our friendly hosts greeted everyone at the door, and we had food+drinks ready for you as soon as you finished checking in.
To give the GlassHouse a homey feel, we designed the ambience of our event to resemble the look and feel of Firebase. Throughout the space, we added lighting in Firebase's colors, custom cushions, video backdrop and more.
A variety of passed hors d'oeuvre (with vegan options) were served throughout the night. We also designed three developer cocktails for the night: the Moscow ML, Old Functioned and Magarealtime. Thank you to all those who submitted creative names for our cocktails and congrats to the winners!
The glowing selfie-station with nifty LED sunglasses was a favorite at this year's party. We're glad that many of you loved the setup, took pictures, and shared them on social media!
We also had fun playing our AppShip arcade game with many of you. Some of our hosts lost their voice cheering everyone on for that one, final goal of the night. And if you scored an own-goal, you weren't the only one: over half of the balls that went into the goal were last touched by someone from their own team.
A party wouldn't be complete without some great music and dancing. This year, we had a bigger dance floor with a giant disco ball as well as a talented DJ as usual. Those who didn't feel like dancing and just wanted to relax, could do so at the outdoor terrace where you could get some fresh air and continue mingling.
No party can last forever, and goodbyes are always hard. This year, Firebase branded travel mugs and bottle openers were waiting to go home with guests right at the door.
Thank you to all those who joined us to celebrate app development - we were glad to share all the laughter with you. Check out our full photo album. To stay up-to-date on our next events, follow us on Twitter.
Here's to next year!
From the Twitterverse:
#firebaseparty was lit last night 🔥 The best part, of course, was catching up with friends I haven't seen in a long time! #WWDC18 pic.twitter.com/383TOsI8WG— NatashaTheRobot (@NatashaTheRobot) June 5, 2018
#firebaseparty was lit last night 🔥 The best part, of course, was catching up with friends I haven't seen in a long time! #WWDC18 pic.twitter.com/383TOsI8WG
Thanks #firebaseparty! Had so much fun meeting friends old and new. Thank you to everyone who said hi! 💕💕 #WWDC18 pic.twitter.com/GAwQzThRHL— mayuko (@hellomayuko) June 5, 2018
Thanks #firebaseparty! Had so much fun meeting friends old and new. Thank you to everyone who said hi! 💕💕 #WWDC18 pic.twitter.com/GAwQzThRHL
Meeting awesome people at #firebaseparty 😎🤟🍢🍤🍺🍻@Firebase #wwdc #wwdc18 #wwdc2018 https://t.co/9tyQ7hF8wz pic.twitter.com/wtcOBWXHL1— Roberto Garrido (@che1404) June 5, 2018
Meeting awesome people at #firebaseparty 😎🤟🍢🍤🍺🍻@Firebase #wwdc #wwdc18 #wwdc2018 https://t.co/9tyQ7hF8wz pic.twitter.com/wtcOBWXHL1
Thanks #firebaseparty for such a great time! #WWDC18 pic.twitter.com/axZfMUpQjl— Kelly Hutchison (@kelhutch17) June 5, 2018
Thanks #firebaseparty for such a great time! #WWDC18 pic.twitter.com/axZfMUpQjl
#WWDC18 #firebaseparty #layersconf pic.twitter.com/7GquJLiE79— Jess Moss (@jessmossisboss) June 5, 2018
#WWDC18 #firebaseparty #layersconf pic.twitter.com/7GquJLiE79
We all know that securing your database from malicious or misguided clients is critical. And with Security Rules for Cloud Firestore, you can create a very powerful access control system with simple matching syntax and logic.
Until now, however, testing your rules was difficult. You couldn't test your rules before deploying them, and running arbitrary tests against these rules (to ensure they worked the way you expected) wasn't easy, either.
Today, we're pleased to announce our first big step in making it easier to secure your Cloud Firestore database with the release of the Rules Simulator.
With the new Rules Simulator in the Firebase console, you can test your rules as you write them — and before you deploy!
The simulator lets you test document reads, writes, and deletes against any part of your Cloud Firestore database. It will also let you simulate being signed in with a particular userID, so you can better test user-based access control. And for more sophisticated auth-based security, the simulator will help you build authentication tokens for various providers, giving you a preview of what that token will look like and allowing you to directly map the shape of the token to the rules you are writing.
The simulator tests against the rules as they are currently drafted in your editor, not as they are in deployment, allowing you to rapidly test different rules with different types of requests. This means that next time you click the publish button, you can have more confidence that your rules are protecting your data and doing exactly what you expect them to do!
You can get started today with the simulator by navigating over to the Rules section of the Firestore panel in the console.
We've also significantly increased the number of get(), exists() and getAfter() calls you can make in each security rule. For a single document request, you can now make 10 document access calls (up from 3). For multi-resource requests, such as batched writes, you'll be able to make a total of 20 document access calls for all documents in that request.
get()
exists()
getAfter()
Check out our documentation for more information and examples.
Firestore Security Rules may look like JavaScript, but they're actually a purpose-built language with its own unique syntax and behavior. While we've always provided guides to help you write security rules, many developers mentioned to us that it is too hard to discover all of the functions, types, and edge-cases that you need to learn in order to write complex rules.
That's why we published comprehensive reference documentation on the security rules language and the built-in types and functions that it provides. We hope this will enable you to be more confident when writing advanced rules conditions.
The Cloud Firestore data viewer in the console is a great place to view and update data. You can watch in real time as documents and fields update.
We all know that Cloud Firestore scales to huge amounts of data automatically -- but what about the data viewer? Until now, it was hard to navigate through a big dataset.
To solve the problem, we added a new feature that lets you order and filter right in the data viewer.
We think this will be especially useful in two scenarios:
Sorting by a field. Let's say you have a field last_updated on all of your documents in a collection users, and you want to see the documents that were updated most recently. Just open the menu, choose the field last_updated, select Descending and click apply.
last_updated
users
Descending
Finding a specific document. Perhaps you have a collection of users which has the fields email and last_updated, and someone tells you they are having a problem with their account. Using the filter menu, input the field email and add a condition (email == "test@gmail.com") to instantly find that user's document.
email
email == "test@gmail.com"
These are just a few ways that you can use the new menu. We hope it helps you browse large datasets with ease.
Firebase Dynamic Links are deep links that drive user growth and engagement by allowing you to send users to specific places in your app - across iOS, Android, and the web. Dynamic Links retain their context and attribution data, even if a user needs to install your app first, ensuring new users see the content they're looking for right away. While Dynamic Links can be useful in a number of situations, we heard from many of you that you wanted more ways to customize the actual URL that made up a Dynamic Link.
In the past, Dynamic Links contained a randomly generated subdomain that could not be customized. So when you created a new link, it would look something like https://a7cd8.app.goo.gl/B7vVu.
https://a7cd8.app.goo.gl/B7vVu
Today, we're excited to introduce three ways you can customize your dynamic links: a brand agnostic domain, custom subdomains, and custom paths. Moving forward, you can update your links from something that looks like https://a7cd8.app.goo.gl/B7vVu to a much more friendly https://mygame.page.link/mycampaign.
https://mygame.page.link/mycampaign
We're rolling out these changes after talking with many of you and running tests on how we could improve Dynamic Links. Through your feedback and our experimentation, we discovered three important things:
https://a7cd8.page.link/B7vVu
https://mygame.app.goo.gl/B7vVu
https://a7cd8.app.goo.gl/B7vVu.
https://a7cd8.app.goo.gl/mycampaign
With these results in mind, we are giving you the flexibility to use a brand agnostic root (page.link), create up to five custom subdomains per project, and create a custom path for each new short link. Now, you can have links that look like: mygame.page.link/joinme, mygame.page.link/holidays and mygame-lite.page.link/holidays.
page.link
mygame.page.link/joinme
mygame.page.link/holidays
mygame-lite.page.link/holidays
When you customize your dynamic links in these three ways, your brand will shine through, you will increase trust and conversion, and you'll be able to design links to better fit the context of where they are used.
Creating custom Dynamic Links is easy. There is a one-time setup process in the Firebase Console to set up your domain. Once that's done, you can create new links programmatically or via the console on your chosen domain.
If you're new to Dynamic Links, you'll be prompted to enter a custom subdomain during the setup process. For trademarked subdomains, we also have a verification flow to ensure that the subdomain is reserved for the developer that owns the brand.
For developers with existing Dynamic Links, you may continue to use links on app.goo.gl or create new links on page.link.
app.goo.gl
You'll be able to view the links and associated analytics per domain by selecting the domain from a drop-down selector.
For more information on creating Dynamic Links programmatically, see our documentation on iOS, Android and the REST API.
Thank you to everybody who has been using Dynamic Links and providing us with valuable feedback. We hope that these changes will result in more user engagement and more clicks on your dynamic links for your app.
If you have any questions, feedback or bugs to report please reach us at firebase.google.com/support.
Learn more about Firebase Dynamic Links at https://firebase.google.com/products/dynamic-links/.