The protective order will remain in place until Aug. 8, when there will be another hearing.
Bloom said in court that until then, the former couple have nannies in place who can transfer their 8-month-old daughter, Dream, between her parents.
At the time of the hearing, Dream was with her father, who did not appear in court.
"I would like to first and foremost thank the judge for granting me this restraining order to protect me," Chyna told reporters outside the courthouse. "I'm just gonna get back to co-parenting Dream."
Last week, Kardashian shared explicit images of Chyna to social media, and accused her of infidelity.
The reality star's attorney, Robert Shapiro, said in court today that they did not contest the restraining order, as Kardashian "regrets" his actions.
"Mr. Kardashian offers his apologies," he added.
In an interview with "Good Morning America" that aired on Monday, Chyna spoke out about the betrayal she felt when she saw Kardashian's posts.
"I was devastated, of course. I'm like, 'How could somebody, like, post these pictures of me?'" Chyna said. "And I'm like, 'Wow, OK, like, this is a person that I trusted.'"
"I'm not asking victims to change their behavior. I'm asking perpetrators not to commit crimes. It is a crime to post pictures like this," Bloom said on "GMA." "And if you do it, I hope that the full impact of the law rains down on you."