I tried Camera pixels. Says it does it, but I can't get it to work. I got it to take 227 pictures of the same thing though.
You need a phone with two or three cameras first. Then click on "Mode", then "Focus Bracket". Next, go into "Set" and choose the number of images you want to take and the depth of focus you want. Take the picture, hold the phone as still as possible. After that you'll need to import the images into something that can do the focus stacking. Helicon Focus, Affinity Photo, etc. and merge them all into a single image. This app can't do the merging, but as far as I'm aware this is the first iOS app that can do the capturing, which is a good first step.