I’ve identified the root cause of the issue, which was related to the build settings. Specifically, it was the Optimization Level configuration. Setting the optimization level to "None" (both for general build settings and the Swift compiler) resolved the issue.
Here are the steps I followed:
Set the Optimization Level to "None" in the build settings. Set "No Optimization" in the Swift compiler settings. Performed a flutter clean. Removed the Pods and Podfile.lock. Restarted the process and reinstalled the Pods. Additionally, I reviewed the dependency versions and ensured they were updated as follows:
amplify_flutter: ^2.2.0 to 2.5.0 amplify_auth_cognito: ^2.2.0 to 2.5.0 amplify_core: ^2.2.0 to 2.5.0 Finally, I removed and re-added the required libraries in Link Binary with Libraries, which helped resolve the linking issues.