Might work, though you may have to adjust the B screw when swapping.
I'd be more concerned if you were going the other direction: using a chain sized for the 28t max and then sticking in a cassette with a 34t; that could end badly.
__________________