xcodebuild exportArcive- How to customize the default IPA file name while exporting from command line?
Asked Answered
G

3

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.

Gromme answered 29/11, 2016 at 11:29 Comment(3)
See: https://mcmap.net/q/80342/-xcode-quot-build-and-archive-quot-from-command-lineDiallage
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.Bradbradan
@Bradbradan can you share script and procedure to build ipa with custom nameFilemon
V
5

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.

V1 answered 22/11, 2017 at 19:39 Comment(0)
I
4

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

Incipient answered 14/8, 2018 at 10:0 Comment(0)
D
0

set the info.plist -> Bundle name to $(PRODUCT_NAME)

Damarisdamarra answered 26/4, 2023 at 6:52 Comment(1)
Welcome to Stack Overflow! While this code may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please edit your answer to add explanations and give an indication of what limitations and assumptions apply.Duaneduarchy

© 2022 - 2024 — McMap. All rights reserved.