my iphone keeps saying "sign in required" when i try to download an app
I have an iPhone 6s and I am trying to download an app on the app store but whenever i click install it says "sign in required" so i type in my password and then it disappears and then pops up again. It's not my storage because i still have around 30 gb left. I've searched for a solution for hours and none of the solutions are working, and i don't want to sign out of my apple ID in fear of losing my photos. I've attempted solving it by:
1. restarting my phone by holding the home and lock button down
2. signing out of the app store and then signing back in
3. signing out restarting my phone and signing back in to the app store
4. resetting my network settings
I haven't found any other solutions online just the same ones on different sites. Does anyone know how I can fix this?
iPhone 6s, iOS 10.3.3, null