In my case, the added RunScript was listed after [CP] Embed Pods Frameworks ( what I needed for the app to work ) but after pod deintegrate + pod install, the RunScript was moved before [CP] Embed Pods Frameworks and triggered errors:
flutter build ios => …/build/ios/Release-iphoneos/Runner.app/Frameworks/SquareInAppPaymentsSDK.framework/setup: No such file or directory.