Ah! the good old days when a power supply was simply a power supply with certain defined performance characteristics. Simply assess the usual parameters and if nothing too different one power supply is much the same as another. I never had any trouble using whatever power supply came to hand (with matching adaptors, that is)for my laptops.
For some reason the modern computer power supply now includes a signal wire which identifies the power supply to the computer.
This may (or may not) have some justification if there are subtle but important power supply needs differing from one laptop to another and dangerous, in some way, if a perfect fit is not available.
But it seems the signal connection is fragile in some laptops/notebooks/etc. and users get messages telling them the power supply is not recognised and their battery will not be charged. A situation which gets progressively worse (see Dell forums for a measure of how big a problem this is for some users).
Whether this applies today to phones and IPads I wouldn't know but I wonder to what extent there is something devious being practised by the manufacturers e.g. as per the printer manufacturers.
Try using a refilled ink cartridge or a non-proprietary ink cartridge and many printers decide to get difficult and either not recognise the cartridge or refuse to report the contents. Perhaps this is intended to ensure we only use batteries and chargers supplied by the manufacturer and not purchase "compatible" equipment from China at rock bottom prices.