I am developing a project on react native with code 13 on the apple m1 silicon MacBook (with rosetta). When I run the app at simulators, It works fine. But when I am trying to build the archive, I am getting the below error:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/fullmad/Library/Developer/Xcode/DerivedData/SagaReserve-duapakfprfhtegesxylbxmqxpuew/Build/Intermediates.noindex/ArchiveIntermediates/SagaReserve/IntermediateBuildFilesPath/SagaReserve.build/Release-iphoneos/SagaReserve.build/Script-56137AE1D33D66E1E5FA1B49.sh (in target 'SagaReserve' from project 'SagaReserve')
cd /Users/fullmad/Apps/sagaMobile/ios
/bin/sh -c /Users/fullmad/Library/Developer/Xcode/DerivedData/SagaReserve-duapakfprfhtegesxylbxmqxpuew/Build/Intermediates.noindex/ArchiveIntermediates/SagaReserve/IntermediateBuildFilesPath/SagaReserve.build/Release-iphoneos/SagaReserve.build/Script-56137AE1D33D66E1E5FA1B49.sh
mkdir -p /Users/fullmad/Library/Developer/Xcode/DerivedData/SagaReserve-duapakfprfhtegesxylbxmqxpuew/Build/Intermediates.noindex/ArchiveIntermediates/SagaReserve/BuildProductsPath/Release-iphoneos/SagaReserve.app/Frameworks
/Users/fullmad/Apps/sagaMobile/ios/Pods/Target Support Files/Pods-SagaReserve/Pods-SagaReserve-frameworks.sh: line 42: source: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
Showing Recent Messages
mkdir -p /Users/fullmad/Library/Developer/Xcode/DerivedData/SagaReserve-duapakfprfhtegesxylbxmqxpuew/Build/Intermediates.noindex/ArchiveIntermediates/SagaReserve/BuildProductsPath/Release-iphoneos/SagaReserve.app/Frameworks
Showing Recent Messages
/Users/fullmad/Apps/sagaMobile/ios/Pods/Target Support Files/Pods-SagaReserve/Pods-SagaReserve-frameworks.sh: line 42: source: unbound variable
What I have done so far is, pod reintegrated, pod Lockfile deleted, pod installed again, stopped and restarted Xcode, restarted laptop, but nothing worked. Please help..