Sorry to revive an old thread. I found a solution to Macs (and maybe other unix PCs) 'corrupting' SD cards.
It's because macOS will write hidden files/folders to the root of the SD card - even if you simply copy your photos from it. Just the presence of these hidden files causes Pentax cameras to think that the card needs formatting.
Eg.
1. I take some photos with my K-70.
2. I copy file files to my mac. It doesn't matter if I insert the SD card into a separate reader, or connect the K-70 to the Mac with a USB cable. And it doesn't matter if I use Photos to import the files - or simply use Finder. However I copy them it 'corrupts' the SD card.
3. I carefully eject the SD card or K-70, and re-insert the SD card in the camera or remove the SD cable and turn the camera back on. The camera say 'Card not formatted'.
The problem is that when I copied the files from the SD card - MacOS creates a hidden folder in the root of the SD card called .fseventsd. If I remove this folder, then the camera will no longer think the SD card needs formatting. And the photos I previously took on it will still be there.
The snag is that deleting hidden files & folders in MacOS can be a little tricky...
- You can use Terminal if you're comfortable with doing that. Run Terminal. type 'cd /volumes/<sd card name>' and press return. My sd card's called k-70 so I'd type 'cd /volumes/k-70'. Check that you're in the correct folder by typing 'ls -a' and return. You should see the files '. .. .fseventsd DCIM' Finally remove the /fseventsd folder by typing 'rm -rf .fsevents.
- Alternatively you can turn on showing hidden files in Finder. Again this requires a terminal command - 'defaults write com.apple.finder AppleShowAllFiles YES' One you've done that, you need to force finder to restart before it will show the hidden files. Once you can see .fseventsd in Finder at the root of your SD card, select it, and delete it directly with Option/Cmd/Delete. Don't just move it to the trash - otherwise MacOS will create another hidden file on you SD card called '.Trashes' (!) - which is even trickier to remove.
Unfortunately both the fixes above are fiddly and arcane - and you have to do them again every time you copy files from your camera or SD card. There's a utility available - BlueHarvest - that does all this for you automatically, and available from the Mac app store. It costs £20 though
Really I think Pentax is being too picky about this. It should really just ignore these hidden files (those with a name starting with '.') in the root folder, and continue to be able to use them as long as the DCIM folder's still there.