1590s, "one who intends;" 1620s as "one who puts forth a claim;" agent noun from pretend (v.). Specifically of a claimant to the English throne from 1690s, especially the Old and Young Pretenders, the son and grandson of James II who asserted claims to the throne against the Hanoverians. Meaning "one who feigns, one who makes a false show, one who puts forth a claim without adequate grounds" is from 1630s.
Having been a spectator of the battle of the Boyne, on the first of July 1690, he thought it most prudent, while the fate of the day was yet undecided, to seek for safety in flight. In a few hours he reached the castle of Dublin, where he was met by Lady Tyrconnel, a woman of spirit. "Your countrymen (the Irish), Madam," said James, as he was ascending the stairs, "can run well."—"Not quite so well as your Majesty," retorted her Ladyship ; "for I see you have won the race." [anecdote of the Old Pretender, first, as far as I can tell, in Charles Wilson's "Polyanthea," 1804]
1796 in reference to members of a secret politico-religious society founded 1795 in Belfast to promote Protestant power in Northern Ireland, named for William of Orange (who became King William III of England and triumphed in Ireland at the head of a Protestant army at the Battle of the Boyne), of the German House of Nassau. His cousins and their descendants constitute the royal line of Holland.
The name is from the town of Orange on the Rhone in France, which became part of the Nassau principality in 1530. Its Roman name was Arausio, which is said in 19c. sources to be from aura "a breeze" and a reference to the north winds which rush down the valley, but perhaps this is folk etymology of a Celtic word. The name subsequently was corrupted to Auranche, then Orange.
The town has no obvious association with the fruit other than being on the road from Marseilles to Paris, along which masses of oranges were transported to northern France and beyond. In this roundabout way the political/religious movement of Northern Irish Protestantism acquired an association with the color orange, the Irish national flag acquired its orange band, and Syracuse University in New York state acquired its "Otto the Orange" mascot.