Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's New in Firebase 2022

What's New in Firebase 2022

B0efb6defa622f75aaaf56e5ee439a59?s=128

Firebase Thailand

June 11, 2022
Tweet

More Decks by Firebase Thailand

Other Decks in Technology

Transcript

  1. What’s New in Firebase GDE Firebase @jirawatee Jirawat Karanwittayakarn GDE

    Firebase @naluinui Somjintana Korbut
  2. Help developers succeed by making it easy to build and

    grow apps Our Mission
  3. monthly active apps 3M+

  4. None
  5. Run your app with confidence Accelerate app development

  6. Accelerate app development

  7. BETA

  8. None
  9. Events NEW! BETA

  10. None
  11. None
  12. Events BETA

  13. Events BETA

  14. CFO

  15. CFO Full text search in 3 steps 1. Setup TypeSense

    Cluster & Add schema 2. Install Extensions to sync data from Firestore 3. Write search UI ✨
  16. Emulators BETA

  17. None
  18. Environment variables NEW!

  19. .env (.env.local .env.dev .env.prod)

  20. process.env.VARIABLE

  21. Store and access sensitive configuration NEW! Cloud Secret Manager

  22. NEW! Cloud Functions v2 Public Preview

  23. Cloud Build Cloud Run Eventarc Cloud Functions Generation 2

  24. One request per instance Many requests per instance

  25. Firebase Alerts Events Crashlytics App Distribution Billing

  26. Changes and enhancements in Cloud Functions v2 ⚡Concurrency 🌐 Secure

    your callable and HTTP functions with a new CORS 🚨 Firebase Alerts events 🔌 Firebase Extension events ✔ Task Queue functions ⏳ Long-running in HTTP Functions (Up to 1 hour timeout) 🖥 Modern JavaScript (config functions globally, options objects, and modular imports)
  27. NEW! PREVIEW Web Updates

  28. Phones Desktops Wearables Thermostats TVs Laptops Tablets React, Angular, Vue,

    Next.js, Nuxt, Astro, Gatsby, Remix, and many more!
  29. Firebase Deploy to the rescue naluinui-macbook$ firebase deploy

  30. None
  31. NEW! Data Viewer

  32. None
  33. Slide notes: • A user accessing an app on a

    variety of device types
  34. None
  35. of Flutter developers use Firebase 62%

  36. Fully-supported Integration

  37. None
  38. Updates for Flutter NEW!

  39. import ‘package:firebase_crashlytics/firebase_crashlytics.dart’; // Initialize Firebase. await Firebase.initializeApp(); Firebase Flutter X

  40. recordFlutterFatalError (FlutterErrorDetails flutterErrorDetails ; recordError(dynamic exception, StackTrace? stack, {dynamic reason,

    Iterable<DiagnosticsNode> information = const [], bool? printDetails, bool fatal = false}) async; Firebase Flutter X
  41. None
  42. None
  43. struct Review { init?(dictionary: [String : Any]) { guard let

    name = dictionary["name"] as? String, let category = dictionary["category"] as? String, let city = dictionary["city"] as? String, let price = dictionary["price"] as? Int, let ratingCount = dictionary["numRatings"] as? Int, let averageRating = dictionary["avgRating"] as? Float, let photo = (dictionary["photo"] as? String).flatMap(URL.init(string:)) else { return nil } self.init(name: name, category: category, city: city, price: price, ratingCount: ratingCount, averageRating: averageRating, photo: photo) } // ... } // Usage let myReview = Review(dictionary: document.data()) Without Codable struct Review: Codable { // ... } // Usage let myReview = try document.data(as: Review.self) With Codable
  44. func signInAndGetProfile(usingEmail email: String, password: String, completion: @escaping (Result<UserProfile, Error>)

    -> Void) { Auth.auth().signIn(withEmail: email, password: password) { result, error in guard let result = result else { completion(.failure(error!)) return } let path = "\(result.user.uid)/fullProfile" let profileRef = Database.database().reference(withPath: path) profileRef.getData { error, snapshot in if let error = error { completion(.failure(error)) return } do { let profileData = try snapshot.data(as: UserProfile.self) completion(.success(profileData)) } catch { completion(.failure(error)) } } } } Using Callbacks: 20 lines of code func signInAndGetProfile(usingEmail email: String, password: String) async throws -> UserProfile { let result = try await Auth.auth().signIn(withEmail: email, password: password) let path = "\(result.user.uid)/fullProfile" let profileRef = Database.database().reference(withPath: path) return try await profileRef.getData().data(as: UserProfile.self) } async/await version: 4 lines of code
  45. None
  46. NEW! Firebase App Check General Availability

  47. Firebase Google Cloud API endpoints

  48. None
  49. App Attestation Resource Access

  50. SafetyNet App Check App Attestation 1 Cloud Storage App Check

    Resource Access 2
  51. App Check Attestation Providers SafetyNet Device Check App Attest reCAPTCHA

    V3 reCAPTCHA Enterprise Custom Attestation
  52. Play Integrity API NEW!

  53. None
  54. Run your app with confidence

  55. App Distribution

  56. NEW! General availability

  57. None
  58. New build available!

  59. NEW! Personalization

  60. None
  61. None
  62. None
  63. NEW! Real-time ale s General availability

  64. App start time Network calls Screen renderings Web page loads

    Out-of-the-box Metrics
  65. None
  66. App Quality Insights window

  67. None
  68. d.android.com/studio/preview Download today!

  69. None
  70. Go to the Crashlytics dashboard to get started

  71. None
  72. Better Together

  73. Thank you! GDE Firebase @jirawatee fb.com/FirebaseThailand fb.com/groups/FirebaseDevTH youtube.com/FirebaseThailand medium.com/FirebaseThailand Resources

    Jirawat Karanwittayakarn GDE Firebase @naluinui Somjintana Korbut