I understand that according to Maxwell's equations time-varying EM fields cannot exist in a perfect conductor (but static magnetic fields can). Also if you have a time-varying magnetic field you also have time-varying electric field and vice versa. And this knowledge is used to solve EM wave problems by fixing boundary conditions between conductor and dielectric mediums. However, I get confused/baffled when I try to apply this boundary condition (that time-varying EM fields cannot exist in a conductor) to a transformer with iron core. I understand that a changing current creates a changing magnetic field (by Ampere's law?), which I assume is equivalent to a time-varying magnetic field, in the iron core. Now, since the core is a good conductor shouldn't there be no EM field within it? But then, this would imply no time-varying flux within the iron core and transformer cannot work, which is obviously not true. Could someone kindly help me reconcile these two examples? Where did I go wrong? Thanks in advance.