Realm Blog

Realm Everywhere: The Realm Platform Reaches v2.0

by /

We’re pleased to announce the general availability of Realm Platform 2.0. It’s a major step in the evolution of Realm, and brings many new features and improvements that make it easier to build great mobile apps with modern, collaborative features. It’s also a name change, for us — reflecting the progress we’ve made towards running on every major mobile, server, and desktop platform.

Our goals for this 2.0 release are to make the Realm Platform even more useful, especially for the customer use cases we see most often: building offline-first features and apps, mobilizing legacy databases, coordinating RESTful backends, delivering real-time performance plus collaborative features, and moving the server closer to your users with edge computing.

Why Customers Use Us Today

With Realm, your users don’t see the spinning wheel of boredom while waiting for data. Thanks to our real-time data sync engine, you simply write the code that interacts with objects, and the Realm Platform gets that data where it needs to go. It’s what Thread Learning relies on to build software for autism educators that won’t leave any child behind.

Bringing full-featured offline functionality to apps used to mean endless battles with serialization and caching. But by building with Realm, Arccos and Cartasite have delivered offline-first apps that their users will always be able to rely on.

And when you’re building the mobile future but have to incorporate existing backends, Realm has been there to help developers with a RESTless interface for their legacy APIs, and plug-and-play data connectors that make even the biggest Postgres databases mobile-accessible.

Finally, Realm’s building the future of mobile at the edge. Our recently announced partnership with Ericsson will let us evolve the Realm Platform so that countless devices can flexibly connect, compute, and roam between networks, cell towers, and other points of access.

 

The Realm Object Server: Easier, Faster, and More Stable

To make it as easy as possible to deliver these great mobile experiences, we’ve got three big changes to announce for Realm Platform and Realm Database developers.

We’ve completely re-architected the Realm Object Server to make it more stable, scalable, and modular than ever before. And by moving to npm, it’s now easier than ever to install. To get a new server running, you just need to enter two lines in your terminal:

npm install realm-object-server -g
ros start

We’re also happy to announce our new universal developer tool: Realm Studio. It brings the powerful data exploration tools from Realm Browser together with the ease-of-use and universal access of the Realm Dashboard — so that all our users can use it, on any platform. Open local and synced Realms, manage users and permissions, and watch your server logs in a great desktop app. Today, we’re launching Realm Studio for macOS, Windows, and Linux.

We’ve made huge gains in stability and performance, too. Our Enterprise Edition customers can now benefit from High Availability, thanks to a new synchronous backup system with automatic failover. We’ve also introduced stable object IDs and log compaction to make syncing faster and more reliable than ever before, even after prolonged offline use. And by shrinking the core of the Realm Object Server, we make it easier than ever for you to add functionality to ROS, and to add ROS integrations to existing systems.

Bringing the Realm Platform to v2.0 means great apps are easier to make than ever before. Add offline-first design, real-time sync, and the ability to connect your legacy systems and databases with Realm, and see what your mobile future looks like.

Read more

The Rise of Kotlin and Other Mobile Dev Trends: Realm Report, Inaugural Edition

by /

With our growing community of over 100,000 active Realm developers, more than 3.5 billion installs on devices worldwide, and one of the mobile industry’s most popular content sources in Realm Academy, we have a unique point of view on the mobile development landscape. Today we’re publishing the first edition of the new Realm Report, a quarterly publication that draws upon that perspective to share data and insights covering the most interesting developments in the world of mobile dev. Our intention is to report on what’s happening with mobile development right now, and provide our predictions of where things are going in the future.

Topics for Realm Report will vary, but for the first edition, we’re diving deep into the geography of mobile, and showing that the rise of Kotlin is happening faster than you’d think. In the report you will learn about:

  • The current state of mobile development landscape
  • Kotlin’s current boom and seemingly inexorable path toward overtaking Java
  • iOS and Android development trends
  • And — take a guess — which country has the world’s most advanced mobile developers?

Is there something you’ve always wondered about the world of mobile dev? Let us know on social, and we’ll see about including those insights in our future editions.

Read more

Welcoming Ericsson Ventures as a New Strategic Investor

by /

Today we’re very excited to announce a strategic investment agreement with telecommunications giant Ericsson. As we’ve met with and come to know the teams at Ericsson, we’ve become admirers of their vision for the 5G and edge computing future. The success we’ve had to date working with mobile developers, and our own vision for how Realm’s database, synchronization, and serverless technologies enable the next generation of mobile and IoT apps makes the relationship with Ericsson perfectly complementary. The projects we’re working on together are very intriguing, and we’re looking forward to sharing more here in the near future.

Along with this investment from Ericsson, we’re also pleased to announce additional participation from our existing investors, Khosla Ventures and Scale Venture Partners.

Read more

Enterprise Leader, CI&T, Leverages Realm to Expand Their Clients’ Feature Portfolio

by /

Developers are usually happiest when they get to choose the app technologies they use on their projects. This is not always the case within a company. Often clients dictate the technology their agency uses and sometimes the agency gets to select or recommend technology choices to the client. At CI&T, a global digital solutions partner headquartered in New York with offices around the globe, developers have had the freedom to make these choices and implement their preferred technologies to solve their clients’ challenges.

CI&T has been the leader in lean digital transformation and high quality execution and helps fuel innovation within large enterprises. They have an impressive portfolio of clients, including Coca-Cola, Google, Johnson & Johnson and many more. And they employ over 2,500 digital business experts and engineers in 5 continents!

Their team in Brazil has been a long-time advocate of Realm and had the opportunity to propose using Realm Mobile Database in a recent project with a large Brazilian financial institution. The client closely monitors consumption and processing cost, so when CI&T proposed a new feature they got in touch with the mainframe team to run some tests. The results were heavily increased processing costs that would make the release of the new feature unfeasible. But the turning point was when CI&T’s development team noticed through proof of concept that using Realm as a caching layer would drastically reduce mainframe processing costs. The client approved the use of Realm as long as the proprietary framework encapsulated and managed all data access.

“Now that we have Realm set up, it is so much easier for us to explore new features and propose new use cases for our client’s applications.” Rafael Lobato, Systems Architect, CI&T

Once the client saw success using Realm as the caching mechanism, it became easier for CI&T to suggest other new features. The client is now using Realm on their flagship app.

“Our team is responsible for overall app strategy and guidance for new projects. We make suggestions on which frameworks the team uses and Core Data is not one of them.” Salmo Roberto da Silva Junior, iOS Developer, CI&T

What’s Next

The CI&T team is looking forward to trying out the Realm Mobile Platform, particularly the two‑way data sync and real-time collaboration features. Using Realm as the synchronization platform would open up endless opportunities on the feature front for their clients.

They are also planning to develop some documentation, examples and internal repos to show the broader CI&T team how Realm works and how they could quickly incorporate it into other client apps.

More about CI&T

CI&T, the digital technology solutions partner for the world’s biggest companies, is a pioneer at delivering speed-at-scale through the application of design thinking, lean methodologies and advanced tech, including Machine Learning/AI, Advanced Analytics, Cloud and Mobility. For over 20 years, CI&T has been a trusted partner for the most complex global engagements inside companies including Coca-Cola, Johnson & Johnson, AB-InBev, and Motorola. With over 2,500 digital business strategists, designers and engineers in the USA, Brazil, UK, Australia, Japan and China, CI&T is big enough to scale to the needs of Fortune 100 clients yet agile enough to achieve the speed-to-market today’s customers demand. For more information, visit www.ciandt.com.

Read more

Cartasite Delivers Industrial IoT with Realm Mobile Platform

by /

Offline-first app for heavy industries seamlessly syncs field data with backend systems

 

Two months is a lightning-fast timeframe to develop a mobile IoT system that includes data sync and offline-first capabilities at it’s core. Yet the CTO and engineering team at Cartasite took on the bold challenge of doing just that. Using Realm Mobile Platform, they not only met the deadline, but surpassed their original expectations. The team delivered a stable, field-ready system with a user experience that was so fast and fluid, it blew even their CEO’s mind.

It all started when one of Cartasite’s clients needed to build a new field management tool for their water hauling business. Using a sensor installed on water trucks, Cartasite designed an IoT solution that would automatically track a wide variety of measurements during transport, from point of collection to disposal. Their fieldFLOW system would make it easier and safer for drivers to report on their loads through a simple mobile application.

Fast development, fast UX on Realm

From the beginning, the Cartasite team wanted to replace their existing underlying database architecture to create a faster, smoother, offline-first user experience. They knew that Realm could help them quickly test ideas, so they decided to try a proof-of-concept using Realm Mobile Platform. The team and their CEO were so impressed with the speed and “magic” of Realm that they proceeded to build out their new product on the platform.

“The very first time we connected to the Realm Object Server, it just worked. Everything else from that point on was pretty much just rock solid.” Chris Chares, Senior Mobile Engineer, Cartasite

An easier way to ensure network resiliency

Offline functionality is critical for field operations, and Cartasite needed the fieldFLOW system to function seamlessly in unpredictable network conditions. Realm’s offline-first architecture enabled the team to meet their client’s needs without having to deal with massive amounts of networking code. Realm’s client-side database makes current app data always available to the end user, providing a great offline experience with data input and access, as well as UI features, such as autocomplete search.

“If Realm was just an offline database, then I’d be happy to never use Core Data again. But the syncing functionality of the Realm Object Server is really quite incredible.” Chris Chares, Senior Mobile Engineer, Cartasite

Automatic data synchronization across platforms

When network connectivity is restored, the Realm Mobile Platform instantly syncs data updates in the background without disrupting the user’s flow. The platform’s data synchronization capabilities enabled the Cartasite team to bypass the time-consuming tasks of building, testing, and debugging complex networking code. With Realm, testing was easy. The team was able to put a lot of their business logic into the model layer and quickly spin up in-memory Realms to test against.

“Synchronization code is a minefield of potential bugs, and I don’t think we’d have anywhere near the level of stability we have right now if we couldn’t lean on Realm to handle that for us.” Chris Chares, Senior Mobile Engineer, Cartasite

Realm’s cross-platform architecture saved Cartasite even more time by providing them with one set of schemas for iOS, Android, and JavaScript that really simplified the business logic, as well as only one central server to manage. This enabled the team to significantly streamline their code and further reduce development complexity.

“By adopting the Realm Mobile Platform, we were able to reduce our mobile application code by 40%.” Laura Thompson, Senior Software Engineer & Architect, Cartasite

On-time delivery, in partnership with Realm

During development, Cartasite was able to partner with Ream’s technical support engineers to troubleshoot issues quickly, helping them meet their ambitious delivery timeline. By the end of the project, Cartasite had discovered a kinship in Realm’s approach to customer collaboration, which mirrored their own organization-wide focus on customer success.

“We feel that our experience with Realm is the kind of experience that we try to share with our customers. So that’s been the most positive thing.” Bill Sinclair, CTO, Cartasite

Ultimately, the time saved by building with Realm was put to good use. The Cartasite team had the freedom to focus on designing and developing the best possible product for their client within an accelerated timeline. And a great product means time saved on the road with more efficient, safer hauling operations.

Read more

Introducing .NET Core Support for Realm

by /

Today we’re pleased to introduce .NET Core support on Realm. Developers can now build apps with Realm Mobile Platform using C# on both the client and server side for a complete end-to-end C# developer experience with Realm.

What is .NET Core?

.NET Core is the next evolution of the .NET platform, ideally suited to modern server-side development practices. With .NET Core, .NET developers can now build server-side apps that embrace the following requirements:

  • Cross platform (Linux, macOS, Windows)
  • Docker container support (as a result of .NET Core running on Linux)
  • Microservice architectures
  • High performance and scalable systems
  • Running apps side-by-side on the same server using different .NET versions
  • .NET Core uses many of the same .NET platform components as the .NET Framework so you can share code across the two.

.NET Core support for Realm

With Realm .NET Core support, you can now integrate Realm on the server backend using C#. (as an alternative to using our Node.js binding). Realm customers who specialize in .NET have expressed great interest in the addition of .NET Core support; these customers can now use a familiar framework while building the server-side components of their mobile apps. For instance, customers can now deploy scalable, Docker container-based microservices, all while using .NET and Realm. We’re excited to support this new framework because it represents a dramatic expansion in capabilities for our .NET community of developers who are interested in adopting the latest development practices.

By adding .NET Core support to the existing capabilities of the Realm Platform, it is also possible for an organization that prefers C# to use C# throughout their entire application supporting both client-side and server-side development. You can build cross-platform apps for iOS and Android using Xamarin while also using .NET Core on the server to integrate existing backend systems with Realm. The Realm Platform seamlessly two-way syncs data between the client devices—regardless of platform—and servers in realtime, allowing you to create a common data layer for your app. Our realtime two-way synchronization platform makes it easy to build modern reactive apps so that you can focus on creating a differentiated UX for your users.

“We love the simplicity of Realm and the speed of .NET Core; we’re excited that with Realm .NET Core support we can leverage both to bring the highest levels of performance to our backend microservices.” - Laura Thompson, Senior Software Engineer, Cartasite LLC

We want to make it easy for developers to work with the programming languages they are most comfortable with and the introduction of .NET Core support allows us to provide a complete end-to-end C# experience for our developer base.

If sync isn’t your fancy, Realm Database with .NET Core is also powerful tool. Now .NET developers have access to a performant and lightweight object database that works cross platform with .NET Core. You can easily deploy Realm as the standalone datastore for your apps built with .NET Core running on Windows, Linux, or macOS.

It’s easy to get started, it’s just like building for your Xamarin apps when you’re working with .NET Core. See Realm Xamarin documentation for more details.

We’re proud of what we’re shipping today, however, we have much more in store. In coming releases, we plan to launch the Global Notifier and the Data Adapter for .NET Core that will allow you to integrate event handling into your app and fault-tolerant data transfer with legacy database systems. Realm Mobile Platform Support for two-way data sync on Windows is also on the way. These additional features will be available in late 2017.

Read more

Realm Helps Integral Studio Bring their Creativity to Life

by /
Fast deployment, realtime experiences, creative flexibility

At the intersection of analog and digital lies a golden opportunity for musicians and their fans. Integral Studio is dedicated to bringing artists and audiences closer together and building one-on-one relationships through digital media. Based in Los Angeles, the digital management company is on the forefront of developing innovative mobile fan apps for the music world.

 

With a team of creative technologists, Integral Studio aims to build rich, reactive mobile user experiences that best represent each artist’s brand. In addition, the agency strives to deliver the hottest new content to fans as quickly as possible. Fundamental to making these possible is a smooth, fast flow of data between an ever-growing install base of apps and robust data storage on the backend.

Realm enables continuous creativity

Integral Studio’s founders needed technology solutions that gave them creative flexibility and helped them focus their lean team on innovation. When it came to data management, they wanted to avoid the headaches of setting up and maintaining their own database using a typical SQLite, ORM, or JSON solution. They found these to be slow and costly, requiring them to pour time, energy, and manpower into developing and maintaining a database that may not meet their performance requirements.

From the beginning, the company chose Realm Platform as their core data solution. Realm was robust enough to support their most creative ideas and power the snappy, fluid UX needed in their reactive apps. In addition, Realm Mobile Database was easy to integrate into app code and the Realm Object Server offered a centralized place to manage their client app portfolio.

“We use Realm Mobile Platform for all our data handling and management. It’s the core component that ties everything together. Realm is well-designed and easy to use—I couldn’t imagine having to build all the different pieces from scratch.”
Spencer Schoeben, CTO & Co-Founder, Integral Studio

Realm’s responsive, object-oriented database enables the team to realize their vision of providing a personalized experience for music fans. They can easily segment app users and push different content to individuals—a complex feature that would have otherwise been too difficult to accomplish. For example, artists are able to target those fans who attended a certain concert and provide exclusive or early access to such things as limited edition products and videos.

“Having objects represent data makes it super easy for me understand because I’m working with objects all the time. I can build out all of the logic for a local Realm, then add in the syncing… and it all just works as expected.
Megh Vakharia, CPO & Co-Founder, Integral Studio

Integral Studio can also quickly respond to client change requests, thanks to Realm’s flexibility and ease of use. This is especially important, as both artists and users want their app experience to be as current and dynamic as possible. Therefore, artists often provide spontaneous or changing directions to evolve their app’s features and content. In addition, Realm’s realtime functionality and scalability easily supports use cases that are impacted by heavy demand. For example, sometimes apps will offer popular new products that can sell out within seconds.

“Because we launched with Realm, I knew realtime would be easy going forward. So we’re able to bring new realtime features to products much sooner than I would have otherwise imagined.”
Spencer Schoeben, CTO & Co-Founder, Integral Studio

Ready to imagine the future with Realm

For Integral Studio’s creative team, Realm helps them stay innovative with every new project and push mobile experiences to the limits of their imagination. New ideas, such as single sign-on across artist apps or UI customization options, seem entirely possible for the maverick young startup. Integral Studio is confident that Realm’s flexibility will support any data-driven experience they can build, and that Realm Platform will seamlessly scale alongside the growth of their creative portfolio.

“I don’t have to worry about how things are going to be architected or built, I can just think without boundaries. With Realm at the center of our realtime data flow, we can plan ahead for things that we haven’t even thought about yet.”
Megh Vakharia, CPO & Co-Founder, Integral Studio

Read more

Keeping your edge as a mobile developer: Announcing Realm Academy

by /

At Realm, we consistently hear that one of the biggest challenges facing today’s developers is around keeping their edge. With the constant emergence and evolution of new languages and frameworks, best practices, technologies, and architectures, how can a busy professional dev keep up? The traditional methods for professional learning and inspiration—conferences, local meetups, and finding content across the web and social media—are great, but just aren’t enough. Despite requiring a big investment in time, money, and legwork, they still fall short at providing the depth and breadth of content pro devs really need.

Today, to help solve this problem, we’re launching Realm Academy, a new resource that brings together more than 850 pieces of unique developer content from the very best experts in mobile. These are highly practical videos, articles, and tutorials from top conferences, top authors, and community leaders who want to share what they know. We create and capture these at the highest quality levels, enhance them with transcripts and other features, and most importantly curate, organize, and publish them to make them easy to find, easy to use, and easy to share. The collection grows with new content published several times every week, and the features we are launching with today are just the beginning.

So, need to get up to speed on the hottest thing in Android dev, Kotlin? Take a look at the new Kotlin Learning Path, a set of eight pieces of content from experts like Donn Felker, Jake Wharton, and Hadi Hariri. Or maybe you want to get deeper on iOS programming paradigms? We’ve got a Learning Path that includes Natasha the Robot’s session on Practical Protocol-Oriented-Programming and Rob Napier on Functional Programming. And if you just want to browse the new sessions from AltConf 2017 or learn everything you need to know about MVVM, that’s easy too.

Getting the Most from Realm Academy

The home page is the launching off point to everything Realm Academy, and the place to check in on what’s new. At the top of the page, you’ll see links taking you off to major Academy sections organized around key categories, including platforms Android, Apple, JavaScript, and Xamarin, plus Realm of course; and focus areas like Architecture and Scaling. As you scroll the page, you’ll see content curated into both Topics and Learning Paths. Topics are collections of all related content, designed for browsing and serendipity—you can find an in-depth answer to a question, but you are as likely to be surprised and inspired by a best practice you didn’t know about before. Learning Paths are smaller and much more focussed—serial collections of content curated to take you point-by-point to a specific topical destination. You’ll also see content organized by event, so, for example, you can see in one place all the content from DroidCon Boston, TrySwift Tokyo, or other conferences.

We’ve got dozens of pieces of new content in process, and much more planned in terms of new Realm Academy features and enhancements, so we recommend checking back often. Or even better, sign up for the Realm Newsletter, which will bring you updates on Realm Academy, new content, and new mobile tech. You‘ll find a field for subscribing on every page.

Join the Realm Community

Realm Academy content comes out of our partnerships with some of the best developers and best developer conferences of the world, contributions from top members of the Realm community, and our own experts here at Realm. We’d love to feature your content too! Send your content contribution proposals—and any other thoughts—to the Realm Academy Team.

Read more

Realm ObjC & Swift 2.9: Set Permissions Based On Usernames, User Info Lookup & Bug Fixes!

by /

We’re releasing version 2.9 of Realm Objective‑C and Realm Swift today. In this release, we’re introducing a way to set permissions based on usernames, a way for administrators to retrieve user information from a Realm Object Server, various improvements, and applying a few bug fixes to keep your apps running strong.

Set Permissions Via Username

It’s now possible to set user permissions based on a user’s username, if they were registered using the Realm Object Server’s built-in username authentication system.

let permission = SyncPermissionValue(realmPath: realmPath,
                                     username: "[email protected]",
                                     accessLevel: .write)
user.applyPermission(permission) { error in
  // ...
}

Retrieving User Info

Administrator users can now look up the information of users on the Realm Object Server. If an administrator knows a user’s username, they can look up their Realm Object Server identity, which can be used to perform further administrative tasks.

let targetUserIdentity = "[email protected]"
adminUser.retrieveInfo(forUser: targetUserIdentity, identityProvider: .usernamePassword) { (userInfo, error) in
  guard let userInfo = userInfo else {
    return
  }
  print("The user's ROS identity is \(userInfo.identity)")
}

Sync User Improvements

It is now possible to create and log in multiple Realm Object Server users with the same identity if they originate from different servers. Note that if the URLs are different aliases for the same server each user will still be treated as separate (for example, they will each have their own copy of any synchronized Realm).

If you are creating users using the administrator token, we strongly recommend you specify an authentication server URL when calling the logIn() method. This server URL will become mandatory in a future release for all user types.

Other Enhancements

  • Performance for instantiating Swift objects containing at least one List property has been improved.

Bug Fixes

  • List.description now reports the correct types for nested lists.
  • Unmanaged object initialization when a nested property type returns false from Object.shouldIncludeInDefaultSchema() now works properly.
  • RLMArrays are no longer cleared on self-assignment.

Thanks for reading. Now go forth and build amazing apps with Realm! As always, we’re around on the Realm Forums, Stack Overflow, GitHub, or Twitter.

Read more

RealmContent: Add Real-time Updates to your iOS App in 5 Min

by /

 

Introduction

RealmContent coupled with the Realm Mobile Platform quickly gives the developers the ability to add new content into an iOS App by adding data directly into the Realm Browser app.

RealmContent automatically adds the Realm objects it needs into the app’s own schema and allows the developer to use a number of pre-configured View Controllers to list the available content and to render each of the content “pages”.

The component works mostly automatically while it allows for a lot of customization. It saves developers time and drudgery of implementing the underlying plumbing themselves or even having to roll out a completely new version of the app to change in-app content.

The library is the easiest and fastest way to push content in real-time to your complete user base.

How does it work? The technical crash-course

There are five easy steps to add a dynamic content management system to an iOS app.

1) Import RealmContent

Add RealmContent via CocoaPods or include the source files directly into your project. Then import both RealmSwift and RealmContent in a view controller:

import RealmSwift
import RealmContent

Your app would normally have a list of objects it syncs from the Realm Object Server. Once you import RealmContent it will expose two new models which Realm will add to your default schema: ContentPage and ContentElement.

If you’re using multiple Realm files, add ContentPage and ContentElement to the desired object schema.

2) Create a content list data source

To display a list of the available content in your app you can use the ContentListDataSource class that RealmContent provides you with:

let items = ContentListDataSource(style: .sectionsByTag)

Use .plain for a plain list or .sectionsByTag for a list with sections having the pages split by their tag property.

3) Initialize the data source

Call loadContent(from:) to set which realm file to use as the content source:

items.loadContent(from: try! Realm())

You can also have the data source automatically tell your table or collection view to reload the data whenever changes come in from the Realm Object Server (best option):

items.updating(view: tableView)

4) Implement your table view or collection view data source methods like usual, but fetch data from the content data source. The class offers few methods to do that like: numberOfSections, numberOfItemsIn(section:), titleForSection(section:), and itemAt(indexPath:).

This way you can implement your own table view or collection view data source methods and do any UI setup or other logic that you need. (For more detailed code sample check out the demo app in the RealmContent repo.)

5) Presenting a content “page”

Present a ContentViewController instance to display content. You can do this from a table/collection view tap delegate method, prepareForSegue(_:) method, or from an arbitrary piece of code.

Here’s an example of how would it work after a tap on a table cell:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  tableView.deselectRow(at: indexPath, animated: true)

  let item = items.itemAt(indexPath: indexPath)
  let vc = ContentViewController(page: item)

  navigationController!.pushViewController(vc, animated: true)
}

The presented view controller uses a table view to dynamically show the content from the given ContentPage element. In case you change the content remotely, the changes will be reflected in real-time on screen.

Dynamically add, edit, or remove content

The best aspect of using RealmContent is that you can modify the displayed content at any time - all changes will be synchronized in real-time to all connected users. (And upon connecting for all users who aren’t connected in this very moment of course.)

You can easily use the Realm Browser app to add or remove new pages, add, re-arrange, and otherwise modify blocks of content, and more. You can even change the accent color of your headings and links.

Editing content via Realm Browser

Try RealmContent now

The component is open source and you can find the source code and a demo app here: https://github.com/realm-demos/RealmContent.

The quickest way to try RealmContent in your app is via CocoaPods; add pod 'RealmContent' to your Podfile.

If you have an idea for a feature, want to report a bug, or would like to help us with feedback reach us on Twitter or create an issue on GitHub.

We’re excited to see how far are you going to push this component and the awesome dynamic apps you’re going to create with it!

Read more

Easy End-to-End Encryption: Introducing ZeroKit for Realm

by /

Realm is dedicated to helping you build great apps, and one of the ways we do that is by making it easier to work with the data that powers your apps. Instead of having to write (and maintain) fragile networking and serialization code, the Realm Mobile Platform handles that work automatically, making realtime data sync, sharing, and building server-side data features easy. And of course, we do it securely, offering HTTPS/TLS, AES-256 encryption at rest, and flexible access control features. You are freed to focus on the work that will matter to your users.

But for some apps and some use cases, you need a higher level of data security. That’s why we’re happy to announce end-to-end encryption, with Tresorit’s new ZeroKit SDK integration with the Realm Platform. Now you can easily build realtime, reactive apps that meet the standards required for handling healthcare, government, financial, and other highly sensitive data.

Understanding End-to-End Encryption

End-to-end encryption is the method of choice to protect data transmitted between devices. By encrypting data on the source device before transmission, man-in-the-middle attackers cannot decode the data if they capture it, even if the transmission route itself isn’t encrypted. Only the clients who share the crypto keys can access the information; no other sources potentially snooping traffic, including internet service providers, can see what information is contained within that data. Today, this is standard practice for encrypted chat apps like Signal, Threema, iMessage, and FaceTime.

The challenge is that end-to-end encryption requires a very extensive set of processes to implement, and that can eat up a ton of development time. And if they are not implemented and tested properly, it’s possible to leave flaws that attackers could exploit. End-to-end encryption isn’t impossible or broken—it’s just hard, and it’s important to do it right.

Tresorit + Realm Make It Easy

With the ZeroKit SDK integration for the Realm Mobile Platform, Tresorit built an exceptionally simple, secure, and scalable integration with Realm. Building on their depth of knowledge in building cloud security services, the ZeroKit SDK makes end-to-end encryption accessible to all development teams.

At the core of ZeroKit is an SDK that provides a secure user auth service with end-to-end encryption functionality. This enables the sharing of encrypted data between devices using a single user account and also any number of other accounts which have been granted access.

ZeroKit works on the principle of using the user account system to share encryption keys between client devices. When a new user is invited to view encrypted data from another user, an encryption key is shared in order to decrypt the data. If desired, the key can also be revoked, rendering the data once more inaccessible.

Instead of completely rewriting your backend, you can integrate ZeroKit into Realm without any trouble. Combining the best of both worlds, Tresorit has set up a way to use ZeroKit to perform end-to-end encryption in conjunction with the synchronization capabilities of the Realm Mobile Platform so that your data is end-to-end encrypted while synchronizing seamlessly, in realtime.

How It Works

How it works is actually quite simple. ZeroKit integrates itself with Realm via the Realm Mobile Platform’s ability to allow third-party services to authenticate synchronization sessions. When a user logs into Realm, they use their ZeroKit credentials, which identifies them as a unique user to the Realm Mobile Platform. Once logged in, the encryption keys for that account are made available on that device throughout the user’s login session.

Tresorit diagram

After login, each time a set of data is to be saved, the developer calls a ZeroKit API to encrypt the data on the device. Behind the scenes, ZeroKit stores and uses the keys generated for the current Realm, so that developers don’t have to deal with the complexity of crypto. The encrypted data is then saved to Realm where the information cannot be read successfully by any attacker or even the server itself. To decrypt the data, the same process is repeated in reverse. If the logged-in user has access to the keychain (“tresor”) associated with the Realm, data will be seamlessly decrypted.

To share data with other user accounts, you can combine Realm’s and ZeroKit’s share permissions features. This requires Realm to share the required data and Tresorit to share the appropriate key to decrypt it. The guest user can now read the data with both components. You can also revoke the encryption key, meaning that even if the Realm data file lingers on the guest user’s disk, the information is rendered inaccessible.

In this way, Realm is able to synchronize data out in the open and absolutely nothing in Realm’s stack, or the infrastructure it is run on, is in charge of the encryption. What’s even more exciting is that ZeroKit was built in a way that even Tresorit doesn’t have access to the keys because they are stored encrypted with a secret derived from the ZeroKit user’s password. And Tresorit doesn’t have access to the password either: this is what they call “zero knowledge” service. ZeroKit uses Augmented Password-authenticated Key Agreement (APAKE) protocols to achieve this.

Although end-to-end encryption is all about client-side data access with servers that can’t decrypt data, you don’t have to encrypt everything this way. You can decide to only encrypt sensitive data end-to-end; the rest, you can access on your Realm Object Server. However, if you still need to access encrypted data on the server, you can use ZeroKit’s Node SDK, which enables you to log in a ZeroKit user on the server. Storing the password of this special server user is a task you need to plan carefully though, or ask the Tresorit team’s advice on best practices using Hardware Security Modules and other tricks to keep your product secure.

Combining Realm and Tresorit’s solutions is exceptionally advantageous for use cases requiring enhanced security. In order to compromise data in this architecture, an attacker must both compromise your data and separately steal the keys from every single user, one by one, on their client devices to decrypt it. It’s really fantastic for Tresorit to show us how easy it was to integrate their services into our own, and together, they provide a level of security that is absolutely unparalleled.

The solution is ready for you to experiment with today, just remember you’ll need to do a few more steps before taking the end product into live production to ensure your users’ privacy: for example writing code to validate your users’ email/phone number after registration and arranging certs on your servers. Details are covered in ZeroKit’s documentation.

If you’re building an app dealing with highly sensitive data, we definitely recommend you check out ZeroKit and give it a try!

Read more

Realm Java 3.4 - Reverse Relationship Queries and Sync Progress Listeners

by /

We’re releasing version 3.4 of Realm Java today, and with it introducing reverse relationship queries and sync progress listeners. Read on for all the details.

Reverse Relationship Queries

In Realm Java 3.1 we added beta support for reverse relationships using the @LinkingObjects annotation. In 3.4 we are making it possible to query those relationships as you would with a normal RealmList or RealmObject reference:

public class Person extends RealmObject {
   public String name;
   public Dog dog;
}
 
public class Dog extends RealmObject {
   public String name;
   @LinkingObjects
   public final RealmResults<Person> owners = null;
}
 
// Query for owner as you would a RealmList
Person owner = realm.where(Dog.class).equalTo("owners.name", "Jane").findFirst();

Queries on @LinkingObjects work the same way as Link Queries on RealmLists and with this change we are considering @LinkingObjects stable, and are moving them out of beta.

Sync Progress Listeners

Realm Mobile Platform offers a true offline-first experience, where changes can be applied immediately to the local Realm irrelevant of the network conditions. In the background, synchronization happens automatically, and when the network is available, changes quickly propagate across devices and the server. This enables the realtime, collaborative experiences unique to Realm.

There are times, however, when it’s useful to know how much data is left to transfer. Perhaps on the first launch of your app, you’d like to make sure a sizable amount of the data is available before presenting your user interface. At other times, your app will simply benefit from showing when data is synchronizing, by presenting a progress bar or activity indicator.

This is why we’ve added APIs to monitor sync progress by registering ProgressListeners on the SyncSession.

Realm realm = Realm.getInstance(config)
writeData(realm);
SyncSession session = SyncManager.getSession(config);
 
// Show progress bar while waiting for an image you just wrote to the Realm
// to be uploaded
showProgressBar();
session.addUploadProgressListener(ProgressMode.CURRENT_CHANGES, new ProgressListener() {
   @Override
   public void onChange(Progress progress) {
       if (progress.isTransferComplete()) {
           hideProgressBar();
           session.removeProgressListener(this);
       } else {
           updateProgressBar(progress.getFractionTransferred());
       }
   }
});
 
// Show a UI hint as long as you are downloading data from the remote server
session.addDownloadProgressListener(ProgressMode.INDEFINITELY, new ProgressListener() {
   @Override
   public void onChange(Progress progress) {
       showDownloadingChanges(!progress.isTransferComplete());
   }
});

Note, that currently progress listeners can only be registered if a Realm instance is open.

See the CHANGELOG for the full list of changes.


Thanks for reading. Now go forth and build amazing apps with Realm! As always, we’re around on Stack Overflow, GitHub, or Twitter.

Read more

Bringing Education into the Digital Age with Realm

by /
Thread Learning: Coordinated Autism Education Powered by Realtime Data Sync and Offline-first Capabilities

Each day, special education teachers manually track thousands of data points related to student progress. At the end of the day, they graph that data with a ruler and analyze the results. The process is incredibly cumbersome and time consuming, and paper-based data has significant limitations.

 

Thread Learning is advancing the way that teachers, parents, and therapists educate children with special needs and autism. Thread Learning’s behavioral data collection platform allows caregivers to record student data using an iPad. The platform then automatically graphs and analyzes the data, provides quality control, and shares the results with all members of a child’s care team, including parents.

Armed with electronic data, a caregiver team can more efficiently coordinate the work of all members to better serve the needs of the student. For example, a child may be working on speech skills with three classroom teachers, as well as a speech therapist and behavioral analyst after school. Thread Learning syncs data in realtime across all team member devices. More informed caregivers means better quality instruction and improved student outcomes.

Building a Coordinated Care Platform

To deliver on their vision of coordinated care, Thread Learning needed a data handling solution that could allow caregiver teams to collaborate in realtime. One of the co-founders was exposed to Realm in a graduate school computer science class. He recognized its potential to enable advanced features that would otherwise be impossible to implement as a nascent startup.

“Realm really helped accelerate our development timeline. We were up and running in weeks instead of months.”
- Sam Raudabaugh, Co-Founder & CTO, Thread Learning

The Thread Learning team initially developed their app using the Realm Mobile Database. This allowed them to bypass the typical headaches of MySQL and an ORM, as well as the technical and resource debt that comes with non-object oriented data solutions.

After the Realm Mobile Platform was released, the Thread Learning team found it a natural progression to explore its more robust data handling and realtime synchronization capabilities. They had been using a REST API to handle data flows, but Realm’s data sync capabilities offered a much better solution. Two-way data synchronization enables a team of caregivers to work simultaneously on the same set of data in realtime.

“We tested Realm against our REST API and the results were impressive.”
- Sam Raudabaugh, Co-Founder & CTO, Thread Learning

Offline-First, Simplified

As school WiFi networks are often unreliable, Thread Learning also needed robust offline capabilities, so that caregivers could still input and access data regardless of connectivity. One of the founders’ early mentors had advised them to avoid offline functionality entirely because it’s “too hard and complicated.” However, the Realm Mobile Platform enables Thread Learning to easily handle networking complexities, such as data updates and conflict resolution, without the issues that typically arise with REST APIs.

Because data loss has historically been a big issue with paper-based processes, Thread Learning especially appreciated Realm’s built-in support for offline-first use cases. With Realm’s client-side database, all app data is stored locally and remains fully accessible when offline, providing a continuous, responsive offline user experience. When connectivity is restored, updates are automatically synced with the Realm Object Server and across all care team devices. Realm’s conflict resolution capabilities ensure that data is always up to date.

“With Realm, we don’t have to worry about what happens when devices go offline and data conflicts happen.”
- Gregory Brill, Co-Founder & CEO, Thread Learning

As the Thread Learning team works on evolving their platform, Realm’s transparency around new feature development helps them plan their own feature roadmap. This helps them better manage their growth and support their mission to serve 1m+ autistic children in the U.S. within the next five years.

“Realm allows us to leapfrog the competition.”
- Gregory Brill, Co-Founder & CEO, Thread Learning

Read more

Realm Events at WWDC 2017

by /

WWDC Week is coming and Realm is planning another week filled with WWDC Events!

Join Realm in San Jose and San Francisco for a variety of events. If you are in town we hope you will join us, and if you are not, tune in on Facebook and Twitter for our second year of “Realm Live from WWDC”. Whether you have tickets to the conference or are in town for other events, we have something planned for you.

  • Keynote Viewing Party: Come see the keynote live streamed at Realm HQ in San Francisco.
  • WWDC Bingo: Play an epic game of WWDC Bingo, powered by Realm, at the Realm viewing party, live at the keynote, or from the comfort of your own home. (Details and app coming soon)
  • Swift Panel: We’re hosting a panel discussion on the second night of the conference in San Jose (Details and registration below - location: Westin San Jose - Across from WWDC and AltConf).
  • WWDC Live @ AltConf: See interviews with WWDC & AltConf attendees, as well as live streams of a variety of AltConf Sessions. Check back for a full schedule.
  • Realm World Tour - San Jose: Join us as we continue the Realm World Tour in San Jose and announce new locations for the Summer!

Keynote Viewing Party

Just because you don’t have tickets to the conference, doesn’t mean you have to watch the Keynote alone. Come by Realm Headquarters in San Francisco for a viewing party, and join other developers as well as the Realm Team to watch the Keynote together. We’ll have brunchy bites and drinks.

When: Monday June 5th, 2017 @ 10am

Where: Realm Headquarters: 148 Townsend St, San Francisco, CA 94107

  • 9am: Doors open! Mix & mingle and grab some breakfast and drinks.
  • 10am: Keynote + WWDC Bingo.
  • Afterwards: Mix and mingle some more and grab a Realm t-shirt on your way out.

RSVP: Reserve your spot!

Swift Panel

Join Chris Lattner, Jesse Squires, Kamilah Taylor and Kevin Ballard as Realm’s JP Simard moderates this panel-style discussion on everything Swift.

When: Tuesday June 6th, 2017 @ 6pm

Where: Westin San Jose 302 S Market St San Jose, CA 95113

  • 6pm: Doors open! Mix & mingle among your fellow Swifters. Drinks and light snacks provided.
  • 7pm: Panel + Q&A.
  • Afterwards: Stay and chat with our panelists, mix and mingle some more.

*IMPORTANT: Capacity for this event is limited. RSVPs are required to attend and will be FIRST COME FIRST SERVED for the first 100 people at the door by 6pm.

RSVP: Reserve your spot!

Realm World Tour - San Jose

We just closed out the first leg of our Realm World Tour (See the highlights), and it was awesome! But we didn’t make it to San Jose, so we are kicking off the second leg of our Realm World Tour during WWDC week. You’ll be able to connect with Realm users who are in town from all over the world, see live Realm demo’s, & learn more about our newly launched Realm Mobile Platform.

When: Wednesday, June 7, 2017

Where: Westin San Jose 302 S Market St San Jose, CA 95113

RSVP: https://realmworldtoursanjose.eventbrite.com

Read more

Announcing Realm World Tour - The Encore!

by /

Whew! After traveling across 23 cities in less than 2 months in February and March we had to take a little breather.

But now we are back in action and sending more of our top product engineers out across the globe to bring the Realm Platform to you live!

We’ve reached out to leaders of the developer communities in each city, and with their help as local hosts, have planned a great evening for attendees. Each event includes an introduction to the free Developer Edition plus discussion of some of the advanced features, followed by sample code, practical demos, and extensive technical Q&A session — all led by a Realm product engineer. There will also be plenty of time to talk one-to-one, to share best practices, and to learn from each other. And, we’ll have some special attendees-only limited edition Realm swag to give out!

realm-world-tour-facebook We are starting off this leg of the tour in San Jose followed by another stop in Seoul, then onto Toronto, Denver and Atlanta, and adding MORE cities as we go. You can see other stops on the tour here.

Want us to come to you? If you want us to stop in YOUR city, tweet @Realm with hashtag #Realmworldtour and #cityname. We will be tallying votes throughout the tour, so get your friends to vote too! **Bonus points if you hook us up with a local meetup group or host location! ;)

We hope to see you!

The Realm World Tour events are free, but space is limited — check out the official web page for the latest info and chance to register.

Read more

Get more development news like this