The pillbox communicates via Bluetooth to your Pilloxa app. In order for this communication to take place automatically, the app needs to be on in the background. You open the Pilloxa app and then do not swipe it away, also make sure to start the app if you would restart your phone, for example.
This is something that Apple has decided should happen for all iPhone models (on Android this problem does not exist) and unfortunately not something we can do anything about as it is built into the operating system on the iPhone.