I did some testing, and the real iOS (at least in the emulator) doesn't re-order the subviews to match sublayer order.
NSLog(@"View %@ \n", [[self.window subviews] objectAtIndex:0]);
NSLog(@"Layer %@ \n", [[windowLayer sublayers] objectAtIndex:0]);
[self.window exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
NSLog(@"View after view swap %@ \n", [[self.window subviews] objectAtIndex:0]); //Swapped
NSLog(@"Layer after view swap %@ \n", [[windowLayer sublayers] objectAtIndex:0]); //Swapped
[magentaLayer removeFromSuperlayer];
[yellowLayer removeFromSuperlayer];
[windowLayer insertSublayer:yellowLayer atIndex:1];
[windowLayer insertSublayer:magentaLayer atIndex:0];
NSLog(@"View after layer swap %@ \n", [[self.window subviews] objectAtIndex:0]); //Still the same
NSLog(@"Layer after layer swap %@ \n", [[windowLayer sublayers] objectAtIndex:0]); //Swapped