.realm cannot be deleted because it is currently opened

@Vishal_Deshai

That error is due to realm being open. Per the original question

and that’s critical. If any code touched realm in any way before deleting, it won’t work and will throw that error.