I have the same issue :
The following did the trick for me:
Step 1 : Open the terminal and got to project directory using cd command
Step 2: Clear Xcode’s Derived Data:
run this command
rm -rf ~/Library/Developer/Xcode/DerivedData/
Step 3: Clear CocoaPods Cache:
run this command
rm -rf ~/Library/Caches/CocoaPods/
Step 4: Deintegrate CocoaPods:
run this command
pod deintegrate
Step 5 : Update CocoaPods:
run this command
pod update
After running these commands, it's usually a good idea to clean your Xcode project (Shift + Command + K) and then rebuild to ensure that everything is properly recompiled.