cli icon indicating copy to clipboard operation
cli copied to clipboard

Allow run-ios to accept an xcconfig to be used in xcodebuild

Open dathorntonsbg opened this issue 5 years ago • 3 comments

Describe the Feature

I would love to see the ability to pass in an xcconfig file to run-ios so that configs can be used to customize the build process with xcodebuild. This is a very important feature for whitelabeled applications that use xcconfig, scheme and configuration for different versions of an app. I was able to make a 2 line change to pass in the xcconfig locally and it worked without issue.

Possible Implementations

File https://github.com/react-native-community/cli/blob/master/packages/platform-ios/src/commands/runIOS/index.ts#L570 Change Add a new option Implementation

{
  name: '--xcconfig [string]',
  description: 'Explicitly set xcconfig to use',
}

File https://github.com/react-native-community/cli/blob/master/packages/platform-ios/src/commands/runIOS/index.ts#L414 Change Pass xcconfig to xcodebuildArgs Implementation

const xcodebuildArgs = [
  xcodeProject.isWorkspace ? '-workspace' : '-project',
  xcodeProject.name,
  ... args.xcconfig ? ['-xcconfig', args.xcconfig] : [],
  '-configuration',
  args.configuration,
  '-scheme',
  scheme,
  '-destination',
  `id=${udid}`,
];

Related Issues

N/A

dathorntonsbg avatar Oct 09 '20 22:10 dathorntonsbg

Can you contribute this feature? :)

thymikee avatar Nov 26 '20 17:11 thymikee

@thymikee ill take a look at this

mdaj06 avatar Apr 20 '22 13:04 mdaj06

Hi @thymikee is this issue still open ?

ShaswatPrabhat avatar Oct 15 '22 16:10 ShaswatPrabhat

Hi @thymikee is this issue still open ?

@ShaswatPrabhat we would welcome your contribution here if you want to pick up the task :)

adamTrz avatar Oct 21 '22 08:10 adamTrz

Will share a PR for the same ASAP

ShaswatPrabhat avatar Oct 21 '22 09:10 ShaswatPrabhat

PR for the issue

ShaswatPrabhat avatar Oct 21 '22 09:10 ShaswatPrabhat