Parse SDK for iOS 8, Performance, and Security

Parse SDK for iOS 8

We’re excited that the big day is finally here — iOS 8 is finally available to everyone! We spent the last few weeks waiting patiently and getting ready. Today we’re rolling out a new version of the Parse SDK for iOS with support for iOS 8 as well as a bunch of other performance and security improvements.

Parse and iOS 8

We updated our SDK to make sure it runs smoothly on iOS 8 and benefits from all the new APIs available. Just to name a couple, we’ve updated how [PFGeoPoint geoPointForCurrentLocationInBackground:] works to be smarter about requesting the appropriate permissions depending on the state of the app, and we’ve updated our push notification integration everywhere to use the new permissions style and support the category key.

Performance Improvements for Parse Files

Parse Files let you easily store application files in the cloud that would otherwise be too large or cumbersome to fit into a regular database-style Parse Object. This release of the iOS (and OS X) SDK brings greatly improved performance for Parse Files. Uploading is now up to 3 times faster and downloading is up to 35% faster. We’re also using fewer system resources which leads to better battery usage for file-heavy apps.

Improved Security for Account Data

The Parse SDK now uses the System Keychain on both iOS and OS X to store sensitive user information tied to PFUser. All of this happens automatically and under the hood so you don’t need to make any changes on your end.

Try It Out

The latest iOS SDK is now available for download here. Send us your feedback! We hope you’re as excited as we are about the new features and possibilities that iOS 8 brings.

Nikita Lutsenko
September 18, 2014

Announcing Parse Config

Parse Config

We at the Parse London office are happy to announce Parse Config: the simplest way to store your app’s parameters for updating on the fly. Keeping configurations out of your app’s binary means config changes do not require a fresh app release.

Say you have a background image in your game, and you would like to change it on the fly during the Christmas season. All you would have to do is swap the image on the Parse Config dashboard. Or, for example, you have this shiny new feature that you haven’t released yet, and would like to have a few people dogfood it. You could trickle out these by specifying a “dogfooding” array of user IDs.

Parse Config Dashboard

In the past, some Parse developers have built their own configuration management using a Parse Object, and then modified its columns in the Data Browser. This approach required manually caching this object on mobile devices to avoid waiting for a query to run on every app restart. Parse is all about abstracting away common tasks so we wanted to build something for this use case.

Parse Config makes the experience of handling configuration much smoother than ever before. We updated our iOS, Android, JS, .NET and Unity SDKs to provide intuitive method calls to help sync configurations in the Parse Cloud. Our SDKs automatically cache the last-fetched configuration, so you don’t have to re-fetch it after an app restart.

Here is an example snippet of what the Parse Config API looks like. Alternatively, you can have a look at the Anywall source code, which has now been updated to use Parse Config.

[PFConfig getConfigInBackgroundWithBlock:^(PFConfig *config, NSError *error) {
  NSArray *distanceOptions = config[@"searchDistanceOptions"];
  if (!distanceOptions) {
    // No config for distance options - fallback to the default ones
    distanceOptions = @[ @250.0, @1000.0, @2000.0, @5000.0 ];
  }
  self.distanceOptions = distanceOptions;
  [self.tableView reloadData];
}];

Our simple yet flexible API gives you precise control over when to fetch a new configuration and when to use the last-known configuration.The PFConfig is an immutable dictionary that can be used to retrieve configuration parameters. Our SDKs automatically persist the last-known PFConfig instance, and can be retrieved with [PFConfig currentConfig] so you don’t have to worry about losing the last-known configuration if a user decides to close your app.

As you may expect, the fetching of the configuration from the server is an asynchronous call. While the fetch occurs in the background, you can keep using the last-held PFConfig instance, without worrying about it suddenly changing underneath you. After the fetch completes, you can decide to switch to the latest PFConfig anytime.

We are 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!


  
Karan Gajwani
September 8, 2014

Open Sourcing the f8 Conference Apps

f8 App

 

As part of the f8 conference experience, we launched iOS and Android apps built entirely on Parse. The app enabled conference attendees to stay up-to-date with upcoming talks, get to know the speakers, and receive push notifications on talks they had marked as favorites.

This app grew out of the Parse Developer Day apps, and was thoroughly customized to match the f8 experience. Using Parse to build these apps was a fun experience, and it took one iOS and Android developer around two weeks to deliver the apps. Parse Data was used to store all the conference data and much of the User Interface (UI) customizations and assets, enabling quick iteration on design changes across iOS and Android. Even after the app was shipped, last minute updates were possible without touching code, simply by using the Data Browser. And, as talks were in session, the Push Console was used for ad hoc messaging to conference attendees–it’s vitally important to know when to pick up those T-shirts.

Today, we are releasing the source code for these apps so you can peek under the hood and see how they were built. The source code is available on GitHub. We hope they will serve as good guidance for how to build apps on Parse. We also hope others find them useful as a starting point for their own conference apps. We can’t wait to see what you do with them!

Christine Abernathy
August 28, 2014

Announcing Parse Analytics Integration with App Links

After the initial release of App Links support in the Bolts SDK, we’ve been looking for ways to enhance this support and easily provide actionable data to developers. With that in mind, we are pleased to announce Parse support for the App Links analytics hooks that are now available in the Bolts framework.

This Parse support takes App Links events and translates them into Parse Analytics custom events. You can then go to your app’s Analytics dashboard to view detailed App Links data–for example, how often an outbound App Links has been clicked or how many times your app has been opened from another App Links-enabled app.

This new open source, lightweight library is available for iOS and Android. You can simply download the jar or framework file and drop it into your project that’s already using the Bolts SDK. You can also download the source directly from GitHub. Then you can start measuring App Links events on Android as follows:

ParseAppLinksAnalytics.enableTracking(context);

To measure App Links events in iOS, add the following:

[PAAnalytics enableTracking];

You can then check out the custom events area in the Analytics dashboard and look for the following data related to your App Links usage:

AppLinksInbound: whenever traffic resulting from your App Links integration opens up your app.
AppLinksOutbound: whenever your app opens another app via an App Links integration.
AppLinksReturning: (iOS only) whenever an App Links integrated app returns the user back to your app after a previous outbound link.

Note that these events are only triggered if the App Links are constructed using the Bolts SDK.

For more information, please see the platform-specific README files on GitHub. We’d love to hear your feedback as you use the power of Parse Analytics to help fine tune your app’s integration with App Links and Bolts.

Christine Abernathy
August 21, 2014

Parse for PHP: A Fractal of Rad Design

Parse for PHP

Today we are very happy to release the Parse PHP SDK, which will enable Parse integration for a whole new class of apps and different use cases. This is our first SDK for a server-side language, and the first to be truly open-source.

PHP is an incredibly popular programming language and has consistently been in the top 10 on the TIOBE index for the past 15 years. Some metrics report that it is still serving the vast majority of websites on the internet. Until now, if you wanted to access Parse from PHP, the REST API was the only option. A few Parse API wrapper libraries have been released by third parties on GitHub. While we think this is awesome, many developers requested better PHP support and we decided to build a first-party SDK.

Earlier this year at Facebook’s f8 developer conference, we launched the completely re-invented Facebook SDK for PHP. In the 3 months since it was released there have been over 160 commits, with good solid contributions and enhancements from 20 passionate developers who use and care about the product. It has been a lot of fun managing the process for the Facebook SDK, and I’m looking forward to working together with the community on this Parse SDK.

For a fast overview of the SDK, check out the README file. We’ve also updated our documentation with a new PHP guide, and added a PHP Quickstart with installation instructions. We encourage you to report any issues and requests on GitHub.

Go build something awesome with Parse + PHP!

Fosco Marotto
August 5, 2014

Parse Developer Community

In 2011, when we launched Parse, we caught the attention of a lot of great mobile developers, eager for a solution like ours. We were quickly faced with questions and feedback that needed to be fielded. We decided to do what many young startups do and built our own tool, a custom Community Forum that was similar to Stack Overflow but tightly integrated with Parse. This has been a labor of love for us, and for a long time, it was precisely the tool that worked well for us.

After 2 years and over 20,000 questions, we’ve decided to try something more scalable and familiar to developers around the world. We will be moving over to several industry standard tools like Stack Overflow and Google Groups to help accommodate the growing community of Parse developers. Whenever we’ve found ourselves in need of help, we’ve gravitated towards using these same tools. We’re excited to continue fostering a vibrant Parse developer community and we hope you’ll take advantage of it when you need help building something awesome. For those of you that have contributed so much time and energy to our community forums in the past, we’d like to enthusiastically say: Thank you!

Plus—don’t forget about the new way to report bugs that we launched earlier this year. This has helped us move from just a couple of folks handling bug reports to a global team of bug squashers, based in London, Dublin, and the US.

We hope you’ll find these new tools helpful, and we invite you to try all of them out on our new Help page.

Héctor Ramos
June 26, 2014

Building Apps with Parse and Swift

On Monday at WWDC 2014, Apple released a new programming language called Swift. As always, when we see that developers are excited about a new language or platform, we work quickly to make sure Parse can support that momentum. We’re excited about Swift because it brings a whole host of new language features to iOS and OS X development. Swift’s type inference will save developers a ton of typing and generics will reduce runtime errors by giving us strongly-typed collections. To learn more about Swift, checkout Apple’s reference book.

One of the best things about Swift for existing iOS developers is that it’s fully compatible with existing Objective-C libraries, including system libraries like Cocoa and third-party libraries like Parse. To start using Parse in your Swift projects:

* Add a new file to your project, an Objective-C .m file.
* When prompted about creating a bridge header file, approve the request.
* Remove the unused .m file you added.
* Add your Objective-C import statements to the created bridge header .h file:

#import <Parse/Parse.h>
// or #import <ParseOSX/ParseOSX.h>

This StackOverflow answer gives a more thorough explanation.

Once you’ve added Parse to your bridge header, you can start using the Parse framework in your Swift project. To help you get started, we’ve added Swift example code to our entire iOS/OSX documentation. For example, this is all you need to do to save an object to Parse:

var gameScore = PFObject(className: "GameScore")
gameScore.setObject(1337, forKey: "score")
gameScore.setObject("Sean Plott", forKey: "playerName")
gameScore.saveInBackgroundWithBlock { 
    (success: Bool!, error: NSError!) -> Void in
    if success {
        NSLog("Object created with id: \(gameScore.objectId)")
    } else {
        NSLog("%@", error)
    }
}

To then query for the object by its id:

var query = PFQuery(className: "GameScore")
query.getObjectInBackgroundWithId(gameScore.objectId) {
    (scoreAgain: PFObject!, error: NSError!) -> Void in
    if !error {
        NSLog("%@", scoreAgain.objectForKey("playerName") as NSString)
    } else {
        NSLog("%@", error)
    }
}

That’s everything you need to know to start using Swift with Parse. For more examples, don’t forget to visit our iOS/OSX documentation. We can’t wait to see what you build with it!

Fosco Marotto
June 6, 2014

Parse is Coming to London!

Big Ben in white on a Parse blue backgroundOver the past year, 140,000 new developers started building mobile apps on Parse and 50% of those developers were from Europe, the Middle East, and Africa. With thousands of developers using Parse throughout the UK, we’re building a team in London to better support the area’s thriving developer community and engineering talent.

The Parse London team will be based out of the Facebook London office, which is moving to a beautiful new location in central London in early June. We’re hiring engineers to help build the next big Parse products and to support products we’re building in collaboration with the Facebook Platform team.

We’re also looking for partner managers and partner engineers who will work directly with the biggest app developers in Europe, helping them to build awesome cross-platform apps using Parse. The team is already working with companies like Deezer, TopShop and Mind Candy.

We prioritize our product road map based on the feedback we get from our customers, and having a team on the ground in London allows us to cater the future of Parse products to the needs of our global community.

If you’re in London tonight, join us for a Parse meetup and cocktail party at Facebook to celebrate and meet some of our team. Sign up for the group here; we’d love to meet you!

If you’re interested in working at Parse in London, you can apply here. For job descriptions, please visit the Parse jobs page.

Ilya Sukhar
May 8, 2014

Take Your App Offline with Parse Local Datastore

Parse Local Datastore Banner with tagline: "The power of Parse even when your app isn't connected to a network."

How many times have you opened an app and stared at a loading screen for minutes, only to be confronted with the dreaded, “No internet connection”? Most mobile applications are simply clients that display data straight from a server, losing all functionality without an internet connection. How great would it be, though, if an app worked regardless of bad reception or lack of connectivity?

To make taking your app offline easier, we’re excited to announce Parse Local Datastore.

Parse Local Datastore is a new feature in the Parse Android SDK that lets you to take your app offline with just a few simple lines of code. ParseObject#pin() adds ParseObjects to the Local Datastore and ParseObject#unpin() removes them. Once pinned, you can access them anytime with a normal ParseQuery:

// Pin ParseQuery results
List<ParseObject> objects = query.find(); // Online ParseQuery results
ParseObject.pinAllInBackground(objects);

// Query the Local Datastore
ParseQuery<ParseObject> query = ParseQuery.get("Feed")
    .fromLocalDatastore()
    .whereEquals("starred", true)
    .findInBackground(new FindCallback() {
        public void done(List<ParseObject> objects, ParseException e) {
            // Update UI
        }
    });

Pinned ParseObjects 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 ParseObject#saveEventually(). This will first update its instance in the Local Datastore and then remotely, so any changes can be kept up-to-date while offline:

ParseObject feed = ParseQuery.get(objectId); // Online ParseQuery result
feed.fetch();
feed.put("starred", true);

// No network connectivity
feed.saveEventually();

ParseQuery<ParseObject> query = ParseQuery.get("Feed")
	.fromLocalDatastore()
	.whereEquals("starred", true)
	.findInBackground(new FindCallback() {
		public void done(List<ParseObject> objects, ParseException e) {
			// "feed" ParseObject will be returned in the list of results
		}
	});

This also means that if you’re already using ParseObject#saveEventually() to protect your app against network failures, you’ll get most of this without any additional work, simply by updating to the latest Android SDK and enabling Local Datastore.

With Parse, it’s easy to take your app offline! Check out our guide and API docs to take your Android app offline now. Stay tuned for iOS, coming soon.

Grantland Chew
April 30, 2014

The More You Grow, the More You Know

Parse Growth Analytics BannerUnderstanding how your app behaves in the wild should be as seamless as possible. Parse Analytics has thus far focused on ease of integration and ease of use. For apps already part of the Parse ecosystem, this is even more true: we can provide value while removing the need to instrument every operation in your app. And now, with Facebook in our corner, we’re able to leverage even greater resources to help you learn about your app’s performance.

Today, we’re pleased to announce the next steps in our journey: the new “Audience” and “Retention” tabs in your Analytics dashboard. After you’ve built your mobile app, the next step is to build, grow, and retain your user base. Loyal users are key to an app’s long-term success, and with these new growth-centric insights, you’ll be able to keep track of your users better than ever before.

How many people are using my app? And how often?

Under the new Audience tab, we expose information about your Daily, Weekly, and Monthly active Users and Installations. While these links are to the iOS version of these docs, Users and Installations are available across all platforms. You’re likely using one or both in your app already!

With these newest additions to your Analytics dashboard, you can see growth week over week per stat, as well as daily over time.

growthanalytics-audience

As always, we’ve got your data in multiple formats: compare Daily Active Users to Monthly Active Users, take a look at week-over-week changes to your Daily Active stats, or watch your Weekly Actives trend over time.

Curious how to read these numbers? We’ve brought in our expert analyst, Dev, to chat about how to interpret these charts and what sorts of patterns to keep an eye out for:

Now that I’ve got users, how do I make sure they’re sticking around?

You’ve been able to track your app activity for months, so the natural next step for us was to combine activity data with something more meaningful to you: your users. You can now track retention of your user base — in other words, how many of your users continue to return to your app day after day.

The Retention tab of our new Growth Analytics.

The rows of this table are divided into user cohorts by signup date. As you travel from left to right along a single row, you travel forward in time in that particular cohort’s lifetime: the further right you go, the longer it’s been since the user signed up, and the stickier your app.

The columns of the table, then, each represent “day X since the user signed up.” As you travel down the leftmost column, you’re examining the rate at which users returned 1 day after signup, across cohorts.

While some fluctuation is normal, this Retention tab will provide key insight into when users stop coming back, or which of your features affect your product’s stickiness the most. Take some time to play around with the interface and see what you can learn about your app! Here’s another screencast from Dev with some sample data and handy tips on how to work with this chart:

Coming to an inbox near you: Daily Parse stats for everyone!

At Parse, we’ve been tracking these sorts of metrics ourselves as well: we rely on a daily email, called the Daily Parse, to keep an eye on our audience and retention metrics over time. As a final part of our Growth Analytics offering, we’re bringing this “analytics-in-your-inbox” to all of you.

Starting tomorrow, developers will receive daily updates on how their apps have performed over the last day. There will be information about user signups, installation activations, API requests, and push notifications. You can customize the emails to only include data from certain apps, or opt out of these emails entirely, via your account settings. We hope you’ll find them as useful as we do!

A sample Daily Parse email

Parse is committed to providing robust analytics that emphasize our core strengths: clarity, consistency, and simplicity. We hope you like the new angles we’ve provided into how your app is doing, and as always, let us know what you think! We’ve got more good things to come.

Christine Yen
April 30, 2014