I’ve dealt with smartphone focus problems before. At least for Android, there is a way to manually focus using the default Camera app, which has helped me a lot. Here are my notes from an old project journal post of mine, with a few edits:
For Android:
With the default camera app on Android, there is an option to change from Auto to Manual focus.
The two important things here are the focus and the exposure compensation settings. Tap on the little symbols and there will be a scale that pops on screen (tapping out will cause the scale to close).
With focus, I usually turn the focus level to the lowest it can go, and then move the camera closer or further away so that the organism in question gets in focus. For a image further out you can move the focus out a bit and shift the camera so that what you want in focus is in focus. I also use digital zoom to check that what I want in focus is in focus, or to better frame microflowers or plant parts. I get pretty good results from this technique—not superb quality, but a marked improvement from using autofocus. Particularly works well with anything really small or thin, say a tiny chickweed flower or a small beetle at the end of a spindly twig.
Before learning about Android manual focus example observation: https://www.inaturalist.org/observations/72958318
After learning about Android manual focus example observation: https://www.inaturalist.org/observations/107594860
Exposure compensation (the +/- thing) can be used to adjust the photo if it is too bright or too dark. Everything else (white balance, ISO, shutter speed) can be ignored for the beginner user—I don’t use those settings much and things turn out fine.
More info on manula camera mode for Android: https://www.gadgets360.com/mobiles/features/pro-manual-camera-mode-android-how-to-use-features-2227915
The iPhone default camera doesn’t have manual focus capabilities, but I’m sure you could download a different camera app and do the same technique as above. One could also try using the focus-lock feature on the iPhone to achieve the same thing by having it focus on something as close as possible and then lock focus at that level.
More info on iPhone photography: https://iphonephotographyschool.com/iphone-camera-controls/


