Hi
Im trying to send a push to a user after an action is performed, but it seem to crash the app every single time I try.
Below is my code that is used.
DeviceIds is an array of 1 or more deviceIds, which can be android, iOS or both.
APP ID: BA6D604B-62A6-4A96-FF25-51317857DA00
DeliveryOptions *deliveryOptions = [DeliveryOptions deliveryOptionsForNotification:PUSH_ONLY];
deliveryOptions.pushSinglecast = deviceIds;
PublishOptions *publishOptions = [PublishOptions new];
[publishOptions addHeader:@"ios-text" value:pushMessage];//@"ios-text"
[publishOptions addHeader:IOS_BADGE_TAG value:@"1"];
[publishOptions addHeader:ANDROID_CONTENT_TITLE_TAG value:backendless.userService.currentUser.name];
[publishOptions addHeader:ANDROID_CONTENT_TEXT_TAG value:basePushMessage];
[publishOptions addHeader:ANDROID_TICKER_TEXT_TAG value:pushMessage];
[backendless.messagingService publish:@"default"
message:pushMessage
publishOptions:publishOptions
deliveryOptions:deliveryOptions
response:^(MessageStatus *status) {
NSLog(@"PUSH SENT - MessageStatus = %@ <%@>", status.messageId, status.status);
} error:^(Fault *fault) {
NSLog(@"PUSH FAIL - FAULT = %@", fault);
}];