I think that what it tricks you into seeing as 'white lines' is the normal lighter coloured background. What you see as the 'black spaces between the lines', is the actual 'bars'.
So to replicate this, do not simply set your barcode artwork in white, that will not be machine-readable on ios11 or anywhere. Instead, you should maintain the original barcode & just crop it such that it appears to be white shapes on a black field.
Actually it isn't important to actually be black & white, we just need a distinct colour contrast to the scanning device, originally a red light laser. Make sure the black lines of the original design simply absorb more light and reflect less than the background colour between.
If you are trying to replicate this effect, make sure you have a bigger white block at the two extremes, and always test it on a few devices before rolling it out.