Setting a passcode on your iPhone is the first line of defense to help prevent other people from accessing your personal details.
However, it’s pretty much easy for anyone with access to your iPhone to bypass the passcode protection (doesn’t matter if you configured Touch ID or not) and access your personal photos and messages.
A new critical security flaw discovered in iOS 8 and newer,