Migrating From Parse

Introducing Magnet Message, a Powerful Alternative to Parse Push!

Parse was an excellent hosted service for prototyping your mobile apps. What they lacked in reliability and robust mobile capabilities, they made up through their intuitive dashboard, helpful tutorials, and dead-simple mobile APIs. We will be sorry to see them go. For those of you that have leveraged the Parse Push Notification feature to communicate with your users and build engaging mobile user experiences, we are pleased to introduce our hosted messaging platform, Magnet Message!

What can Magnet Message do for your mobile app?

Magnet Message is a comprehensive, mobile-first messaging solution with enterprise grade capabilities for next generation mobile apps. As you can see below, all of the Parse Push Notification features are available with Magnet Message.

If you would like a quick demonstration of how easy it is to get started using Magnet Message, try the Magnet Sandbox, our hosted messaging platform.

Messaging Features Parse Magnet
User-User messaging
Server-user messaging
Publish/subscribe
Public/private channels Public only
User/device targeting
Push with wakeup (APNS, GCM)
Mobile user authentication
Reliable with delivery confirmation
Chat history
Rich payloads
Hosted service (SaaS)
Open source SDK and Server only
For more details, visit our developer website.

Comparing Parse and Magnet Mobile APIs

With Parse
dependencies { compile 'com.parse.bolts:bolts-android:1.+' compile 'com.parse:parse-android:1.+' }
Add pod 'Parse' to your podfile and run pod install.
With Magnet
repositories { maven { url "https://repo.magnet.com/artifactory/public" } } dependencies { compile ('com.magnet.max.android:magnet-max-android-sdk:2.3.0') { transitive=true } }
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/magnetsystems/Specs.git' platform :ios, '8.0' use_frameworks! pod 'MagnetMax', '~> 2.3'
With Parse
public void onCreate() { Parse.initialize(this); ParseInstallation.getCurrentInstallation().saveInBackground(); }
Open up the ParseStarterProjectAppDelegate.m file and uncomment and edit the first line in application:didFinishLaunchingWithOptions: to be like so:
[Parse setApplicationId:@"APPLICATION ID" clientKey:@"CLIENT KEY"];
With Magnet
public void onCreate() { Max.init(this.getApplicationContext(), new MaxAndroidPropertiesConfig(this, R.raw.magnetmax)); }
Open up the AppDelegate.m file and edit application:didFinishLaunchingWithOptions: to be like so:
NSString *configurationFile = [[NSBundle mainBundle] pathForResource:@"MagnetMax" ofType:@"plist"]; id configuration = [[MMPropertyListConfiguration alloc] initWithContentsOfFile:configurationFile]; [MagnetMax configure:configuration];
With Parse
ParseUser user = new ParseUser(); user.setUsername("my name"); user.setPassword("my pass"); user.setEmail("email@example.com"); // other fields can be set just like with ParseObject user.put("phone", "650-253-0000"); user.signUpInBackground(new SignUpCallback() { public void done(ParseException e) { } });
- (void)myMethod { PFUser *user = [PFUser user]; user.username = @"my name"; user.password = @"my pass"; user.email = @"email@example.com"; // other fields can be set just like with PFObject user[@"phone"] = @"415-392-0202"; [user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (!error) { // Hooray! Let them use the app now. } else { NSString *errorString = [error userInfo][@"error"]; // Show the errorString somewhere and let the user try again. } }]; }
With Magnet
User.register(new UserRegistrationInfo.Builder() .userName("jane.doe") .firstName("Jane") .password("magnet") .build(), new ApiCallback() { public void success(User user) { Log.d(TAG, "register user succeeded"); } public void failure(ApiError apiError) { Log.d(TAG, "register user failed because: " + apiError); } });
MMUser *user = [[MMUser alloc] init]; //optional fields user.firstname, .lastname, .email user.userName = @"jane.doe"; user.password = @"password"; //all other fields user.extras = @{@"phone" : @"123-867-5309"}; [user register:^(MMUser *user) { // Hooray! Let them use the app now. } failure:^(NSError *error) { //error.code == 409 ? user exists. }];
With Parse
// login ParseUser.logInInBackground("Jerry", "showmethemoney", new LogInCallback() { public void done(ParseUser user, ParseException e) { // ready } } }); //logout ParseUser.logOut();
[PFUser logInWithUsernameInBackground:@"myname" password:@"mypass" block:^(PFUser *user, NSError *error) { if (user) { // Do stuff after successful login. } else { // The login failed. Check error to see why. } }];
With Magnet
// login String username = "jane.doe"; String password = "magnet"; User.login(username, password, false, new ApiCallback() { public void success(Boolean aBoolean) { Log.d(TAG, "login(): success! boolean=" + aBoolean); // Ready to receive message MMX.start(); } } public void failure(ApiError apiError) { Log.d(TAG, "login(): failure! error=" + apiError); //login failed, probably an incorrect password } }); // logout User.logout(new ApiCallback() { });
NSString *username = @"jane.doe"; NSString *password = @"password"; NSURLCredential *credential = [NSURLCredential credentialWithUser:username password:password persistence:NSURLCredentialPersistenceNone]; [MMUser login:credential success:^{ // Do stuff after successful login. } failure:^(NSError *error) { // The login failed. Check error to see why. }];
With Parse
// Create our Installation query ParseQuery pushQuery = ParseInstallation.getQuery(); pushQuery.whereEqualTo("injuryReports", true); // Send push notification to query ParsePush push = new ParsePush(); push.setQuery(pushQuery); // Set our Installation query push.setMessage("Willie Hayes injured by own pop fly."); push.sendInBackground();
// Create our Installation query PFQuery *pushQuery = [PFInstallation query]; [pushQuery whereKey:@"injuryReports" equalTo:@YES]; // Send push notification to query PFPush *push = [[PFPush alloc] init]; [push setQuery:pushQuery]; // Set our Installation query [push setMessage:@"Willie Hayes injured by own pop fly."]; [push sendPushInBackground];
With Magnet
// Construct the message HashMap content = new HashMap(); content.put("foo", "bar"); MMXMessage message = new MMXMessage.Builder() .recipients(recipients) .content(content) .build(); // Send as in-app message String messageId = message.send(new MMXMessage.OnFinishedListener() { public void onSuccess(String result) { //Message sent successfully } public void onFailure(MMXMessage.FailureCode code, Throwable ex) { //Failed to send message } });
// Construct the message NSDictionary *content = @{@"foo": @"bar"}; MMXMessage *message = [MMXMessage messageToRecipients:@[user1, user2, user3] messageContent:content]; // Send as in-app message [message sendWithSuccess:^(NSSet * invalidUsers) { //Message sent successfully } failure:^(NSError *error) { //Failed to send message }];
With Parse
ParsePush push = new ParsePush(); push.setChannel("Giants"); push.setMessage("The Giants just scored! It's now 2-2 against the Mets."); push.sendInBackground();
// Send a notification to all devices subscribed to the "Giants" channel. PFPush *push = [[PFPush alloc] init]; [push setChannel:@"Giants"]; [push setMessage:@"The Giants just scored!"]; [push sendPushInBackground];
With Magnet
Map content = new HashMap<>(); content.put("content", "Hello"); MMXMessage.Builder builder = new MMXMessage.Builder(); builder.content(content); mChannel.publish(message.build(), new MMXChannel.OnFinishedListener() { @Override public void onSuccess(String s) { Logger.debug("send message to channel " + mChannel.getName() , "successfully"); } @Override public void onFailure(MMXChannel.FailureCode failureCode, Throwable throwable) { String message = "Can not send message to channel " + mChannel.getName() + " due to " + failureCode + " : " + throwable.getMessage(); } });
NSDictionary *content = @{@"foo": @"bar"}; // Build the message with a channel MMXMessage *message = [MMXMessage messageToChannel:myChannel messageContent:content]; [message sendWithSuccess:^(NSSet *invalidUsers) { //Message sent successfully } failure:^(NSError * error) { //Failed to send message }];

Ready to get started? Try our hosted messaging platform by clicking below.

Try It