Skip to content

A Closer Look at Installations

The PFInstallation class (ParseInstallation on Android) is the heart and soul of Advanced Push Targeting. Each copy of your application has an Installation that uniquely represents your app on that device. You can attach any information you want to that device and use that information when filtering to whom you would like to send push notifications.

At Parse we believe "advanced" need not mean "complicated." To help make Advanced Push Targeting simple to use, Parse manages a handful of fields whenever an Installation is saved:

  • deviceType: The operating system of the device, either android or ios.
  • appVersion: The version string of your app, deduced by your Info.plist in iOS or Package in Android.
  • appName: The name of your app, deduced by your Info.plist in iOS or Package in Android. This is particularly useful when sending pushes only to free or pro versions of your app.
  • parseVersion: The SDK version of Parse.
  • timeZone: The named timezone of the current user in TZ database format (e.g. America/Los_Angeles).

With this, you can create extremely powerful filters. To advertise the features of the new 2.0 version of your app to users who don't yet have it, you could say:
class=' objc;'>
PFQuery *filter = [PFInstallation query];
[filter whereKey:@"deviceType" equalTo:@"ios"];
[filter whereKey:@"appVersion" notEqualTo:@"2.0"];
[PFPush sendPushMessageToQueryInBackground:filter withMessage:@"Get version 2 for new levels!"];