Associated Domains iOS Post Install Issue

EDIT: This appears to be known issue with iOS.*

I have built an application in Ionic (5.4.1, building with xcode 11) that uses an external web service. To make that work on iOS I have to use Associated Domains. I got that all working fine.

The problem is that on iOS and only on production builds (problem does not occur on development builds) the first time the app is installed the webcredentials portion of the associated domains does not work.

My web service returns a security cookie, which won’t be stored unless the Associated Domain web credentials is setup. But as soon as I toggle to any other app or home, and then go back to my app (without closing my app mind you) the problem goes away. The security cookies and tokens are then able to be stored fine.

Has anyone experience this before? Is this an Ionic or iOS issue? Any ideas? It’s the most weird and frustrating thing I have ever seen and I have no idea what could be causing it.

Thanks in advanced if anyone can help with this or give me some ideas to look at.

Literal steps to reproduce are:

  1. Install app
  2. Attempt to login into app (uses my web service calls)
  3. Get cookie/token error.
  4. Repeat as much as you want… same problem
  5. Press home button, then go back to my app
  6. Attempt to login into app again… problem has gone away.
  7. Beat my head against brick wall.
  8. Problem never repeats until a fresh re-install occurs.