μμ μ€μ λ€μμ μλ¬κ° λ°μνλ€. ios μ λ°μ΄νΈ μ΄ν μ΄μνκ² μλ¬λ€μ΄ λ§μ΄ λ°μνλ λ―νλ€.
Something went wrong running `pod install` in the `ios` directory
μ’ λ κΈΈκ²λ npx λͺ λ Ήμ΄λ₯Ό μ€ννλ μν©μ΄μλ€.
npx create-react-native-app
β What is your app named? … my-react-app
β How would you like to start › Default new app
β Downloaded and extracted project files.
Using Yarn to install packages. You can pass --use-npm to use npm instead.
β Installed JavaScript dependencies.
β οΈ Something went wrong running `pod install` in the `ios` directory. Continuing with initializing the project, you can debug this afterwards.
λ¬Έμ λ₯Ό μ°Ύμ보λ cocoapods
λΌλ λμ΄ λ¬Έμ λΌκ³ νλ€. μλμ κ°μ λͺ
λ Ήμ΄λ₯Ό ν΅ν΄ ν΄λΉ ν¨ν€μ§λ₯Ό λ€μ μ€μΉν΄μ£Όμ.
sudo gem install cocoapods
λ΄ κ²½μ°μ μμ‘΄μ±μ΄ λ§μ΄ κΉ¨μ Έμμ΄ λ€μκ³Ό κ°μ μλ¬κ° λ¬λ€.
ERROR: Error installing cocoapods:
The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.6. Try installing it with `gem install drb -v 2.0.6` and then running the current command again
drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν΄ λ€μ μλμ ν¨ν€μ§λ₯Ό λ€μκ³Ό κ°μ΄ μ€μΉνλ€.
sudo gem install drb -v 2.0.6
λ€μ cocoapods μ€μΉ λͺ
λ Ήμ΄λ₯Ό μ¬μ€ννλ€.
κ·Έλ¬λ, μΆκ° μλ¬ λ°μ...!
ERROR: Error installing cocoapods:
The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.7. Try installing it with `gem install activesupport -v 6.1.7.7` and then running the current command again
activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
μ΄λ²μλ μλμ κ°μ΄ λ€μ ν¨ν€μ§ μ€μΉλ₯Ό λ€μ νλ€.
sudo gem install activesupport -v 6.1.7.7
μ΄νμ λ€μ cocodpods
λ₯Ό μ€μΉνλ μ μ μ€μΉ μλ£!
μμ λ¬Έμ κ° μκ²Όλ React Native App ν΄λλ‘ λ€μ΄κ°μ ν΄λΉ ν΄λλ΄μ ios
ν΄λλ‘ λ€μ μ§μ
ν μλμ λͺ
λ Ήμ΄λ₯Ό μ€ννλ€.
μ΅,, κ·Έλ°λ° μμ§λ μ΄μ§ λ¬Έμ κ° λ¨μμλ€. Xcode λ¬Έμ λ€.
pod install
Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
(node:75985) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[Codegen] Found rncore
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
[!] Failed to load 'glog' podspec:
[!] Invalid `glog.podspec` file: undefined method `[]' for nil.
# from /Users/sark/dev/react-native/my-react-app/node_modules/react-native/third-party-podspecs/glog.podspec:38
# -------------------------------------------
# match = xcode_path.match(/Xcode (\d+)\.(\d+)/)
> major_version = match[1].to_i
# minor_version = match[2].to_i
# -------------------------------------------
μ΄λ² λ¬Έμ λ μλμ λκ°μ§ λͺ λ Ήμ΄λ₯Ό μ€ννλ©΄ ν΄κ²°μ΄ λμλ€.
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcode κ²½λ‘λ₯Ό μ΄μκ°μ΄ λ€μ μ‘μμ€ λ€μ
xcode-select -p
ν΄λΉ λͺ λ Ήμ΄λ₯Ό ν΅ν΄ μ μ μ§μ λμλμ§ νμΈμ΄ λλ€. μλμ κ°μ΄ νμΈμ΄ λ κ²μ΄λ€.
/Applications/Xcode.app/Contents/Developer
μ΄μ λ€μ pod install
μ μννλ©΄ μ μμ μΌλ‘ μ λ κ²μ΄λ€. λ¬Έμ ν΄κ²° λ.
λκΈ