All the answers are good, but I suggest to do a custom Run Script in Build Phases to change dynamically the Bundle Identifier name. Is more difficult, but its the answer for some cases like copy GoogleServices-Info.plist if you are using flavors (change flavor instead of environment)
Link: https://medium.com/@m1nori/googleservice-info-plist-file-with-flavors-ios-firebas-edae5fb8e81d