There seems to be a lot of confused and contradictory information floating around here.
"And you should angle the iPhone with respect to the coin. Don't hold it parallel to the coin." On the contrary - the camera should always be exactly parallel to the coin. I have a small level about 2 inches across to place across the back of my camera to make sure the camera is exactly level when I take pictures of my coins. I also make sure the surface where the coin is to be placed is exactly level. Thus the camera and the coin surface will be parallel. When the camera is not parallel to the coin, one
side of the coin will be blurry. And a round
flan will look oval.
About apertures: The larger the "hole" of the lense, the smaller the aperture number. An F2 aperture is larger than an F4 or F8 aperture. (I know it doesn't make sense: a larger lense "hole" has a smaller number.) To increase depth of
field, the lense must make a smaller "hole" -- ie you must set the "F number" to a bigger number. A smaller lense "hole" lets in less light, but it increases depth of
field. If you have a thick coin or one with high relief, increasing the depth of
field this way may
help. Mollinari is correct when he says "setting it to a larger number e.g. f/4 to 5.6 it will increase what appears to be in focus."
Lenses these days commonly have distortion around the edges, either showing as things being blurry, or straight lines being curved. You can avoid this to some extent by placing your coin at the center of the picture, and not having it go all the way to any edge of the viewfinder. You'll have to crop away the excess blank space to have a photo of just your coin, but that is better than a photo of a small coin on an immense background. If you have your camera set to a larger size picture, then when you crop away all that excess background, the remaining coin picture will
still be relatively large. They do make high
quality lenses where the distortion at the edges is minimized, but they are very expensive and not to be found in the regular day to day cameras people usually have.
Of course, if you get your camera too close to your coin, it will never get in focus. especially with the auto-focus found on today's cameras and phones. You might want to do a test series of photos to determine just how close you can get before it will not focus any more. If your camera has a macro setting, be sure and experiment around with that.
I sometimes miss my old camera where I could use manual focus if I wished, and I could set the aperture however I wanted. It even
had a depth-of-field button to press so I could see exactly the depth of
field produced by my manual settings or the automatic settings if I
had it set in that mode. Unfortunately, it required film . . .
Below I've attached two photos of the same coin that illustrate what I've been talking about here. The photo on the left
side was take "straight on" -- camera and coin were parallel. Notice the round
flan. The photo on the right was taken with the coin tilted slightly to try to
pick up a
bit more surface reflection. Notice the
flan is not round, and the top of the coin above NSTA is blurry. This is due to the camera and coin not being in parallel planes. Increasing depth of
field may have helped a
bit.