From 4308c087e6c367004d613fd39a76565d9b80d1ae Mon Sep 17 00:00:00 2001 From: Rebecca Hughes Date: Fri, 15 May 2015 23:19:58 +0100 Subject: [PATCH] Auto populate the ReactServer info.plist setting --- Examples/2048/2048.xcodeproj/project.pbxproj | 17 +++++++++++++++++ .../Movies/Movies.xcodeproj/project.pbxproj | 17 +++++++++++++++++ .../SampleApp.xcodeproj/project.pbxproj | 17 +++++++++++++++++ .../TicTacToe.xcodeproj/project.pbxproj | 17 +++++++++++++++++ .../UIExplorer.xcodeproj/project.pbxproj | 17 +++++++++++++++++ 5 files changed, 85 insertions(+) diff --git a/Examples/2048/2048.xcodeproj/project.pbxproj b/Examples/2048/2048.xcodeproj/project.pbxproj index d792a2d621d598..ca6c5a6375638c 100644 --- a/Examples/2048/2048.xcodeproj/project.pbxproj +++ b/Examples/2048/2048.xcodeproj/project.pbxproj @@ -143,6 +143,7 @@ 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + DA71AC921B06A5A10023A08E /* ShellScript */, ); buildRules = ( ); @@ -230,6 +231,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + DA71AC921B06A5A10023A08E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [[ $VALID_ARCHS == *\"armv\"* && $CONFIGURATION == \"Debug\" ]] ; then\n IP_ADDR=$(ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}')\n PACKAGER_URL=\"http://$IP_ADDR:8081\"\n\n echo \"Writing IP address of host ($PACKAGER_URL) to info.plist...\";\n if ! /usr/libexec/PlistBuddy -c \"Set :ReactServer $PACKAGER_URL\" $INFOPLIST_FILE ; then\n /usr/libexec/PlistBuddy -c \"Add :ReactServer string $PACKAGER_URL\" $INFOPLIST_FILE\n fi\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/Examples/Movies/Movies.xcodeproj/project.pbxproj b/Examples/Movies/Movies.xcodeproj/project.pbxproj index e86674f6821456..59f4d959a06e20 100644 --- a/Examples/Movies/Movies.xcodeproj/project.pbxproj +++ b/Examples/Movies/Movies.xcodeproj/project.pbxproj @@ -181,6 +181,7 @@ 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + DADAF4C81B06A5F30069223E /* ShellScript */, ); buildRules = ( ); @@ -290,6 +291,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + DADAF4C81B06A5F30069223E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [[ $VALID_ARCHS == *\"armv\"* && $CONFIGURATION == \"Debug\" ]] ; then\n IP_ADDR=$(ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}')\n PACKAGER_URL=\"http://$IP_ADDR:8081\"\n\n echo \"Writing IP address of host ($PACKAGER_URL) to info.plist...\";\n if ! /usr/libexec/PlistBuddy -c \"Set :ReactServer $PACKAGER_URL\" $INFOPLIST_FILE ; then\n /usr/libexec/PlistBuddy -c \"Add :ReactServer string $PACKAGER_URL\" $INFOPLIST_FILE\n fi\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj b/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj index adaa6f58b9b8bd..cd7c59fc755044 100644 --- a/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj +++ b/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj @@ -334,6 +334,7 @@ 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + DAFFEB2A1B06A61200653BD2 /* ShellScript */, ); buildRules = ( ); @@ -513,6 +514,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + DAFFEB2A1B06A61200653BD2 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [[ $VALID_ARCHS == *\"armv\"* && $CONFIGURATION == \"Debug\" ]] ; then\n IP_ADDR=$(ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}')\n PACKAGER_URL=\"http://$IP_ADDR:8081\"\n\n echo \"Writing IP address of host ($PACKAGER_URL) to info.plist...\";\n if ! /usr/libexec/PlistBuddy -c \"Set :ReactServer $PACKAGER_URL\" $INFOPLIST_FILE ; then\n /usr/libexec/PlistBuddy -c \"Add :ReactServer string $PACKAGER_URL\" $INFOPLIST_FILE\n fi\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 00E356EA1AD99517003FC87E /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj b/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj index db9c36269e6d1d..8e151f32d55f99 100644 --- a/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj +++ b/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj @@ -143,6 +143,7 @@ 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + DAFFEB371B06A63400653BD2 /* ShellScript */, ); buildRules = ( ); @@ -230,6 +231,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + DAFFEB371B06A63400653BD2 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [[ $VALID_ARCHS == *\"armv\"* && $CONFIGURATION == \"Debug\" ]] ; then\n IP_ADDR=$(ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}')\n PACKAGER_URL=\"http://$IP_ADDR:8081\"\n\n echo \"Writing IP address of host ($PACKAGER_URL) to info.plist...\";\n if ! /usr/libexec/PlistBuddy -c \"Set :ReactServer $PACKAGER_URL\" $INFOPLIST_FILE ; then\n /usr/libexec/PlistBuddy -c \"Add :ReactServer string $PACKAGER_URL\" $INFOPLIST_FILE\n fi\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj b/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj index 8b94a27cf75086..e5aca37b171021 100644 --- a/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj +++ b/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj @@ -350,6 +350,7 @@ 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + DAFFEB461B06A65200653BD2 /* ShellScript */, ); buildRules = ( ); @@ -539,6 +540,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + DAFFEB461B06A65200653BD2 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [[ $VALID_ARCHS == *\"armv\"* && $CONFIGURATION == \"Debug\" ]] ; then\n IP_ADDR=$(ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}')\n PACKAGER_URL=\"http://$IP_ADDR:8081\"\n\n echo \"Writing IP address of host ($PACKAGER_URL) to info.plist...\";\n if ! /usr/libexec/PlistBuddy -c \"Set :ReactServer $PACKAGER_URL\" $INFOPLIST_FILE ; then\n /usr/libexec/PlistBuddy -c \"Add :ReactServer string $PACKAGER_URL\" $INFOPLIST_FILE\n fi\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 004D289A1AAF61C70097A701 /* Sources */ = { isa = PBXSourcesBuildPhase;