A security policy error is usually associated with your development certificate or provisioning profile. And these have a tendency to expire at the most inopportune times. But that was not the case this time.

However it turned out that in addition to the valid provisioning profile, this device also had an old, recently expired provisioning profile installed. This was apparently too much for the device. After removing the old provisioning profile, everything started working again.

So now you know one reason why your development devices keep reminding you about expiring provisioning profiles. It’s important that you remove them when they expire.