- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.8k
Closed
Description
I have migrated my parse app successfully to locally setup parse server. I am able to register the device installation and also am able to send pushes from my device to other devices. But the pushes that I send are not saved either on the parse dashboard under push nor in my mognodb in _PushStatus. I am using iOS and below is the code that I have used:
              `NSString *post = [NSString stringWithFormat:@"{\"where\": {\"channels\": \"%@\"},\"data\": {\"action\": \"LOGOUT\",\"content-available\": \"1\",\"moduleIdentifier\":\"LOGOUT\",\"nTitle\":\"Password Changed\"}}",@"My_channel"];
                NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
                NSURL *url = [NSURL URLWithString:@"https://my_localhost_url/parse/push/"];
                NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
                [request setHTTPMethod:@"POST"];
                [request addValue:@"My_App_Id" forHTTPHeaderField:@"X-Parse-Application-Id"];
                [request addValue:@"My_Master_Key" forHTTPHeaderField:@"X-Parse-Master-Key"];
                [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
                [request setHTTPBody:postData];
                NSURLResponse *requestResponse;
                NSError *err;
                NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&requestResponse error:&err];`
Metadata
Metadata
Assignees
Labels
No labels