Objective-C is hard and I try to stay away from it. But to use other languages such as Swift or even C# with Xamarin, you should at least have a basic knowledge and understanding of Objective-C. We can save the Objective-C for another post.

This is to show an example of how to call the Parse server using their REST API that sends a push notification to a device. You must install the RestSharp client for this to work.

// Output "BEGIN" to console
 Console.WriteLine("BEGIN");

// Build Request URL
 var client = new RestClient("https://api.parse.com");
 var request = new RestRequest("1/push", Method.POST);

// Build JSON string to send to server
 string json = "{\"where\": {\"deviceType\": \"ios\"}, \"data\": { \"alert\": \"Cubs Score: " + score + "\"}}";

// Output json to console
 Console.WriteLine(json);

// Build Parameters and Headers to send with request
 request.AddParameter("application/json", json, ParameterType.RequestBody);

// Enter your App ID and REST API Key from your Parse account. Login and go to Settings and Keys.
 request.AddHeader("X-Parse-Application-Id", "APP ID");
 request.AddHeader("X-Parse-REST-API-Key", "REST API KEY");

// Let the Parse server know you're sending JSON
 request.AddHeader("Content-Type", "application/json");

// Execute the Request
 IRestResponse response = client.Execute(request);

// Get the response back from server
 var content = response.Content;

// Output "END" to console
 Console.WriteLine("END");

Hopefully this helps get your push notifications to work. Please let me know if this works for your app.