Hello and welcome to just answer.
Do your brake lights work?
Have you checked the fuse for the brake light switch?
does the warning come on all the time, right when the car is started?
Do all of the brake light illuminate the same or is there a dim one?
No, the cruise stopped working because of the brake warning.
How long ago did you replace the switch? was is a new BMW part?
I'm going to opt out and see if someone else has any ideas.
good luck.
BMW Master technician
BMW S.T.E.P. graduate, 10 years BMW dealership experience