machorom / checkhall

checkhall project
0 stars 0 forks source link

mac ios build 환경구축 #22

Open machorom opened 7 years ago

machorom commented 7 years ago

mac ios build 환경구축

machorom commented 7 years ago

blueboxui-MacBook-Pro:~ checkhall$ git clone https://github.com/machorom/checkhall.git Cloning into 'checkhall'... remote: Counting objects: 199, done. remote: Compressing objects: 100% (54/54), done. remote: Total 199 (delta 20), reused 52 (delta 12), pack-reused 125 Receiving objects: 100% (199/199), 1.09 MiB | 832.00 KiB/s, done. Resolving deltas: 100% (49/49), done. blueboxui-MacBook-Pro:~ checkhall$

machorom commented 7 years ago

blueboxui-MacBook-Pro:checkhall checkhall$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" blueboxui-MacBook-Pro:checkhall checkhall$ brew help Example usage: brew search [TEXT|/REGEX/] brew (info|home|options) [FORMULA...] brew install FORMULA... brew update brew upgrade [FORMULA...] brew uninstall FORMULA... brew list [FORMULA...]

Troubleshooting: brew config brew doctor brew install -vd FORMULA

Developers: brew create [URL [--no-fetch]] brew edit [FORMULA...] https://docs.brew.sh/Formula-Cookbook.html

Further help: man brew brew help [COMMAND] brew home

machorom commented 7 years ago

blueboxui-MacBook-Pro:checkhall checkhall$ brew install node ==> Installing dependencies for node: icu4c ==> Installing node dependency: icu4c ==> Downloading https://homebrew.bintray.com/bottles/icu4c-58.2.sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring icu4c-58.2.sierra.bottle.tar.gz ==> Using the sandbox ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides libicucore.dylib (but nothing else).

If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/icu4c/lib CPPFLAGS: -I/usr/local/opt/icu4c/include

==> Summary 🍺 /usr/local/Cellar/icu4c/58.2: 242 files, 65MB ==> Installing node ==> Downloading https://homebrew.bintray.com/bottles/node-8.2.1.sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring node-8.2.1.sierra.bottle.tar.gz ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d ==> Summary 🍺 /usr/local/Cellar/node/8.2.1: 4,151 files, 45.9MB

machorom commented 7 years ago

blueboxui-MacBook-Pro:checkhall checkhall$ brew install watchman ==> Installing dependencies for watchman: pcre ==> Installing watchman dependency: pcre ==> Downloading https://homebrew.bintray.com/bottles/pcre-8.41.sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring pcre-8.41.sierra.bottle.tar.gz ==> Using the sandbox 🍺 /usr/local/Cellar/pcre/8.41: 204 files, 5.3MB ==> Installing watchman ==> Downloading https://homebrew.bintray.com/bottles/watchman-4.7.0_1.sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring watchman-4.7.0_1.sierra.bottle.tar.gz 🍺 /usr/local/Cellar/watchman/4.7.0_1: 22 files, 428.3KB

machorom commented 7 years ago

blueboxui-MacBook-Pro:checkhall checkhall$ npm install -g react-native-cli /usr/local/bin/react-native -> /usr/local/lib/node_modules/react-native-cli/index.js

machorom commented 7 years ago

xcode 설치버젼 확인 8.3.3

machorom commented 7 years ago

xcode > preference > locations > Command Line Tools 8.3.3 선택확인

machorom commented 7 years ago

blueboxui-MacBook-Pro:checkhall checkhall$ react-native run-ios Command run-ios unrecognized. Make sure that you have run npm install and that you are inside a react-native project. blueboxui-MacBook-Pro:checkhall checkhall$ npm install --save react-native@latest

fsevents@1.1.2 install /Users/checkhall/checkhall/node_modules/fsevents node install

[fsevents] Success: "/Users/checkhall/checkhall/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed Pass --update-binary to reinstall or --build-from-source to recompile npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN react-native@0.47.0 requires a peer of react@16.0.0-alpha.12 but none was installed.

machorom commented 7 years ago

BUILD FAILED

The following commands produced analyzer issues:

Analyze /Users/checkhall/checkhall/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
Analyze /Users/checkhall/checkhall/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c

(2 commands with analyzer issues)

The following build commands failed: Ld build/Build/Products/Debug-iphonesimulator/checkhall.app/checkhall normal x86_64 (1 failure)

Installing build/Build/Products/Debug-iphonesimulator/checkhall.app An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The bundle identifier of the application could not be determined. Ensure that the application's Info.plist contains a value for CFBundleIdentifier. Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/checkhall.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

machorom commented 7 years ago

react-native upgrade 실행후 build 는 성공함

machorom commented 7 years ago

Loading dependency graph, done. Bundling index.ios.js [development, non-minified, hmr disabled] 99.4% (315/316), failed. error: bundling failed: "Unable to resolve module react-native-router-flux from /Users/checkhall/checkhall/AppRouter.js: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start -- --reset-cache."

machorom commented 7 years ago

apns 인증서를 다운로드를 위해 developer 에 등록해야 한다.

차혁원 대표님에게 요청한 메세지

https://developer.apple.com/programs/enroll/ 여기 사이트에서 정보 기입하시고 결재하시면됩니다.

machorom commented 7 years ago

Installing build/Build/Products/Debug-iphonesimulator/checkhall.app An error was encountered processing the command (domain=MIInstallerErrorDomain, code=4): Failed to chmod /Users/checkhall/Library/Developer/CoreSimulator/Devices/AC16576E-59FD-4D55-BB4B-DDCCA7D7E0A0/data/Library/Caches/com.apple.containermanagerd/Bundle/Application/4DA3B094-4CB0-4619-909B-DDC2101523B0/checkhall.app/checkhall : No such file or directory Launching org.reactjs.native.checkhall org.reactjs.native.checkhall: 26988