If you get the below error while running the generate_hash file, you need to check your Keychain Access app and need to remove a not used certificate that has duplicated name.
....
4. Codesigning your app using certificate used to sign your IPA ...
Executable=..../
Apple Distribution: ***,**** (*******): ambiguous (matches "Apple Distribution: ***** (*****)"
and "Apple Distribution: **** ***(*****)" in /Users/prudhviraj/Library/Keychains/login.keychain-db)
5. Generating app integrity/certificate snapshot ...
.
.
Invalid IPA file has passed to an argument, check your IPA file and try again.