File tree 5 files changed +32
-3
lines changed
cli-platform-apple/src/commands
5 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ exports[`shows up current config without unnecessary output 1`] = `
4
4
{
5
5
" root" : " <<REPLACED_ROOT>>/TestProject" ,
6
6
" reactNativePath" : " <<REPLACED_ROOT>>/TestProject/node_modules/react-native" ,
7
- " reactNativeVersion" : " 0.77 " ,
7
+ " reactNativeVersion" : " 0.78 " ,
8
8
" dependencies" : {},
9
9
" commands" : [
10
10
{
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export type BuildFlags = {
12
12
destination ?: string ;
13
13
extraParams ?: string [ ] ;
14
14
forcePods ?: boolean ;
15
+ onlyPods ?: boolean ;
15
16
} ;
16
17
17
18
export const getBuildOptions = ( { platformName} : BuilderCommand ) => {
@@ -62,6 +63,10 @@ export const getBuildOptions = ({platformName}: BuilderCommand) => {
62
63
name : '--force-pods' ,
63
64
description : 'Force CocoaPods installation' ,
64
65
} ,
66
+ {
67
+ name : '--only-pods' ,
68
+ description : 'Only install Cocoapods, do not build the app' ,
69
+ } ,
65
70
! isMac && {
66
71
name : '--device [string]' , // here we're intentionally using [] over <> to make passed value optional to allow users to run only on physical devices
67
72
description :
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ const createBuild =
24
24
}
25
25
26
26
let installedPods = false ;
27
- if ( platformConfig . automaticPodsInstallation || args . forcePods ) {
27
+ if (
28
+ platformConfig . automaticPodsInstallation ||
29
+ args . forcePods ||
30
+ args . onlyPods
31
+ ) {
28
32
const isAppRunningNewArchitecture = platformConfig . sourceDir
29
33
? await getArchitecture ( platformConfig . sourceDir )
30
34
: undefined ;
@@ -43,6 +47,10 @@ const createBuild =
43
47
installedPods = true ;
44
48
}
45
49
50
+ if ( args . onlyPods ) {
51
+ return ;
52
+ }
53
+
46
54
let { xcodeProject, sourceDir} = getXcodeProjectAndDir (
47
55
platformConfig ,
48
56
platformName ,
Original file line number Diff line number Diff line change @@ -79,7 +79,11 @@ const createRun =
79
79
let { packager, port} = args ;
80
80
let installedPods = false ;
81
81
// check if pods need to be installed
82
- if ( platformConfig . automaticPodsInstallation || args . forcePods ) {
82
+ if (
83
+ platformConfig . automaticPodsInstallation ||
84
+ args . forcePods ||
85
+ args . onlyPods
86
+ ) {
83
87
const isAppRunningNewArchitecture = platformConfig . sourceDir
84
88
? await getArchitecture ( platformConfig . sourceDir )
85
89
: undefined ;
@@ -98,6 +102,10 @@ const createRun =
98
102
installedPods = true ;
99
103
}
100
104
105
+ if ( args . onlyPods ) {
106
+ return ;
107
+ }
108
+
101
109
if ( packager ) {
102
110
const { port : newPort , startPackager} = await findDevServerPort (
103
111
port ,
Original file line number Diff line number Diff line change @@ -118,6 +118,10 @@ List all available iOS devices and simulators and let you choose one to run the
118
118
119
119
Force running ` pod install ` before running an app
120
120
121
+ #### ` --only-pods ` ,
122
+
123
+ Only install Cocoapods, do not build the app.
124
+
121
125
### ` build-ios `
122
126
123
127
Usage:
@@ -177,6 +181,10 @@ npx react-native build-ios --extra-params "-jobs 4"
177
181
178
182
Force running ` pod install ` before building an app
179
183
184
+ #### ` --only-pods ` ,
185
+
186
+ Only install Cocoapods, do not build the app.
187
+
180
188
### ` log-ios `
181
189
182
190
Usage:
You can’t perform that action at this time.
0 commit comments