I believe this Medium post is what you need. It's incredible
https://medium.com/@hell-io/a-great-migration-transfer-your-ios-app-without-losing-firebase-users-91252c431acf