The cigarette lighter was invented before the first conventional, friction-based match. The German chemist Johann Dobereiner invented the lighter in 1823 using hydrogen and platinum. The friction-match was invented in 1826 by English chemist John Walker.
In 1836, Hungarian chemist Janos Irinyi improved the match by making it safer. Before the friction-based match was invented, there was a match that worked only with contact with bottled sulfuric acid. This was invented in 1805 by Frenchman Jean Chancel. As this wasn't a self-igniting match and required too many extra substances that weren't readily available, it isn't considered a true precursor to the present-day friction-match.