How common was gun prohibition before 1934?

As I understand it, the first federal gun law was passed in 1934, which (among some other things) imposed an onerous tax on machine guns to get them out of the hands of mobsters who were outgunning cops. Before that, the federal government had not weighed in on the issue of guns, except for the ratification of the 2nd amendment.

Prior to this, however, I am aware of two examples where cities had imposed rather severe laws regarding gun possession. In 1929, Al Capone (along with a bodyguard) was arrested in Philadelphia for carrying a concealed handgun. He did 9 months.

Even earlier, the famous old west town of Tombstone, Arizona (sight of the 1881 Shootout at the OK Corral, and home to Doc Holiday and Wyatt Earp) banned the carrying of weapons within city limits.

My question, then, is whether these are complete anomalies, or if they were at all common. My initial thought was to ask about the gun laws prior to 1934, but as these examples illustrate, it appears that they were operating at the municipal level, making a full accounting basically impossible.

(I also realize that gun questions often turn into debates, but I figured this was a factual query. I take no offense if it gets moved, however).

Thanks to all who reply!

Tombstone was far from an anomaly.

Some Jim Crow laws also forbid black people from owning guns.

New York passed a well known licensing law in 1911.

Etc.

One of the things a town did when becoming “respectable” or when the cowboys were becoming too boisterous, was ban the carrying of guns.

Mind you, of course respected citizens still could as long as they did so discretely.

But the point of such laws was mainly to prevent “horahing” by drunk cowboys, when they would shoot off their sixguns when drunk- mostly into the air, but still.

And of course they only applied within city limits.

But in general, a Sheriff would just ask the person to check his gun. Arrests were rare. However, that was the supposed purpose of Earp & co when they went towrds the Ok Corral.

So, yeah, some sort of “gun control” was by no means rare.