wultra/mtoken-sdk-ios

Add default and minimum values for operation polling + document it

Closed this issue · 1 comments

Right now, polling intervals can be set to any number, which can be a problem for the server if it's too frequent.

We should introduce a default value of 7 and set the minimum time to 5 seconds to prevent extreme server overload that can be caused if the value is set to very small numbers.

Also, we should be more explicit about it in the documentation and explain how to minimize the impact on the server (like when push notifications are enabled, the interval should be doubled to prevent server overload).

How to achieve this:

  • extension method that does not require an interval
  • when the interval is lower than 5, we should change it to 5 and log!! this event
  • In the documentation section, add a text where we advise that the optimal time is 7s and 14s when push notifications are allowed (copy the example from our app).