Can I send regular push notifications?

Yes, you can tell the Layer service to send a regular Apple push notifications by leveraging the options feature of LYRMessage.  In the options dictionary you will need to set the push configuration as the value for the LYRMessageOptionsPushNotificationConfigurationKey key. The value that you set will be displayed in the alert on the intended recipient's device.

// Create a message with a string of text
NSString *messageText = @"Hi how are you?"
LYRMessagePart *part = [LYRMessagePart messagePartWithText:messageText];

// Configure the push notification text to be the same as the message text
LYRPushNotificationConfiguration *defaultConfiguration = [LYRPushNotificationConfiguration new];
defaultConfiguration.alert = messageText;
defaultConfiguration.sound = @"layerbell.caf";
NSDictionary *messageOptions = @{ LYRMessageOptionsPushNotificationConfigurationKey: defaultConfiguration };

LYRMessage *message = [layerClient newMessageWithParts:@[part] options:messageOptions error:nil];
Have more questions? Submit a request