The office of Sheriff in Pennsylvania was officially set in place on June 21, 1681 when William Markham ordered the government in Upland to convert from New Orange to Pennsylvania. The Sheriff of Upland, which would become Chester County, and then Delaware County, was the first Sheriff office to serve in official Pennsylvania capacity.
Sheriffs are the first police office in Pennsylvania to be specifically named. Constables existed in Upland since 1678, but were sometimes referred to in initial government documents as other officers.
See this compilation on Sheriff Authority below