title: "git: error: Failed to determine realpath of '/Applications/.../iPhoneOS13.0.sdk' (errno=No such file or directory)\n
body: <p>I tried to <code>React-Native init</code> a new project, but it told me there is no CocoaPods and want me to install, like blow:</p>
  
  <pre><code>info Installing required CocoaPods dependencies
  ? CocoaPods (https://cocoapods.org/) is not installed. It's necessary for iOS pr
  oject to run correctly. Do you want to install it? Yes
  </code></pre>
  
  <p>well I already installed Cocoapods before, however I typed Yes, but it failed:</p>
  
  <pre><code>Password:
  /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("git: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk' (errno=No such file or directory)\ngit: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -find git 2&gt; /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)\ngit: error: unable to find utility \"git\", not a developer tool or in PATH\n") (RuntimeError)
      from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
      from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:49:in `run'
      from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/bin/pod:55:in `&lt;top (required)&gt;'
      from /usr/bin/pod:23:in `load'
      from /usr/bin/pod:23:in `&lt;main&gt;'
  
  (node:77073) UnhandledPromiseRejectionWarning: Error: Failed to update CocoaPods repositories for iOS project.
  Please try again manually: "pod repo update".
  CocoaPods documentation: https://cocoapods.org/
      at updatePods (/Users/easerliu/Projects/test1/app3/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/installPods.js:81:11)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
  (node:77073) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
  (node:77073) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  
  </code></pre>
  
  <p>When I type <code>pod install</code> <code>pod repo update</code> and other pod command, always get error like this:</p>
  
  <pre><code>/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("git: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk' (errno=No such file or directory)\ngit: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -find git 2&gt; /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)\ngit: error: unable to find utility \"git\", not a developer tool or in PATH\n") (RuntimeError)
      from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
      from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:49:in `run'
      from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/bin/pod:55:in `&lt;top (required)&gt;'
      from /usr/bin/pod:23:in `load'
      from /usr/bin/pod:23:in `&lt;main&gt;'
  
  </code></pre>
  
  <p>I tried reinstall Cocoapods </p>
  
  <pre><code>sudo gem install cocoapods
  Password:
  Successfully installed cocoapods-1.8.3
  Parsing documentation for cocoapods-1.8.3
  Done installing documentation for cocoapods after 3 seconds
  1 gem installed
  </code></pre>
  
  <p>and <code>sudo xcodebuild -license</code>
  but it does not work.
  BTW I updated Xcode yesterday, I do not know if it is the reason</p>
  
  <p>Version 11.1 (11A1027)</p>
  
  <p>Anyone can help me?</p>