Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ And then:

```sh
cd /my/new/react-native/project/
yarn link "@react-native-community/cli-platform-ios" "@react-native-community/cli-platform-android" "@react-native-community/cli" "@react-native-community/cli-server-api" "@react-native-community/cli-types" "@react-native-community/cli-tools" "@react-native-community/cli-clean" "@react-native-community/cli-doctor" "@react-native-community/cli-config" "@react-native-community/cli-platform-apple" "@react-native-community/cli-link-assets"
yarn link "@react-native-community/cli-platform-ios" "@react-native-community/cli-platform-android" "@react-native-community/cli" "@react-native-community/cli-server-api" "@react-native-community/cli-types" "@react-native-community/cli-tools" "@react-native-community/cli-clean" "@react-native-community/cli-doctor" "@react-native-community/cli-config" "@react-native-community/cli-config-android" "@react-native-community/cli-platform-apple" "@react-native-community/cli-config-apple" "@react-native-community/cli-link-assets"
```

Once you're done with testing and you'd like to get back to regular setup, run `yarn unlink` instead of `yarn link` from above command. Then `yarn install --force`.
Expand Down
14 changes: 4 additions & 10 deletions packages/cli-config-apple/src/tools/installPods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,24 @@ import {execaPod} from './pods';

interface PodInstallOptions {
skipBundleInstall?: boolean;
newArchEnabled?: boolean;
iosFolderPath?: string;
}

interface RunPodInstallOptions {
shouldHandleRepoUpdate?: boolean;
newArchEnabled?: boolean;
}

async function runPodInstall(loader: Ora, options: RunPodInstallOptions) {
const shouldHandleRepoUpdate = options?.shouldHandleRepoUpdate || true;
try {
loader.start(
`Installing CocoaPods dependencies ${pico.bold(
options?.newArchEnabled ? 'with New Architecture' : '',
)} ${pico.dim('(this may take a few minutes)')}`,
`Installing CocoaPods dependencies ${pico.dim(
'(this may take a few minutes)',
)}`,
);

await execaPod(['install'], {
env: {
RCT_NEW_ARCH_ENABLED: options?.newArchEnabled ? '1' : '0',
RCT_IGNORE_PODS_DEPRECATION: '1', // From React Native 0.79 onwards, users shouldn't install CocoaPods manually.
...(process.env.USE_THIRD_PARTY_JSC && {
USE_THIRD_PARTY_JSC: process.env.USE_THIRD_PARTY_JSC,
Expand Down Expand Up @@ -63,7 +60,6 @@ async function runPodInstall(loader: Ora, options: RunPodInstallOptions) {
await runPodUpdate(loader);
await runPodInstall(loader, {
shouldHandleRepoUpdate: false,
newArchEnabled: options?.newArchEnabled,
});
} else {
loader.fail();
Expand Down Expand Up @@ -166,9 +162,7 @@ async function installPods(loader?: Ora, options?: PodInstallOptions) {
loader.info();
await installCocoaPods(loader);
}
await runPodInstall(loader, {
newArchEnabled: options?.newArchEnabled,
});
await runPodInstall(loader, {});
} finally {
process.chdir('..');
}
Expand Down
2 changes: 0 additions & 2 deletions packages/cli-config-apple/src/tools/pods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import execa from 'execa';

interface ResolvePodsOptions {
forceInstall?: boolean;
newArchEnabled?: boolean;
}

interface NativeDependencies {
Expand Down Expand Up @@ -188,7 +187,6 @@ export default async function resolvePods(
try {
await installPods(loader, {
skipBundleInstall: !!cachedDependenciesHash,
newArchEnabled: options?.newArchEnabled,
iosFolderPath: platformFolderPath,
});
cacheManager.set(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {CLIError} from '@react-native-community/cli-tools';
import {Config, IOSProjectConfig} from '@react-native-community/cli-types';
import getArchitecture from '../../tools/getArchitecture';
import {BuildFlags} from './buildOptions';
import {buildProject} from './buildProject';
import {getConfiguration} from './getConfiguration';
Expand Down Expand Up @@ -29,10 +28,6 @@ const createBuild =
args.forcePods ||
args.onlyPods
) {
const isAppRunningNewArchitecture = platformConfig.sourceDir
? await getArchitecture(platformConfig.sourceDir)
: undefined;

await resolvePods(
ctx.root,
platformConfig.sourceDir,
Expand All @@ -41,7 +36,6 @@ const createBuild =
ctx.reactNativePath,
{
forceInstall: args.forcePods || args.onlyPods,
newArchEnabled: isAppRunningNewArchitecture,
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
findDevServerPort,
cacheManager,
} from '@react-native-community/cli-tools';
import getArchitecture from '../../tools/getArchitecture';
import listDevices from '../../tools/listDevices';
import {promptForDeviceSelection} from '../../tools/prompts';
import {BuildFlags} from '../buildCommand/buildOptions';
Expand Down Expand Up @@ -83,10 +82,6 @@ const createRun =
args.forcePods ||
args.onlyPods
) {
const isAppRunningNewArchitecture = platformConfig.sourceDir
? await getArchitecture(platformConfig.sourceDir)
: undefined;

await resolvePods(
ctx.root,
platformConfig.sourceDir,
Expand All @@ -95,7 +90,6 @@ const createRun =
ctx.reactNativePath,
{
forceInstall: args.forcePods || args.onlyPods,
newArchEnabled: isAppRunningNewArchitecture,
},
);

Expand Down
Loading