Is it possible to detect which frequency band the iPhone is using
Not direct software solution but on the back of your iphone there are is a Model number, on my Iphone 5s it is A1530.  Different models are supplied in different countries according to the frequency bands licensed there. If you google that number with model of iphone and or frequency band you will find information as to what frequency bands your specific hardware supports.