Melt butter in large skillet. Stir in onions and apples and cook 5 minutes or until just beginning to brown. Add sugar, salt, and spices. Cover and cook over low heat 30 minutes until syrupy. Stir in vinegar and cook uncovered until liquid is reduced, about 5 minutes.