Skip to content

Commit 7218f07

Browse files
Start packager automatically in example, fix xcode-project for RN 61 (#137)
1 parent 71315cb commit 7218f07

File tree

3 files changed

+26
-48
lines changed

3 files changed

+26
-48
lines changed

example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ PODS:
182182
- React-cxxreact (= 0.61.2)
183183
- React-jsi (= 0.61.2)
184184
- React-jsinspector (0.61.2)
185-
- react-native-slider (2.0.2):
185+
- react-native-slider (2.0.5):
186186
- React
187187
- React-RCTActionSheet (0.61.2):
188188
- React-Core/RCTActionSheetHeaders (= 0.61.2)
@@ -252,7 +252,7 @@ DEPENDENCIES:
252252
- Yoga (from `../../node_modules/react-native/ReactCommon/yoga`)
253253

254254
SPEC REPOS:
255-
https://github.com/cocoapods/specs.git:
255+
trunk:
256256
- boost-for-react-native
257257

258258
EXTERNAL SOURCES:
@@ -325,7 +325,7 @@ SPEC CHECKSUMS:
325325
React-jsi: 32285a21b1b24c36060493ed3057a34677d58d09
326326
React-jsiexecutor: 8909917ff7d8f21a57e443a866fd8d4560e50c65
327327
React-jsinspector: 111d7d342b07a904c400592e02a2b958f1098b60
328-
react-native-slider: 5d61590f26a51cf0a858bfd1543f6d6ec8b78a6e
328+
react-native-slider: 39208600e44f885e2d2c0510b5c6435a0f62d087
329329
React-RCTActionSheet: 89b037c0fb7d2671607cb645760164e7e0c013f6
330330
React-RCTAnimation: e3cefa93c38c004c318f7ec04b883eb14b8b8235
331331
React-RCTBlob: d26ac0e313fbf14e7203473fd593ccaaeee8329e
@@ -340,4 +340,4 @@ SPEC CHECKSUMS:
340340

341341
PODFILE CHECKSUM: c57ebc9c17572d007c20bb8d19901226d73a2699
342342

343-
COCOAPODS: 1.7.5
343+
COCOAPODS: 1.8.4

example/ios/example.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
FD10A7F022414F080027D42C /* Start Packager */,
108108
13B07F871A680F5B00A75B9A /* Sources */,
109109
13B07F8C1A680F5B00A75B9A /* Frameworks */,
110+
28C29AB2238D3A7100EFC540 /* Start Metro Bundler */,
110111
13B07F8E1A680F5B00A75B9A /* Resources */,
111112
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
112113
);
@@ -133,6 +134,7 @@
133134
developmentRegion = English;
134135
hasScannedForEncodings = 0;
135136
knownRegions = (
137+
English,
136138
en,
137139
Base,
138140
);
@@ -195,6 +197,24 @@
195197
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
196198
showEnvVarsInLog = 0;
197199
};
200+
28C29AB2238D3A7100EFC540 /* Start Metro Bundler */ = {
201+
isa = PBXShellScriptBuildPhase;
202+
buildActionMask = 2147483647;
203+
files = (
204+
);
205+
inputFileListPaths = (
206+
);
207+
inputPaths = (
208+
);
209+
name = "Start Metro Bundler";
210+
outputFileListPaths = (
211+
);
212+
outputPaths = (
213+
);
214+
runOnlyForDeploymentPostprocessing = 0;
215+
shellPath = /bin/sh;
216+
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../../node_modules/react-native/scripts/.packager.env\"\n\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\nif nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\nif ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\necho \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\nexit 2\nfi\nelse\nopen \"$SRCROOT/../../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\nfi\nfi\n";
217+
};
198218
FD10A7F022414F080027D42C /* Start Packager */ = {
199219
isa = PBXShellScriptBuildPhase;
200220
buildActionMask = 2147483647;

example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@
66
parallelizeBuildables = "NO"
77
buildImplicitDependencies = "YES">
88
<BuildActionEntries>
9-
<BuildActionEntry
10-
buildForTesting = "YES"
11-
buildForRunning = "YES"
12-
buildForProfiling = "YES"
13-
buildForArchiving = "YES"
14-
buildForAnalyzing = "YES">
15-
<BuildableReference
16-
BuildableIdentifier = "primary"
17-
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18-
BuildableName = "libReact.a"
19-
BlueprintName = "React"
20-
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21-
</BuildableReference>
22-
</BuildActionEntry>
239
<BuildActionEntry
2410
buildForTesting = "YES"
2511
buildForRunning = "YES"
@@ -34,39 +20,13 @@
3420
ReferencedContainer = "container:example.xcodeproj">
3521
</BuildableReference>
3622
</BuildActionEntry>
37-
<BuildActionEntry
38-
buildForTesting = "YES"
39-
buildForRunning = "YES"
40-
buildForProfiling = "NO"
41-
buildForArchiving = "NO"
42-
buildForAnalyzing = "YES">
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
46-
BuildableName = "exampleTests.xctest"
47-
BlueprintName = "exampleTests"
48-
ReferencedContainer = "container:example.xcodeproj">
49-
</BuildableReference>
50-
</BuildActionEntry>
5123
</BuildActionEntries>
5224
</BuildAction>
5325
<TestAction
5426
buildConfiguration = "Debug"
5527
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5628
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
5729
shouldUseLaunchSchemeArgsEnv = "YES">
58-
<Testables>
59-
<TestableReference
60-
skipped = "NO">
61-
<BuildableReference
62-
BuildableIdentifier = "primary"
63-
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
64-
BuildableName = "exampleTests.xctest"
65-
BlueprintName = "exampleTests"
66-
ReferencedContainer = "container:example.xcodeproj">
67-
</BuildableReference>
68-
</TestableReference>
69-
</Testables>
7030
<MacroExpansion>
7131
<BuildableReference
7232
BuildableIdentifier = "primary"
@@ -76,8 +36,8 @@
7636
ReferencedContainer = "container:example.xcodeproj">
7737
</BuildableReference>
7838
</MacroExpansion>
79-
<AdditionalOptions>
80-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
8141
</TestAction>
8242
<LaunchAction
8343
buildConfiguration = "Debug"
@@ -99,8 +59,6 @@
9959
ReferencedContainer = "container:example.xcodeproj">
10060
</BuildableReference>
10161
</BuildableProductRunnable>
102-
<AdditionalOptions>
103-
</AdditionalOptions>
10462
</LaunchAction>
10563
<ProfileAction
10664
buildConfiguration = "Release"

0 commit comments

Comments
 (0)