how to view raw images on iMac or iphone
When you import photos into the Photos library on macOS, the images are stored in ~/Pictures/Photos Library.photoslibrary/Masters/ (~ = user directory)

To access the photos library, navigate to the Pictures folder using Finder and right-click (control + click) the photo library and select Show Package Contents. After that, open the Masters folder, and you will see your photos organized in folders by dates. 



As far as I know, iPhones support shooting in RAW but not natively through the camera app. Please correct me if I'm wrong in the comments. Always delete photos from the Photos app to avoid corrupting your local photo library.

Source: OSXDaily