We are configuring the push notifications for our hybrid app at the moment and we ran into one of the governor limits.
This is the error we are getting:
System.LimitException: Too many Mobile Apex push calls: 11
The error matches the governor limit mentioned in the Developer's guide:
Maximum number of push notification method calls allowed per Apex
If you look at the trigger example in the implementation guide for the push notifications, you will notice the "send" method could be called for each record in the trigger. Since a trigger processes the records in batches of 200, the "send" method for the push notifications could be called 200 times potentially. The governor limit indicates you can only call the "send" method 10 times though.
Has anyone encountered the same issue before and what is a possible solution for this?
Many thanks in advance.
In the current project I am working on, we have 3 native apps. We also send push notifications to many users and because the maximum limit is 10, we use an external feature to send the notifications. That external feature is pushwoosh (https://www.pushwoosh.com/). They have an api which you can use in an apex class.
I hope this can help you.