Abstract: As a consequence of their rapid rotation as well as interaction among the Sun, planets and satellites, many astrophysical bodies are in the shape of a spheroid or an ellipsoid and rotating non-uniformly, resulting in libration of those bodies. We study the dynamics of planetary fluid cores by considering a spheroidal container that rotates rapidly but undergoes latitudinal libration. The fluid dynamical problem is investigated via both asymptotic analysis and direct numerical simulation. An asymptotic theory is developed using oblate spheroidal coordinates for a spheroidal cavity of arbitrary eccentricity without making any prior assumptions about the spatial-temporal structure of the flow. New resonant phenomenon is discovered theoretically and three-dimensional direct numerical simulation is performed to confirm the existence of resonance. The new finding may have important implications for certain planets that are thermally or chemically non-convective because the resonant flow with strong shears is likely susceptible to instabilities leading to more complicated turbulence required to sustain planetary dynamos. We shall also report some preliminary results on the dynamo action that is sustained by resonant flows in spheroidal geometry.