OK im not going to beat around the bush....your 13yo is talking to a stranger online, and swapping sex talk and watching porn.
How old is this "boyfriend"? Because he is probably a 40 year old, 17stone trucker called Trevor looking for vulnerable young girls.
My friends daughter was caught by a chap who said he was 14, all lovie dovie, persuaded her to send him naked crotch shots - surprise surprise it was a false account set up to entrap young girls. Predators are very good at doing this stuff.
YOU are not safeguarding your child OP.
I think you need to block all but a few Apps and stop her talking to boyfriends shes never met online! Maybe get yourself up to speed on internet safety too, because how on earth could you have allowed your 13 yo to have a virtual boyfriend. Talking about sex.....Un huh, and she has never met him? ...YOu are terribly naive OP. YOur DD has the excuse of being young, but as an adult - have you been hiding under a rock for the last 5 years to not know this?
Maybe as a start point, speak to the NSPCC about online safety. 0808 800 5002.
You need to put some boundaries and parental controls in place. SHe is 13! You are the one in control of the phone, you pay for the contract and the wifi, so stop thinking that she is going to be mad at you or that you shouldnt talk to your child about this stuff because YOU are the adult here. You have a duty to keep her safe. SHe is not the boss, and you are not her friend - you are the parent. Take back control, not just at night but always!
2 apps to suggest - Our pact, which is supposed to be good, and QUstodio which is £32pa is excellent for monitoring, blocking and time limiting phones. SUpposed to work really well with ANdroid, works ok with iphones.
You also need to get rid of chat apps other than those you are happy to monitor, and not allow any new apps except with your parental password.
YOU have to take responsibility for what she is up to on her phone. SHe is not old enough and you are putting her in real danger by being so lax with internet safety.