If you're working with Flutter, have followed all the steps and solutions, and are still experiencing an issue.
Runner.xcworkspace
instead of Runner.xcodeproj
.As stated in the updated OneSignal documentation
You must exclusively use the .xcworkspace file to open the project.
Similar issues may occur in other libraries if you didn't open the project using Runner.xcworkspace
.