iOS Publish Messaging always crashes, but push gets sent anyways

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);

                                 }];

Hi Niel,

Are you using the latest build of the library?

Could you share any details about the crash itself?

Mark

Hi, I am not on the latest SDK, as I had numerous issues with the latest one (3.0.15), so I reverted back to 3.0.10 for the moment.

The problems were that sometimes objects from a different class/table would get returned when doing requests to Backendless.
i.e. I would do a Find on my Media class, but then I would get a collection of Comment class objects returned.

This is exactly the issues I were experiencing http://support.backendless.com/t/relationships-being-deserialised-to-the-wrong-class-type-ios-swift

Sorry, I was on 3.0.9. I ran installed my pods again and upgraded it to 3.0.10, which for now has resolved my issues. Will update if it happens again.

Please update CocoaPods