8

I am using xcodebuild command line tool to create an archive and then export as IPA file, for my iOS project.

By default, while using xcodebuild -exportArchive, it creates the IPA file which has the same label as the scheme selected for building.

Is there anyway to change the output IPA file name while using xcodebuild -exportArchive from command line?

Any help will be greatly appreciated. Thanks.

Rashmi Ranjan mallick
  • 6,160
  • 7
  • 40
  • 58
  • See: http://stackoverflow.com/a/19696992/1457385 – shallowThought Nov 29 '16 at 14:14
  • 2
    What I was able to find out is that *ArchiveAction* tag in .xcscheme file can have attribute *customArchiveName* which can be set to anything you like. However, I prefer to avoid this and omit this attr, so that resulting exported IPA is called exactly as the Scheme by which it is built. Then I just `mv` its default name to whatever I need by my CI build script. – RAM237 May 05 '17 at 16:26
  • @RAM237 can you share script and procedure to build ipa with custom name – Darshan Mothreja Jan 21 '19 at 13:42

2 Answers2

4

Another way if that's not working is to set the customArchiveName (see this answer) https://stackoverflow.com/a/43809933

StackRunner
  • 1,434
  • 2
  • 16
  • 22
3

Change the PRODUCT_NAME in your target's Build Settings.

The parameter that sets your IPA name is actually PRODUCT_MODULE_NAME, which is by default empty and thus defaults to your PRODUCT_NAME.

Rivera
  • 10,444
  • 3
  • 53
  • 100