The length of time deleted files can remain on an iPhone is entirely dependent on how much use the device gets after the deletion. If the iPhone is not used at all, a deleted photo can be recovered years after it was lost. Heavily used iPhones will overwrite a deleted file in a shorter timeframe, making it impossible to retrieve with a software solution.