Skip to content

Commit f417120

Browse files
authored
fix: output codegen'd code in the ios folder (#2694)
1 parent ac7c258 commit f417120

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/cli-config-apple/src/tools/pods.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ async function install(
100100
root,
101101
platform,
102102
reactNativePath,
103+
iosFolderPath,
103104
});
104105
await installPods(loader, {
105106
skipBundleInstall: !!cachedDependenciesHash,

packages/cli-config-apple/src/tools/runCodegen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ interface CodegenOptions {
66
root: string;
77
platform: string;
88
reactNativePath: string;
9+
iosFolderPath: string;
910
}
1011

1112
async function runCodegen(options: CodegenOptions): Promise<void> {
@@ -24,7 +25,7 @@ async function runCodegen(options: CodegenOptions): Promise<void> {
2425
'-p',
2526
options.root,
2627
'-o',
27-
process.cwd(),
28+
options.iosFolderPath,
2829
'-t',
2930
options.platform,
3031
]);

packages/cli/src/commands/init/init.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ async function createFromTemplate({
292292
root: projectDirectory,
293293
platform: 'ios',
294294
reactNativePath,
295+
iosFolderPath: path.join(projectDirectory, 'ios'),
295296
});
296297
await installPods(loader, {});
297298
loader.succeed();
@@ -311,6 +312,7 @@ async function createFromTemplate({
311312
root: projectDirectory,
312313
platform: 'ios',
313314
reactNativePath,
315+
iosFolderPath: path.join(projectDirectory, 'ios'),
314316
});
315317
await installPods(loader, {});
316318
loader.succeed();

0 commit comments

Comments
 (0)