Thursday, 27 August 2015

Build Better Mobile Apps with FirebaseUI

Mike McDonald
Mike McDonald
Engineer

Designed to help native mobile developers quickly and easily develop Firebase apps, FirebaseUI eliminates bloat in your application code by providing native bindings to common UI controls.

FirebaseUI adds support to quickly hook a Firebase database reference or query to a ListView, GridView, RecyclerView on Android or a UITableView or UICollectionView iOS.

Start by creating an Android Firebase project or iOS Firebase project then follow our Android or iOS quickstarts below.

Android Quickstart

On Android, add the latest version of FirebaseUI to your build.gradle:


compile 'com.firebase:firebase-ui:0.2.0'

Resync your project and you're ready to continue.

More information, including a more in-depth installation walkthrough, can be found on the FirebaseUI-Android README.

Once we've installed FirebaseUI, create a FirebaseListAdapter which binds a Firebase database reference or query to a ListAdapter and provides developers an easy way to populate ListView views with developer specified model objects (more information on using Java Objects is available in the docs).


Firebase.setAndroidContext(this);
Firebase ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");

mAdapter = new FirebaseListAdapter<ChatMessage>(this, ChatMessage.class, android.R.layout.two_line_list_item, ref) {
@Override
protected void populateView(View view, ChatMessage object) {
/* Populate view with contents of the model object */
}
};

mListView.setListAdapter(mAdapter);

If you want more examples, check out the Android README, or see our Android chat app example. The Javadoc is available here.

iOS Quickstart

On iOS, add the latest version of FirebaseUI to your podfile:


pod 'FirebaseUI', '~> 0.2.0'

If you're using Swift, make sure to add:


platform :ios, '8.0'
use_frameworks!

pod install, then open the generated .xcworkspace.

More information, including a more in-depth installation walkthrough, can be found on the FirebaseUI-iOS README.

Once we've installed FirebaseUI, create a FirebaseTableViewDataSource. This datasource will provide cells and the associated FDataSnapshots (or a custom model object, a feature in beta) to populate UITableViewCells, a custom subclass, or even a custom XIB.


Firebase *ref = [Firebase alloc] initWithUrl:@"https://<YOUR-FIREBASE-APP>.firebaseio.com/chat"];

self.dataSource = [[FirebaseTableViewDataSource alloc] initWithRef:ref
modelClass:[FDataSnapshot class]
cellClass:[UITableViewCell class]
cellReuseIdentifier:@""
view:self.tableView];

[self.dataSource populateCellWithBlock:^void(UITableViewCell *__nonnull cell, FDataSnapshot *__nonnull snap) {
/* Populate cell with contents of the snapshot */
}
}];

self.tableView.dataSource = self.dataSource;

let ref = Firebase(url: "https://<YOUR-FIREBASE-APP>.firebaseio-demo.com")

self.dataSource = FirebaseTableViewDataSource(ref: ref,
modelClass: FDataSnapshot.self,
cellClass: UITableViewCell.self,
cellReuseIdentifier: "",
view: self.tableView)

self.dataSource.populateCellWithBlock { (cell: UITableViewCell, obj: NSObject) -> Void in
let snap = obj as! FDataSnapshot // Force cast to an FDataSnapshot
/* Populate cell with contents of the snapshot */
}

self.tableView.dataSource = self.dataSource

FirebaseUI can also be used to back a UICollectionView using the FirebaseCollectionViewDataSource.

If you want more examples, check out the iOS README, or see our iOS chat app example. The Appledoc is available here.

Next up, Login

We're working on making mobile development as effortless as possible, so we're always looking for ways to improve development speed and reduce complexity. One major area that we hear a lot of developers struggle is around mobile authentication, which typically requires installation of third party SDKs and understanding lots of additional docs.

While we have login demo apps on Android and iOS that explain these processes, FirebaseUI 0.3 will incorporate a set of login helper classes and standard views to make adding authentication to your mobile apps simple.

Our long term strategy involves adding support for pagination, infinite scroll, and client side filtering. We'd also love to hear feature requests from you.

Submit a Pull Request!

Do you want to see those features added faster? Are you excited about making Firebase apps easier to develop? Is writing quality code your passion?

We'd love to have your help building and maintaining these libraries. Please submit issues for bugs and feature requests on Android and iOS, and pull requests are always welcome.

Lastly, if you've built anything, don't be shy! Share your apps with us on Twitter @Firebase or in our Google Group--we're excited to see what you build.

Share:

Tuesday, 25 August 2015

Angular 1 and Angular 2 integration: the path to seamless upgrade

Have an existing Angular 1 application and are wondering about upgrading to Angular 2?  Well, read on and learn about our plans to support incremental upgrades.

Summary

Good news!
  • We're enabling mixing of Angular 1 and Angular 2 in the same application.
  • You can mix Angular 1 and Angular 2 components in the same view.
  • Angular 1 and Angular 2 can inject services across frameworks.
  • Data binding works across frameworks.

Why Upgrade?

Angular 2 provides many benefits over Angular 1 including dramatically better performance, more powerful templating, lazy loading, simpler APIs, easier debugging, even more testable and much more.  Here are a few of the highlights:

Better performance

We've focused across many scenarios to make your apps snappy.  3x to 5x faster on initial render and re-render scenarios.
  • Faster change detection through monomorphic JS calls
  • Template precompilation and reuse
  • View caching
  • Lower memory usage / VM pressure
  • Linear (blindingly-fast) scalability with observable or immutable data structures
  • Dependency injection supports incremental loading

More powerful templating

  • Removes need for many directives
  • Statically analyzable - future tools and IDEs can discover errors at development time instead of run time
  • Allows template writers to determine binding usage rather than hard-wiring in the directive definition

Future work

We've decoupled Angular 2's rendering from the DOM.  We are actively working on supporting the following other capabilities that this decoupling enables:
  • Server-side rendering.  Enables super-fast initial render and web-crawler support.
  • Web Workers. Move your app and most of Angular to a Web Worker thread to keep the UI smooth and responsive at all times.
  • Native mobile UI. We're enthusiastic about supporting the Web Platform in mobile apps.  At the same time, some teams want to deliver fully native UIs on their iOS and Android mobile apps.  
  • Compile as build step.  Angular apps parse and compile their HTML templates.  We're working to speed up initial rendering by moving the compile step into your build process.  

Angular 1 and 2 running together

Angular 2 offers dramatic advantages over Angular 1 in performance, simplicity, and flexibility.  We're making it easy for you to take advantage of these benefits in your existing Angular 1 applications by letting you seamlessly mix in components and services from Angular 2 into a single app. By doing so, you'll be able to upgrade an application one service or component at a time over many small commits.

For example, you may have an app that looks something like the diagram below.  To get your feet wet with Angular 2, you decide to upgrade the left nav to an Angular 2 component.  Once you're more confident, you decide to take advantage of Angular 2's rendering speed for the scrolling area in your main content area.



For this to work, four things need to interoperate between Angular 1 and Angular 2:
  • Dependency injection
  • Component nesting
  • Transclusion
  • Change detection
To make all this possible, we're building a library named ng-upgrade. You'll include ng-upgrade and Angular 2 in your existing Angular 1 app, and you'll be able to mix and match at will.

You can find full details and pseudocode in the original upgrade design doc or read on for an overview of the details on how this works.  In future posts, we'll walk through specific examples of upgrading Angular 1 code to Angular 2.

Dependency Injection

First, we need to solve for communication between parts of your application. In Angular, the most common pattern for calling another class or function is through dependency injection. Angular 1 has a single root injector, while Angular 2 has a hierarchical injector. Upgrading services one at a time implies that the two injectors need to be able to provide instances from each other.

The ng-upgrade library will automatically make all of the Angular 1 injectables available in Angular 2. This means that your Angular 1 application services can now be injected anywhere in Angular 2 components or services.

Exposing an Angular 2 service into an Angular 1 injector will also be supported, but will require that you to provide a simple mapping configuration.

The result is that services can be easily moved one at a time from Angular 1 to Angular 2 over independent commits and communicate in a mixed-environment.

Component Nesting and Transclusion

In both versions of Angular, we define a component as a directive which has its own template.  For incremental migration, you'll need to be able to migrate these components one at a time. This means that ng-upgrade needs to enable components from each framework to nest within each other.

To solve this, ng-upgrade will allow you to wrap Angular 1 components in a facade so that they can be used in an Angular 2 component. Conversely,  you can wrap Angular 2 components to be  used in Angular 1. This will fully work with transclusion in Angular 1 and its analog of content-projection in Angular 2.

In this nested-component world, each template is fully owned by either Angular 1 or Angular 2 and will fully follow its syntax and semantics. This is not an emulation mode which mostly looks like the other, but an actual execution in each framework, dependending on the type of component. This means that components which are upgraded to Angular 2 will get all of the benefits of Angular 2, and not just better syntax.

This also means that an Angular 1 component will always use Angular 1 Dependency Injection, even when used in an Angular 2 template, and an Angular 2 component will always use Angular 2 Dependency Injection, even when used in an Angular 1 template.

Change Detection

Mixing Angular 1 and Angular 2 components implies that Angular 1 scopes and Angular 2 components are interleaved. For this reason, ng-upgrade will make sure that the change detection (Scope digest in Angular 1 and Change Detectors in Angular 2) are interleaved in the same way to maintain a predictable evaluation order of expressions.

ng-upgrade takes this into account and bridges the scope digest from Angular 1 and change detection in Angular 2 in a way that creates a single cohesive digest cycle spanning both frameworks.

Typical application upgrade process

Here is an example of what an Angular 1 project upgrade to Angular 2 may look like.
  1. Include the Angular 2 and ng-upgrade libraries with your existing application
  2. Pick a component which you would like to migrate
    a. Edit an Angular 1 directive's template to conform to Angular 2 syntax
    b. Convert the directive's controller/linking function into Angular 2 syntax/semantics
    c. Use ng-upgrade to export the directive (now a Component) as an Angular 1 component (this is needed if you wish to call the new Angular 2 component from an Angular 1 template)
  3. Pick a service which you would would like to migrate
    a. Most services should require minimal to no change.
    b. Configure the service in Angular 2
    c. (optionally) re-export the service into Angular 1 using ng-upgrade if it's still used by other parts of your Angular 1 code.
  4. Repeat doing step #2 and #3 in an order convenient for your application developmen
  5. Once no more services/components need to be converted drop the top level Angular 1 bootstrap and replace with Angular 2 bootstrap.
Note that each individual change can be checked in separately and the application continues working letting you continue to release updates as you wish.

We are not planning on adding support for allowing non-component directives to be usable on both sides. We think most of the non-component directives are not needed in Angular 2 as they are supported directly by the new template syntax (i.e. ng-click vs (click) )

Q&A

I heard Angular 2 doesn't support 2-way bindings. How will I replace them?
Actually, Angular 2 supports two way data binding and ng-model, though with slightly different syntax.

When we set out to build Angular 2 we wanted to fix issues with the Angular digest cycle. To solve this we chose to create a unidirectional data-flow for change detection. At first it was not clear to us how the two way forms data-binding of ng-model in Angular 1 fits in, but we always knew that we had to make forms in Angular 2 as simple as forms in Angular 1.

After a few iterations we managed to fix what was broken with multiple digests and still retain the power and simplicity of ng-model in Angular 1.

Two way data-binding has a new syntax: [(property-name)]="expression" to make it explicit that the expression is bound in both directions. Because for most scenarios this is just a  small syntactic change we expect easy migration.

As an example, if in Angular 1 you have:
<input type="text" ng-model="model.name" />

You would convert to this in Angular 2:
<input type="text" [(ng-model)]="model.name" />

What languages can I use with Angular 2?
Angular 2 APIs fully support coding in today's JavaScript (ES5), the next version of JavaScript (ES6 or ES2015), TypeScript, and Dart.

While it's a perfectly fine choice to continue with today's JavaScript, we'd like to suggest that you explore ES6 and TypeScript (which is a superset of  ES6) as they provide dramatic improvements to your productivity.

ES6 provides much improved syntax and standards for common libraries like promises and modules.  TypeScript gives you dramatically better code navigation, automated refactoring in IDEs, documentation, finding errors, and more.

Both ES6 and TypeScript are easy to adopt as they are supersets of today's ES5.  This means that all your existing code is valid and you can add their features a little at a time.

What should I do with $watch in our codebase?
In order to gain speed and predictability, in Angular 2 you specify watch expressions declaratively in the HTML template or in annotations on your component directives. One additional benefit from this is that Angular 2 applications can be safely minified/obfuscated for smaller payload.

For any scenarios that don't fit with these mechanisms, you can take advantage of observables -- ES7 Observables as in Rx.js for JavaScript or Streams in Dart.

What can I do today to prepare myself for the migration?
Follow the best practices and build your application using components and services in Angular 1 as described in the AngularJS Style Guide.

Wasn't the original upgrade plan to use the new Component Router?
The upgrade plan that we announced at ng-conf 2015 was based on upgrading a whole view at a time and having the Component Router handle communication between the two versions of Angular.

The feedback we received was that while yes, this was incremental, it wasn't incremental enough.  We went back and redesigned for the plan as described above.

Are there more details you can share?
Yes!  In the Angular 1 to Angular 2 Upgrade Strategy design doc.

We're working on a series of upcoming posts on related topics including:
  • Mapping your Angular 1 knowledge to Angular 2.
  • A set of FAQs on details around Angular 2.
  • Detailed migration guide with working code samples.
See you back here soon!

Share:

Wednesday, 19 August 2015

Announcing Lower, Simpler Pricing

Max Henderson
Max Henderson
Head of Growth

Firebase is growing faster every day, and since joining Google last year, we've gained access to world-class infrastructure and scale. Today, we're announcing across-the-board price drops to lower the barrier to entry for Firebase, so developers everywhere can create extraordinary experiences for their users.

Here are the changes we've made:

Removing Concurrent Caps

We've heard from you that concurrents are confusing. So today, we're eliminating the need to worry about them… they're now unlimited for our Candle plan and above!

To prevent abuse, we're limiting simultaneous connections to a single Firebase to 10,000 by default, which is generally enough for applications with at least 100,000 daily active users. We can scale far beyond that limit, and users can contact us to permanently raise the cap with 24 hours notice.

Doubling the Free Tier and $5 Custom Domains

Firebase is about giving people the tools to build extraordinary apps. Experimentation is core to what we stand for, and we believe people should be able to build non-trivial apps on Firebase for free.

Therefore, we are widening our free tier to:

  • 100 concurrent users (2x the previous 50)
  • 10 GB database bandwidth (2x the previous 5 GB)
  • 1 GB database storage (10x the previous 100 MB)

In addition, you can now add a custom domain to your free app for only $5/month, with our new Spark plan. No more need to upgrade to the Candle plan just to get a custom domain!

Increasing Paid Plan Resources up to 300%

Finally, we're increasing the resource limits on all our paid plans. The Candle, Bonfire, Blaze, and Inferno plans are all seeing big increases in database bandwidth and storage, up to 3x. We've also lowered overage fees to increase flexibility as your app scales.

Here's a full summary of the changes, and you can check out our new pricing page here:

Database Bandwidth Database Storage
New Limit Increase New Limit Increase
Free / Spark 10 GB 2x 1 GB 10x
Candle 50 GB 2.5x 10 GB 3x
Bonfire 150 GB 2x 30 GB 3x
Blaze 500 GB 2x 100 GB 3x
Inferno 1500 GB 1.5x 300 GB 3x

It has been a pleasure building Firebase, and it's humbling to see the great things you build with us. We've got some great new features coming soon, and are more excited than ever for the future.

Happy Coding!

Share:

Tuesday, 28 July 2015

EmberFire 1.5.0

Tim Stirrat
Tim Stirrat
Frontend Developer

Today's EmberFire release includes new features that will make it even easier for Ember developers to connect their apps to Firebase. The EmberFire 1.5.0 release brings Ember Data 1.13.0 compatibility, integration with Firebase Authentication, and some updates for embedded records.

What is EmberFire?

EmberFire is an adapter for using Firebase with Ember Data. It is packaged as an Ember CLI addon, which makes it incredibly easy to add Firebase as the backend for your Ember app. Using EmberFire, all of your models stored in Ember Data will be automatically synchronized with our remote Firebase database. Simply calling save() on a record will save it to the store and persist that data in your Firebase database.

New Features in EmberFire 1.5.0

Ember Data 1.13.0 Compatibility

Ember Data has made it out of beta, which means we can count on a stable API. This is great news for EmberFire. In addition to 1.13.0 compatibility, we're working on staying up to date with the latest releases, and our tests are also passing for 2.0 canary!

Torii Authentication

You can now authenticate users in your EmberFire app with Facebook, Twitter, GitHub, and Google using our Torii adapter. Get started by enabling the authentication provider you’d like to use in your Firebase Dashboard, installing the Torii addon, and following the authentication section in our guide. Once you've set it up, you can authenticate a user inside your route or controller with the following snippet:


this.get("session").open("firebase", { provider: "twitter"})
.then(function(data) {
console.log(data.currentUser);
});

This snippet of code will authenticate a user with Twitter and log the returned user object to the console.

Many thanks to Matt Sumner for his work on this.

Embedded Record Changes

This release also changes the way embedded records are declared. If you have an embedded hasMany / belongsTo relationship in your EmberFire app, you should now follow the Ember Data conventions by configuring embedded record settings in a serializer. Visit the relationships section of our guide for details. Just be sure to use Ember Data 1.13.6+ for embedded records compatibility.

Getting Started

If you're new to EmberFire, using it with your Ember CLI app is as simple as installing our addon:


ember install emberfire

Then, update your Firebase URL in config/environment.js and you're ready to persist your Ember Data records in your Firebase database. Check out our guide for a detailed walkthrough on all things EmberFire.

We'd love to hear what you think of the latest release. Post any feedback in our Ember Google Group, or open an issue on GitHub. Contributions to EmberFire are always welcome, so feel free to submit a pull request if there's something you'd like to see added.

We're excited to see what you build with Firebase and Ember!

Share:

Wednesday, 15 July 2015

ReactFire 0.5.0

Jacob Wenger
Jacob Wenger
Core Developer

React and Firebase were made for each other. And with the introduction of ReactFireback in May 2014, we provided a simpler way to build apps using both technologies. Today we're announcing ReactFire 0.5.0 - the biggest update since that initial release. The update brings improved performance, a handful of bug fixes, and some extra features to simplify development.

What is ReactFire?

For those who aren't familiar, ReactFire is a React mixin. The ReactFireMixin makes it dead simple to bind data stored in Firebase to a component's state. It handles both array-like and object-like data via the bindAsArray() and bindAsObject() methods, respectively.

For example, say you have a list of messages stored in your Firebase database that looks like this:

{
"messages": {
"-JqpIO567aKezufthrn8": {
"uid": "barney",
"text": "Welcome to Bedrock City!"
},
"-JqpIP5tIy-gMbdTmIg7": {
"uid": "fred",
"text": "Yabba dabba doo!"
}
}
}

You can bind the message data to your component's state by calling bindToArray() in your componentWillMount() method:

var ExampleComponent = React.createClass({
mixins: [ReactFireMixin],

getInitialState: function() {
return {
messages: []
};
},

componentWillMount: function() {
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com/messages");
this.bindAsArray(ref, "messages");
},

render: function() {
// ...
}
});

The message data is now bound to this.state.messages. Whenever messages are added, removed, updated, or moved in Firebase, those changes are reflected automatically in this.state.messages

  • no calls to this.setState() required! The bound data can be used as normal in your component's render() method:
render: function() {
var messages = this.state.messages.map(function(message) {
return (
<li key={ message['.key'] }>{ message.uid } says { message.text } </li>
);
});
return <ul>{ messages }</ul>
;
}

What's new in ReactFire 0.5.0?

The 0.5.0 release is the first major upgrade to the ReactFireMixin since its initial release. The API is still just as minimal, but a lot has changed under the hood.

The initial implementation of bindAsArray() was quite simplistic. It had poor performance and did not properly handle complex Firebase queries. The new implementation provides improved performance (especially on large data sets) and works well with all Firebase queries. Best of all, no changes to your code are required to enable these improvements.

Another major change with 0.5.0 is the addition of the .key attribute. ReactFire now adds the .key attribute to every record it creates via the bindAsArray() and bindAsObject() methods. In previous versions, it was impossible to retrieve key names for bound items. The 0.5.0 release fixes this by including the key name by adding a .key attribute to each bound item.

As an example, let's look again at the messages array from above. The resulting bound array stored in this.state.messages will be:

[
{
".key": "-JqpIO567aKezufthrn8", // New in version 0.5.0!
"uid": "barney",
"text": "Welcome to Bedrock City!"
},
{
".key": "-JqpIP5tIy-gMbdTmIg7", // New in version 0.5.0!
"uid": "fred",
"text": "Yabba dabba doo!"
}
]

The inclusion of .key makes it possible to easily write data back to Firebase to update, remove, or move a record in the array. All objects synced via bindAsObject() now include the .key attribute as well.

Finally, version 0.5.0 changes how primitive values (strings, numbers, booleans) are handled. As an example, say you have the following data in your Firebase database:

{
"foo": "bar"
}

If you call bindAsObject() on the /foo/ path, previous versions bound the value as a string "bar". As of today's 0.5.0 release, the bound object now looks like this:

{
".key": "foo",
".value": "bar"
}

You have access to the key that was bound to (.key) as well as the bound value (.value). Primitive values bound via bindAsArray() behave in the same way with the primitive value being stored in .value. Non-primitive values (that is, regular JavaScript objects) have not changed and behave in the same in all versions, except for the addition of .key.

Looking Forward

There is a lot of excitement in the React community about ES6+, Relay, GraphQL, and ReactNative. Discussions about these topics are even ongoing in the ReactFire GitHub repo. We are following the new announcements and technologies closely. Since we use React in production at Firebase, we want the two technologies to work as well as possible together.

We've found that using the vanilla React and Firebase libraries together works great and somewhat replaces the need for an application architecture like Flux. Things like ReactFire simplify development further by providing a shorthand for a lot of common use cases. And community contributions like the recently released re-baselibrary show how well Firebase can fit into new technologies like Relay. The future of a React + Firebase application tech stack is exciting and promising. The two technologies make it that much easier to build scalable apps in a fraction of the time they traditionally have taken. You can expect ReactFire to evolve alongside React over the course of the comings months.

Getting Started with ReactFire

The best place to get started with ReactFire is by heading over to the docs. We have a five minute quickstart, a guide which walks you through making an example app, and a full API reference with more examples of binding data via bindAsArray() and bindAsObject().

If you run across any bugs or have feature suggestions, please file them on GitHub. If you have questions about the API or how to build apps with ReactFire, post them on the Firebase Google Group.

We are excited to see what you create!

Share:

Wednesday, 17 June 2015

6 Tools to Make Your Design Business More Efficient

Whether you run a design agency or operate as a freelancer, you quickly learn the value of efficiency. The slower you and your team members are, the more time wasted on badly-designed processes, the less work you get done - and the less money you make. You want to make sure your dirty work is quick and easy, in order to clear more time for what actually matters. The good news are that you’ve got plenty of tools to help you do that. Here are six you’ll surely find useful.

6 Tools to Make Your Design Business More Efficient

Read more »
Share:

Friday, 29 May 2015

Announcing Mobile Offline Support

Jonny Dimond
Jonny Dimond
Core Developer

Have you ever had an app suddenly stop working when you lost your internet connection? Or perhaps you've opened an app you were using just minutes prior, only to find you have to re-download all of your data?

As a developer, you've likely tried to solve these pain points in your own apps, only to find the work required to be daunting. Wouldn't it be great if your database could just handle this for you automatically?

Firebase Offline to the Rescue

Today we're announcing a set of features for our iOS and Android SDKs that will allow you to build apps that work smoothly offline!

Our new SDKs support persisting your synchronized data to disk, so it's available immediately when your app starts. You can enable disk persistence with one line of code:


Firebase.getDefaultConfig().setPersistenceEnabled(true);

[Firebase defaultConfig].persistenceEnabled = YES;

Firebase.defaultConfig().persistenceEnabled = true

Our new SDKs now also let you specify data to be prefetched and kept up to date so that it will be available offline later if you need it. This keepSynced feature can be enabled on a per-path basis with one line of code:


ref.keepSynced(true);

[ref keepSynced:YES];

ref.keepSynced(true)

Built from the Beginning for Offline

The Firebase database uses synchronization rather than request / response to move data between client and server. All read and write operations happen against a local, on-device version of your database first. Then, data is pushed and pulled from our servers behind the scenes. This design has allowed the Firebase database to compensate for network latency -- local write operations are reflected by local reads before being acknowledged by the server.

It turns out, though, that this design is also essential to a high quality offline experience. By sending all reads and writes through a local version of the database, the Firebase SDK maintains the freedom to serve that data from the best source available -- whether that’s from the network or local disk. Later, when a network connection becomes available, our SDK automatically commits local operations to the server and pulls in the latest remote updates.

Offline gif

We designed Firebase for offline support from the very beginning, and we've been working on it for years. Citrix has been beta testing our offline support for its iOS app Talkboard since 2013. When you draw on a canvas in Talkboard, any updates you make while offline will be saved to disk and synchronized later when you reopen the app.

Getting Started

We've been working on these features for a long time, and we couldn't be more excited to see what you build with them! Getting started is easy -- just check out the offline section of our guides for iOS or Android. We also have offline drawing examples for iOS and Android that can help you get started quickly.

As you're coding, we'd love to hear what you think! Please share your feedback in our Google Group or mention @Firebase on Twitter.

Share: