I found an article on deep-cycle batteries, and they comment that if a battery goes below 10.5V, it's "dead" due to the specific gravity of the acid being too low to be useful any more.
It appears that you may need a new battery. : (
By "iPhone charger" I assume you mean 5V 500 mA power source. Note that some USB outlets only provide 100 mA until the device actually answers the USB protocol and requests more than that, although wall outlet based ones will have all the juice all the time.
You can use a boost converter to take the 5V input to a 15V output. Either build one on your own using a switching controller, an inductor, some capacitors, and some amount of diodes/transistors, or buy a ready-made one from vendors like CUI or Murata or RECOM. Note that the current at 15V will be about 150 mA with 500 mA in at 5V and 90% efficiency.
Then, use a charge circuit for NiMH batteries. It's OK to parallel the charge circuit putting current in, and the device drawing power out from the batteries, as long as the charge circuit is properly current limited and follows the battery chemistry charging profile.
Actually, given that 1.2V NiHM cells have a max charge voltage of between 1.4V and 1.5V, 15V may not be enough, given the likely drop in the charge circuit. You may need to go to 18V. If you're ambitious, you could control the output voltage of the boost converter based on the current charge level of the batteries. That'd take some careful design tuning, but would make the whole system more efficient.
Stacking NiMH to get to 12V seems bad, though. I'd rather use something safe like a LiFePO4 battery, and charge that from the 5V (using a direct charge circuit, or using a buck converter that is controlled as a charger for higher efficiency.) Then use a boost converter from the battery to generate the 12V output needed. Again, such boost converters can be hand-built, or can be bought from providers. The charger would connect to the battery. The on/off switch for the whole device would connect/disconnect the battery to the boost converter that goes to 12V.
In both cases, the device could run on charger power, assuming the total draw at 12V is less than 150 mA (meaning total power draw of about 2 Watts or less.)
Best Answer
The method of charging a battery while being effective but without doing damage varies with battery chemistry.
Since you have a "12V" battery, I'm guessing it is a lead-acid type like you find in cars. Lead acid are fairly forgiving in how they can be charged, unlike other chemistries, especially certain types of lithium. Basically charge a lead acid with power that is both current and voltage limited. The voltage limit is usually 13.6 V for car batteries. The maximum current depends on the size of the battery. A ordinary car battery can take several amps easily. For example, a power supply that is limited to 5 A and 13.6 V will work just fine to charge ordinary car batteries, although that's not pushing the maximum allowed current. That means it will drop the voltage to not exceed 5 A or drop the current to not exceed 13.6 V, whichever is lower. Hardware and automotive stores sell chargers for car batteries that have all this built in. The only gotcha is a charger advertized as "fast" may abuse the battery. A full charge should take a few hours, although most of the time the battery should not get low enough to require that.
If your battery is smaller, then you have to dig up its datasheet or somehow get specs for it and make sure the charger doesn't produce too much current.
If your battery is not lead-acid, then things could be quite different. In that case you really have to get the specs, which should include the required charging profile. Getting this wrong, particularly with some types of lithium, could result in pyrotechnics.