I dont know exactly what I did, but I resolved my problem.
- I updated MacOS and Xcode
- I uninstalled cocoapods from gem
gem uninstall cocoapods - I had some error while I was running
bundle exec pod install. So I usedsudo xcode-select --switch /Applications/Xcode.applink - Then
sudo xcodebuild -license accept - Then I ran installer
npx react-native init template --template react-native-template-typescriptand everything was good!
Also I can recommend you to use these commands to know where is your error
npx react-native init testproject --skip-installcd testprojectyarn installcd iosbundle installbundle exec pod install