I got my problem solved with solomon's solution. Seems like some quotation marks were missing by the way.
post_install do |installer|
"rm -rf Pods/Headers/Private"
"find Pods -regex 'Pods\/.*\.modulemap' -print0 | xargs -0 sed -i '' 's/private header.*/'"
end