Floating D+ and D- on a USB Charger
How a device interacts (if at all) depends on the device (for example: a phone) and the charger.

Problem is that there is no universally applied standard for USB charging so many manufacturers "do their own thing".

I found here an application note by Maxim. From this the following picture confirms that chargers can be different in how they treat the D+ and D- lines:



This is just the charger's side. How a phone etc. responds to this is another matter.

Apple products are well known for not working with non-Apple / generic accessories so your iPhone 7 will no doubt refuse to charge from anything else but an Apply charger or a charger which is good enough in convincing the phone that it is an Apple charger. 

You're right that a device should only draw (not 500 mA but) 100 mA from a USB port when D+ and D- are floating so no communication can take place (the device cannot be enumerated). However, not all devices will follow this rule.

Some just pull 1 A no matter what.

Some might just increase the current until the voltage drops too much. 

Others simply refuse as they don't know what is charging them (like your iPhone).