Charles IV was never a "royalist" symbol, as his reign ended just before the French invasion and thus before any royalist faction was needed. He was a lapdog of France during most of his reign though, and a pretty awful king in general. He declared war on the revolutionary Convention, like any other monarch did, but after a short and disastrous campaign that ended with the French invading Catalonia, he sued for peace, immediately returning to the old French-Spanish alliance.
In 1808 prior to the French invasion, there was a conspiracy by his own son, the even more awful Ferdinand VII, that forced Charles to abdicate, but immediately after, the French invaded and they were both taken to Bayonne where a lot of shenanigans and bickering happened ending with Joseph Bonaparte as king. At this point half of Spain had risen in arms against the French, so Joseph never had much of a kingdom to rule, and his influence never reached the Spanish colonies (I just read that the first French agent reaching Cuba in 1808 to convince the authorities to swear loyalty to Bonaparte was immediately arrested and executed).
Most of the uprisings proclaimed Ferdinand VII as true king, so he was the one who undeservedly became more of a symbol of the "royalist" resistance against France (poor bastards didn't know what they were bringing upon themselves as Ferdinand is universally considered to be the worst ruler to ever have graced this land of ours).
But all this happenned almost 20 years after the starting date of the period, and Charles IV was king for most of that time.