Secure Your App, One Class at a Time

Security is one of the most critical aspects of releasing a production app, and with Parse there are lots of ways you can secure your app. As Bryan laid out in his 5-part security series, Parse provides a powerful security toolset, including the master key, Access Control Lists (ACLs), Class-Level Permissions (CLPs), and Cloud Code. Every successful production app uses some features out of this toolset, and we are always working to improve its ease of use for Parse developers to take advantage of these effective tools. A few months ago, we released an updated ACL editor, making it much easier to view and edit ACLs in the data browser. Today we are releasing a new and improved CLP editor, so you can view and edit your app’s Class-Level Permissions just as easily as its object-level ACLs!

Just like ACLs, CLPs are lists of users or roles that can access a specific class of your app. As with ACLs, you can give each user/role read or write access. Let’s see how this works in an example. Say we have a restaurant app, with a Restaurant class. To edit the CLPs for the Restaurant class, click the ‘Security’ button at the top of the data browser. This will open the new CLP editor, and you will notice that the default permissions for every class is public read and write (with some exceptions).

Screenshot 2015-02-10 20.35.50

You may notice that this looks strikingly familiar to the ACL editor. Right now the Restaurants are completely public, meaning that any user of the app can see every Restaurant, and can change every Restaurant. We probably don’t want Restaurants to be completely public, because then any user could just delete all the Restaurants in the database and our app wouldn’t do much after that. So, let’s disable public writes.

Screenshot 2015-02-10 20.42.18

Now any user can see all the Restaurants, but nobody can change any Restaurants (without the master key). But maybe I want my own user to be able to create new Restaurants, or update old ones. I can add my user to the CLP editor by typing in my username or objectId, and allow writes for that user by clicking the “Write” checkbox.

Screenshot 2015-02-10 20.48.07

Now the jamie user can do whatever he wants with all of the objects in the Restaurant class, while no one else can write to this class. But maybe there are some other users that should be able to write to this class, and I don’t want to keep adding each user one-by-one. Let’s use a role, which we’ve named admin . First we add all the users we want to have write access to the admin role, then we type the role name into the next row, and finally we enable write access by clicking on the “Write” checkbox.

Screenshot 2015-02-10 20.59.40

Any user in the admin role can now make changes to the Restaurant class. But what if we want to let some other group of users – those in the chef role – add new Restaurants, but not be able to edit existing Restaurants? To do that, we first click the settings gear at the top-right of the editor, and switch to the “Advanced” mode of the editor. In the advanced mode we can set more specific permissions on the class for different request types.

Screenshot 2015-02-11 16.28.18

There are 6 types of permissions you can manage in the CLP editor, based on the different types of requests you can make to Parse. We group these permissions into “Read” and “Write” categories, with the exception of “Add Field”.

  • Read:
    • Get — With Get permissions enabled, users can fetch objects in this class if they know their objectIds.
    • Find — Anyone with Find permissions enabled can query all of the objects in the class, even if they don’t know their objectIds. Any table with public Find permissions will be completely readable by the public, unless you put an ACL on each object. (with some exceptions)
  • Write:
    • Update — Anyone with Update permissions enabled can modify the fields of any object in the class. For publicly readable data, such as game levels or assets, you should disable this permission.
    • Create — Like Update, anyone with Create permissions enabled can create new objects of a class. As with the Update permission, you’ll probably want to turn this off for publicly readable data.
    • Delete — With this permission enabled, users can delete any object in the class. All they need is its objectId.
  • Add Field — Parse classes have schemas that are inferred when objects are created. While you’re developing your app, this is great, because you can add a new field to your object without having to make any changes on the backend. But once you ship your app, it’s very rare to need to add new fields to your classes automatically. So you should just about always turn off this permission for all of your classes when you submit your app to the public.

Going back to our example, we wanted to ensure that all users in the chef role could create Restaurants, but we don’t want them to be able to update or delete any existing restaurants. To accomplish this we simply add a row for the chef role, and check “Create”.

Screenshot 2015-02-11 16.27.43

We could add permissions for any of the other types of requests in just the same way. CLPs are an extremely powerful tool for quickly and easily securing your app. But before you add a bunch of CLPs to your app, make sure you understand how CLPs and ACLs interact with each other.

We are excited to continue giving Parse developers better ways to secure their apps, and we hope this helps you launch safer, more secure production apps! Go check out the new editor in the data browser, and as always, let us know what you think!

Jamie
February 23, 2015

The League Meets Its Backend Match in Parse

The League

Billed by the New York Times to be “the dating app for would-be power couples,” The League is paving the way for a new approach to dating.  In today’s dating climate, sorting through the noise can be both tiring and frustrating.  For The League, a focus on privacy and preferences is the top priority–and hugely desired by its users.  The League’s users provide information via Facebook and LinkedIn, allowing the app to protect them from their immediate personal and social networks while simultaneously identifying great potential matches who are “in their league.”  Each day, users are shown only five potential matches–but each chosen from the more highly selective community that constitutes The League’s membership.

To offer the best in privacy and in truly suitable matches, The League needed a robust mobile backend solution to power its heavy traffic.  Having made a splash in Forbes, The Tonight Show, and more, The League was faced with a huge influx of interest, and Parse was key to fielding that interest smoothly.

Not only was Parse helpful in handling signup peaks, it was also exceptionally simple for the team to implement.  According to Derrick Staten, the League’s founding engineer:

Parse is highly reliable, available, and predictable.  It allows query building in our native mobile languages.  We’ve been able to modify our database schema on the fly…and we never had to take the app offline or perform a migration.

As signups continue to grow, The League sought different solutions to manage the onboarding of new members.  A waitlist and referral system was implemented with the use of Branch.  Using Branch’s drop-in referral backend and contextual deep links, The League was able to build a full referral program and waitlist solution in hours.  This led to a 31 percent increase in conversion to signup for referred users.  As more and more new members joined the service, Parse continued to power the interaction between them with The League’s chat interface.  As Staten puts it:

While some apps struggle for months or years to build a chat interface for users, with Parse we have spent less than two weeks on it during our four months of building.

Parse’s ease-of-use has proved useful not only during the development process of The League’s chat interface.  Its unique simplicity has also been effective for prototyping, data storage, and more:

It is incredibly easy to use, even for first-time developers.  When prototyping and testing, the ability to effortlessly edit the cloud database in real time via the browser is a godsend.

The League is available for download now on the App Store.

Nancy Xiao
February 5, 2015

Announcing F8 2015

F8 2015This spring, Facebook’s F8 conference is coming to San Francisco’s Fort Mason for a jam-packed two days of technical talks and hands-on sessions. We’re excited to be a big part of this event, and to invite you, the members of our community to join us on March 25 and 26, 2015.

We have many new announcements we’re excited to share with you and you’ll have the chance to hear from us directly at several sessions throughout the event. Plus, don’t miss out on spending time with the team–Parse engineers will be available throughout both days to provide one-on-one help and advice. We had a blast last year meeting more than 1,500 mobile and web developers from all over the world and can’t wait to meet even more of you this year.

If you can’t attend in person, we’ll stream the keynote and other sessions, plus spotlight live interviews from the show floor. Sign up now for the stream in order to stay informed leading up to the event and get exclusive content only for people attending F8 online.

Registration is now open. We’ll see you there!

Nancy Xiao
January 27, 2015

Voltage Entertainment Launches Another Hit With Parse

Queen's Gambit

In the latest visual novel game from Voltage Entertainment, Queen’s Gambit follows the life of a high profile super spy who excels at everything she does. Her newest mission, however, challenges her on an entirely different level–in love.

Headquartered in Tokyo, Japan, Voltage Entertainment’s apps have achieved significant success across the globe. The team’s hits have topped charts in the United States, Japan, and 46 other countries. Voltage is a pioneer of interactive romance novel apps aimed at women, and amongst the leading app publishers globally on iOS and Android as measured by revenue.

Developing Queen’s Gambit presented a unique challenge for the Voltage team. They were faced with constrained resources, and the roller coaster ride of using a new game engine. In addition, their proprietary internal push tool was cumbersome to use and incapable of segmenting messages based on users’ profiles.

With the use of Parse, many of these challenges were alleviated. Parse’s ease of integration and powerful push capabilities played an integral role in bringing Queen’s Gambit to life.

Shino Imao, Global Marketing Strategist from Voltage describes how Parse helped the team:

In the development of Queen’s Gambit, our latest romance app, the engineering team had to focus on our brand new engine, so they could not spare a single moment for any extensive requests the marketing team wanted to implement. Parse was exceptional. We used Parse Push to deliver periodical, segmented reminder notifications to bring users back to the game.

Shino and team also appreciated the ease of use of Parse:

Our team was so surprised at how easy the SDK integration and channel configuration was. Free and easy (really almost no time spent)—these were key benefits for our management and engineering teams. Otherwise, we just could not have done it.

Queen’s Gambit is now available on iOS and Android. Find out more about the adventure here.

Devin Cheevers
January 21, 2015

Best of Parse 2014

In the last year, the Parse team has been incredibly excited to see our developer community grow at a tremendous rate. Not only has our community itself grown, but Parse developers have built some of the most celebrated and successful apps of 2014.

We’re happy to share the accomplishments of these apps—many of them earning spots on awards lists, top charts, and more. In fact, 10% of Google’s top Android Apps of 2014 and 10% of Apple’s top iOS Apps of 2014 use Parse. Starting today, you can view a wide variety of these apps on our brand new Customers page. Check them out, and get inspired!

Here are a few of our favorite Parse apps of 2014:

  • 80 Days incorporates adventure and exploration for a thrilling gaming experience. It has been named Time’s #1 Game of the Year and one of Apple’s Top Apps of 2014 (Europe)
  • Replay, a video editor for Instagram, has reached over 4 million users creating photo and video experiences every day (Europe)
  • Dubsmash is topping the charts in multiple countries with its addictively viral communication app. Users can choose a famous quote, record a video on it, and share the video with friends (Europe)
  • Mileage tracking has never been easier with MileIQ, the top grossing finance app in the App Store (Americas)
  • Named winner of the Knight News Challenge from the Knight Foundation, Watchup is one of Google’s Best Android Apps of 2014. Users can choose the newscasts that matter the most to them, creating a unique video newsreel from international, local, and national channels (Americas)
  • With over 5 million members, Craftsy brings its online courses straight to mobile with iPhone and Android apps. Named one of Google’s Best Android Apps of 2014, hundreds of classes across categories like Sewing & Quilting, Cake & Cooking, and more (Americas)
  • KLab’s Crystal Fantasia app crushed the charts within days of landing in app stores. A wildly popular RPG game, Crystal Fantasia soared to Japan’s top 5 downloaded apps within 5 days of launch (Asia Pacific)
  • Myntra is India’s largest online fashion and lifestyle store, offering over 1000 brands and 1,000,000 product styles (Asia Pacific)
  • Mixi, the highly popular social networking site in Japan, has branched out its ways of connecting people with Nohana—a photobook creation app powered by Parse. Over 100,000 photobooks have been published to date, and users have uploaded over 4 million photos (Asia Pacific)

We hope you enjoy the many fun experiences and essential services that Parse apps around the world have to offer. And, to our community—we are continually blown away by the great apps you build every day. Here’s to another creative and wild year ahead!

Nancy Xiao
December 23, 2014

Using Parse to Power Up Your Framer Prototypes (Part I)

Morpheus

At Parse, prototyping plays a crucial part of how we craft our products. Read on for a great tutorial to make your prototypes as realistic as possible with the help of Framer. Brought to you by our resident design expert, George Kedenburg III, and originally posted here on Medium.

Have you ever wished your prototypes could be just a bit more realistic? Are you tired of prototypes resetting back to their initial state when you close them? Maybe you just want an easier way to integrate real data without dealing with obnoxious blobs of JSON.

In this series of tutorials, I’m going to be exploring some interesting use cases for integrating Parse with Framer. Hopefully they’ll help you think of new ways to use data to enhance your own prototypes with the awesome power of a real mobile backend.

In this first guide, we’re just going to go through some basic things you can do with Parse. We’ll set you up with an account, create your first app, set up a class full of data, and then pull that in to the prototype. We’ll also link up a simple “like” interaction that will save data back to Parse.

Our app concept is simple: we just want to display a list of locations (that have their own background images) and store a total like count per location.

Play with the completed prototype


What is Parse?

Let’s take a step back. Parse is a cloud platform that lets app developers quickly and easily integrate a lot of complicated, scalable server-side functionality into their products.

Parse has three main products:

CoreStore data and run code on a remote server.

PushSend push notifications to your users via an API or the web composer.

AnalyticsTrack events in your app and gain valuable insights.

It’s important to note that Parse is built for real, production-level apps — so it has a lot of power under the hood. Thankfully, it also has a simple and easy-to-use API and a JavaScript SDK, so it’s the perfect addition to Framer prototypes. With Parse + Framer, you’ll be able to do almost anything: read and save data, create users and let them log in, remember app states, track events, and so much more.

Seriously, look at the documentation — you can do pretty much anything.


Let’s get started

 Screen Shot 2014-12-16 at 9.32.38 AM

Get an account

In order to use Parse, you’ll need an account. Head over to parse.com and click the “Sign up” button in the top right. Create your account with an email and password, and name your first app (“Framer Prototype” is a good choice, but feel free to name it whatever you like). If you’re just doing simple data storage, you can use the same app for as many prototypes as you want. If you end up using more of what Parse has to offer, you may want to create a new app for each prototype.

Screen Shot 2014-12-15 at 3.18.58 PM

Grab your keys

From your Parse dashboard, hover over the gear icon and click keys. We’ll only be using the Application ID and the JavaScript Key so feel free to copy them somewhere easy to get to (like an empty text file) or just leave this page open in another tab. Keys are unique strings of characters that act as your password when communicating with Parse. It tells Parse what app you’re trying to connect to, and proves that you are allowed to make that connection.

Plan your data

We’ll need some data to pull in to our prototype. Looking at the designs, we’ll probably need a city, a state, a like count, and an image URL. It also might be nice to have a way to toggle certain locations on and off. It’s important to think through this as best as you can before you start prototyping to prevent any messy data issues.

There are a few different special types of data that you can store in Parse. It’s important to make sure you choose the right one for each field. Here are the most common data types you might use in prototyping:

String:
Any kind of text. Whatever you put here is exactly what you’ll get back. We’ll use this type for the city, state and image URL.

Number:
This type is specific for numbers. Using this allows you to do math operations with out any kind of type conversion. We’ll use this type to track the like count in our prototype.

Boolean:
This can be either true or false. It’s helpful for toggles and states. We’ll use this to determine if a location is shown or hidden.

Create your class

In Parse, a set of data is called a class. This is very similar to a sheet in your favorite spreadsheet app. From your dashboard, hover over the app and click on “Core” at the bottom. This will take you to the Parse data browser.

Here, we’re going to create a new class called “Locations” and add columns for the different types of data that we planned for. Once you’ve created the class, click the “+ Col” button to add a new column (remember to use the right types that we defined in the previous step). Once you’ve made all the right columns, go ahead and add some rows of data. Here’s a screenshot of the complete class I made for this example:

Note: Column names are case-sensitive, so be sure you are consistent. I prefer to use camel case (i.e. likeCount vs LikeCount) and that is how the code in this guide is written.

You can see the data is pretty straight forward. If you’ve ever used any kind of spreadsheet application, this will feel very familiar. The only columns you really need to worry about with prototypes are the ones you’ve created. You can safely ignore all the Parse columns (like objectId, createdAt, etc.).

For the images, all I’ve done is dropped in a direct link to some photos from Instagram. If you want to use your own images, you can use something likeImgur or even just a public Dropbox folder. I’ve also preset a couple like counts, but you could leave these as all zeroes too.

(this is where the magic happens)

Integrate with Framer

If you’re in a rush and want to save some time you can download this blank Parse + Framer template that has the Parse SDK pre-installed and skip to the next step.

Now that we’ve got a class and some data, we can finally start our Framer integration! Luckily, this part is super easy. Start a new Framer Studio project and paste in this code:

# Initialize Parse with the app keys corresponding to your app
Parse.initialize("APPLICATION ID", "JAVASCRIPT KEY");

# Write your Framer Code below this
success = new BackgroundLayer backgroundColor: 'green'

Now you’re probably getting an error in Framer Studio, which is OK. This is because Framer doesn’t know what Parse is yet. We have to add the Parse JavaScript SDK to the index file for your Framer project.   Save your project and close it. Open up Finder, navigate to where your project is, and click on it. You should see something like this:       Open up the “index.html” file in your favorite code editor (I preferBrackets) and add this line as the first script in the script block:

<script src=”https://www.parsecdn.com/js/parse-1.3.2.min.js"></script>

Your index file should look like this now:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		
		<meta name="format-detection" content="telephone=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
		<meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.5, maximum-scale=0.5, user-scalable=no">

		<link rel="apple-touch-icon" href="framer/images/icon-120.png">
		<link rel="apple-touch-icon" href="framer/images/icon-76.png" sizes="76x76">
		<link rel="apple-touch-icon" href="framer/images/icon-120.png" sizes="120x120">
		<link rel="apple-touch-icon" href="framer/images/icon-152.png" sizes="152x152">

		<link rel="stylesheet" type="text/css" href="framer/style.css">

		<script src="https://www.parsecdn.com/js/parse-1.3.2.min.js"></script>
		<script src="framer/coffee-script.js"></script>
		<script src="framer/framer.js"></script>
		<script src="framer/framer.generated.js"></script>
		<script src="framer/init.js"></script>

	</head>
	<body>
	</body>
</html>

Once you’ve added the line, save the file and close it. Now re-open your project in Framer Studio, and your device should have a green screen. Congrats, you’ve successfully initialized your Parse app!

Write a query

Everything in Parse that relates to reading data is centered around the query. Luckily, queries are pretty easy to write and it’s a piece of cake to sift through the data you get back. Let’s get our list of locations from the class we made earlier:

# Initialize Parse with the app keys corresponding to your app
Parse.initialize("APPLICATION ID", "JAVASCRIPT KEY");

# create an object that extends the class you want to pull data from
Locations = Parse.Object.extend("Locations")

# create a query against the object you just created
queryLocations = new Parse.Query(Locations)

# we're looking for rows that have show set to true
queryLocations.equalTo "show", true

# we're going to sort the response by state and then by city
queryLocations.ascending "state", "city"

# now we actually run the query and get back results
queryLocations.find
	success: (results) ->
		# if the query is a success, we'll get back a results object. 
		# this for loop lets us do something to each result in that larger "results" object
		for result, i in results
			location = new Layer width: 750, height: 300, y: 300 * i
			location.html = result.attributes.city + ", " + result.attributes.state
			location.image = result.attributes.image
			location.name = result.id
			# ^^^ super important! the result.id is the ID that Parse 
			# uses to find that entry. we need to associate it with this 
			# layer if we ever want to interact with this data in the future
	error: (error) ->
		# if there was an error, we'd print it
		print error

You can see on lines 23–25 how we access data thats returned from Parse. We get a big “results” object back that we then loop through and act on each “result.” Each column in your class is exposed as an attribute of a result, so for example if you had a column called “cuteKittens” you would get to it by looking at result.attributes.cuteKittens.

If you’ve followed along correctly so far, you should end up with something like this.

Obviously we have a lot of styling and overall prettifying work to do, but hey you just pulled some dynamic data in to your prototype!

High five!

Write some data back

Now that we’re able to read data in, we might want to save something back to our database. For this example, we’re going to create a like function that increments the like count in our app and save it back to Parse.

# Initialize Parse with the app keys corresponding to your app
Parse.initialize("APPLICATION ID", "JAVASCRIPT KEY");

# create an object that extends the class you want to pull data from
Locations = Parse.Object.extend("Locations")

# create a query against the object you just created
queryLocations = new Parse.Query(Locations)

# we're looking for rows that have show set to true
queryLocations.equalTo "show", true

# we're going to sort the response by state and then by city
queryLocations.ascending "state", "city"

# now we actually run the query and get back results
queryLocations.find
	success: (results) ->
		# if the query is a success, we'll get back a results object. 
		# this for loop lets us do something to each result in that larger "results" object
		for result, i in results
			location = new Layer width: 750, height: 300, y: 300 * i
			location.html = result.attributes.city + ", " + result.attributes.state
			location.image = result.attributes.image
			location.name = result.id
			# ^^^ super important! the result.id is the ID that Parse 
			# uses to find that entry. we need to associate it with this 
			# layer if we ever want to interact with this data in the future
			
			location.on Events.Click, ->
				# same as when we initially pulled the location list, 
				# we need to retrieve the item we want to increment from Parse 
				# so we will need to query our Locations class
				likeGet = new Parse.Query(Locations)
				
				# the @ symbol is coffeescript's equivalent of "this"
				# so here we're telling our new Parse.Query to fetch the
				# row that corresponds with the ID we set back up on line 25
				likeGet.get @.name,
					# if our call is successful, we'll get back a single row which I've named 'location'
					success: (location) ->
						# since likes is the number type we can
						# use this handy Parse helper called increment 
						# which will take the specific column 'likes' of 
						# our 'location' and increment it by 1
						location.increment('likes')
						
						# and now all we have to do is call 
						# save() on our location and the new like count is stored
						location.save()
			
	error: (error) ->
		# if there was an error, we'd print it
		print error

Now nothing will happen visually in our app because we’re not actually displaying the likes anywhere yet, but if you refresh your Parse data browser you’ll see the like counts going up by one every time you click a location. You’re now reading and writing to a cloud database, all from inside your own Framer prototype!

Keep going

By now, you should have a semi-functional prototype and basic mental idea of how Parse works. I’ve completely built out this example prototype below, so download it and take a look at how it works. Also, there is a ton of documentation on Parse that can teach you how to take this example even further. Take what you’ve experimented with here and use that knowledge to enhance your own prototypes!


Explore the finished project

Check it out in Framer Studio or download the source.

Thanks for reading! Please give me a shout on Twitter if you have any questions or if you have ideas for future guides you’d like to see.

George Kedenburg III
December 18, 2014

Vevo Takes On the Mobile Stage with Parse Push

Vevo

With countless players entering the music technology space each day, one has remained the absolute leader in bringing musical experiences to life: Vevo.  Serving up millions of views in video music content in countries across continents each day, Vevo offers the largest collection of premium official music videos possible.

Vevo’s online and mobile channels serve as key content sources for artists worldwide, and especially serve major record labels including Universal Music Group and Sony Music Entertainment.  With the Vevo app, it is easier than ever to discover premium official music videos.  Users can stream live music performances and original shows, in addition to exploring Vevo TV’s hand-curated music video channels.  For an enhanced listening experience, the Vevo app is even able to provide recommendations via a user’s iTunes music library–a phenomenally personal tool consistently focused on bringing the musical world to life.

Given its vast user base in countries like Australia, the U.S., Poland, Brazil, and beyond, Vevo looked for ways to maintain high levels of engagement without sacrificing any piece of their app experience or functionality.  For this, Vevo turned to Parse Push, the perfect solution for the widely popular, cross-platform nature of the Vevo app.  Found on Android, iOS, Window 8, Roku, XBOX 360 devices, and more, Vevo required a service that could handle sending push notifications to many different audiences and across different platform mediums.  According to Argam DerHartunian, VP of Product,

Parse is good for pushing notifications to users and specifically getting data on those we are engaging with.

With the seamless connection between Parse Push and Parse Analytics, Vevo is able to develop a comprehensive understanding of what kinds of push messaging resonates with their app users, and thus encouraging improvement for their engagement and retention.

Vevo continues to grow its offerings in new countries and with more artists each day.  Download the app in the Google Play Store, Apple App Store, or Windows Store.

Nancy Xiao
December 12, 2014

Parse Local Datastore for iOS

Local Datastore for iOS

Too often, we’ve seen bad reception or lack of connectivity become the downfall of what could have been an incredible user experience. Many mobile apps are simple clients that display data straight from a server, losing all functionality without an internet connection. Because of this, people who use these apps face painful loading screens and broken features. The developers who build these apps want a better experience, but it’s not easy to build all the underlying logic to handle local data storage gracefully.

Parse Local Datastore makes it a lot easier, and today we’re excited to announce that it’s available in our iOS/OS X SDK. You can now create a seamless, uninterrupted user experience free from connectivity constraints.

It’s the same functionality found in our Android implementation, but now for iPhones , iPads, and Macs everywhere. [PFObject pin] persists PFObjects to the Local Datastore and [PFObject unpin] removes them. Once pinned, you can access them anytime with a normal PFQuery:

PFQuery *query = [PFQuery queryWithClassName:@"Feed"];

// Pin PFQuery results
NSArray *objects = [query findObjects]; // Online PFQuery results
[PFObject pinAllObjectsInBackground:objects];

...

// Query the Local Datastore
[query fromLocalDatastore];
[query whereKey:@"starred" equalTo:@YES];
[[query findInBackground] continueWithBlock:^id(BFTask *task) {
// Update the UI
}]];

Pinned PFObjects will remain accessible while offline — through app exits and restarts — until they are unpinned. Subsequent saves, updates, or deletes will keep your Parse Local Datastore results up-to-date.

You can also choose to update your object using the PFObject method saveEventually. This will first update its instance in the Local Datastore and then do so remotely, so any changes can be kept up-to-date while offline:

feedItem.starred = YES;

// No network connectivity
[feedItem saveEventually];

...

PFQuery *query = [PFQuery queryWithClassName:@"Feed"];
[query fromLocalDatastore];
[query whereKey:@"starred" equalTo:@YES];
[[query findInBackground] continueWithBlock:^id(BFTask *task) {
// "feedItem" PFObject will be returned in the list of results
}]

This also means that if you’re already using the PFObject method saveEventually to protect your app against network failures, you’ll get most of this without any additional work–simply by updating to the latest iOS/OSX SDK and enabling Local Datastore.

With Parse, it’s easy to take your app offline! Check out our guide and API docs to get started now.

Grantland Chew
December 9, 2014

Introducing Parse Crash Reporting

Crash Reporting

We at the Parse London office are happy to announce Parse Crash Reporting: the simplest way to register, track, and resolve crashes in your apps. Being able to capture and fix crashes efficiently means fewer frustrated users and better retention–one of the most important metrics to any developer.

In the past, we’ve seen Parse developers use third-party crash reporting tools, but this approach required developers to manage several different SDKs, learn new APIs, and monitor many dashboards at once. We wanted it to be simpler. Part of Parse’s core mission has always been to abstract away common tasks and streamline the developer’s experience — so we built a way to manage crash reports right within Parse.

Crash Reporting

Say you’ve released a new version of your app that unfortunately “features” a newly introduced bug. Have no fear! All you have to do is enable Parse Crash Reporting, making the experience of handling crashes in your app much smoother than ever before. We’ve updated our iOS and Android SDKs to provide a simple and intuitive interface that detects the bug, pinpoints the issue, and generates a report allowing you to resolve problems quickly and easily. With this update, our SDKs automatically cache and resend your crash reports if connectivity is spotty. And, our backend tracks bugs on a per-version basis, so that if you’ve reintroduced an old bug in a new version of your app, Crash Reporting still ensures you’ll notice and fix it as soon as possible—even if you’ve previously marked it as “resolved.”

Here’s an example snippet showing how you can enable Parse Crash Reporting for Android:

ParseCrashReporting.enable(context);

Here’s an example snippet showing how you can enable Parse Crash Reporting for iOS:

[ParseCrashReporting enable];

As you may have expected, the sending of crash reports from the client is asynchronous and takes place automatically in the background.

We’re always looking to improve our products and would love to hear your feedback. Check out our guides, try it out, and let us know what you think!

Islam Ismailov
December 9, 2014

Migrating from Urban Airship

Making mobile development as easy as possible has always been our mission at Parse. And ensuring your data is portable and remains yours is an important part of that mission. We’ve worked hard on improving the accessibility of your data on Parse and are committed to ensuring our customers can access their data at any time.

In that spirit, we also want to make sure new customers are able to easily migrate from other providers to Parse. We noticed that the push notification provider Urban Airship recently made their product paid only. So, a few of our engineers spent a weekend building a very simple migration tool. This tool will import all of your Urban Airship push subscriptions for iOS and Android (GCM) devices to Parse. Simply enter your Urban Airship app key and secret and we’ll take care of the rest!

Parse Push allows developers to send unlimited push notifications to up to 1 million devices for free every single month. Beyond that, the pricing is simple: you’ll pay $0.05 a month for every 1000 extra devices. That’s $50 for another million devices, and you can send them as many pushes as you want.

image

After the import is complete, check out the Data Browser to see all of your data. You can then immediately start sending pushes to existing devices without requiring an update to your app. Until you require an update, you can continue using the migration tool to import any new devices. Don’t worry, we’re keeping track of which ones you’ve already imported, so there won’t be any duplicates. Once you’ve integrated the Parse SDK and updated your app, new devices will start showing up in Parse. You can then start taking advantage of our powerful analytics features. To learn more about the steps of migrating to Parse, take a look at our tutorial that will guide you through the whole process.

We’re excited for you to experience all that Parse has to offer. With Parse Push, you can now enjoy device targeting, in-depth analytics, and timezone and badge increment support for your push messaging. Plus, don’t miss our brand new A/B testing feature — engage with your users more intimately and effectively than ever before.

If there’s any other importer you’d like to see, let us know!

Mattieu Gamache-Asselin
December 8, 2014

Archives

Categories

RSS Feed Follow us Like us