Apple has reached its first-ever contract with a retail union, coming to a tentative deal with workers at a store in Maryland.