์์ ์ค์ ๋ค์์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค. 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
์ ์ํํ๋ฉด ์ ์์ ์ผ๋ก ์ ๋ ๊ฒ์ด๋ค. ๋ฌธ์ ํด๊ฒฐ ๋.
๋๊ธ