소스 검색

Merge pull request #3005 from saghul/fix-ios-dev-debug

[iOS] Fix running in Debug mode on a device
master
Zoltan Bettenbuk 7 년 전
부모
커밋
31864b95ab
No account linked to committer's email address
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      ios/sdk/sdk.xcodeproj/project.pbxproj

+ 1
- 1
ios/sdk/sdk.xcodeproj/project.pbxproj 파일 보기

337
 			);
337
 			);
338
 			runOnlyForDeploymentPostprocessing = 0;
338
 			runOnlyForDeploymentPostprocessing = 0;
339
 			shellPath = /bin/sh;
339
 			shellPath = /bin/sh;
340
-			shellScript = "export NODE_BINARY=node\nif [[ \"$CONFIGURATION\" == *Debug* ]]; then\n    export SKIP_BUNDLING=1\nfi\n../../node_modules/react-native/scripts/react-native-xcode.sh";
340
+			shellScript = "if [[ \"$CONFIGURATION\" == *Debug* && ! \"$PLATFORM_NAME\" == *simulator ]]; then\n    IP=$(ipconfig getifaddr en0)\n    if [ -z \"$IP\" ]; then\n        IP=$(ifconfig | grep 'inet ' | grep -v ' 127.' | cut -d\\   -f2  | awk 'NR==1{print $1}')\n    fi\n    DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\n    echo \"$IP\" > \"$DEST/ip.txt\"\n    exit 0\nfi\nexport NODE_BINARY=node\n../../node_modules/react-native/scripts/react-native-xcode.sh";
341
 		};
341
 		};
342
 		26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */ = {
342
 		26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */ = {
343
 			isa = PBXShellScriptBuildPhase;
343
 			isa = PBXShellScriptBuildPhase;

Loading…
취소
저장