For the last time, it was NOT an illegal search. They asked and were given permission to enter and search. Does that need repeating?
Everything in that series of events is incredibly sketchy and falls under the heading "if it isn't illegal, it should be." And if you go by the spirit of the law, the Apple employees should definitely be charged for impersonating police officers, given this narrative of events.
Note that it would still be incredibly goonish even if (a) they made sure the dude understood they were Apple employees and not police officers or (b) everyone involved actually is a police officer. Pure nastiness on the part of Apple and the SFPD.