I want to make copy of my existing app target with different name.
The changed name should reflect in simulator and info.plist
Select your project, now on the left panel select your target and click Duplicate.
To edit the name of the scheme just click on manage schemes under the scheme selection.
After adding a duplicate target to existing target .If you want to change the name ,Then select that target under manage scheme --->tap enter key on that it will coem to edit mode .And you can change the name.
Related
I have an iOS app written using storyboards and I and want to convert to SwiftUI with a totally new project. How do I preserve or transfer the project settings from the old project to the new project?
Here is possible way:
Backup current project folder (just in case, archive & store somewhere separately)
Duplicate project folder & rename it
From duplicated folder open .xcodeproj (non needed to rename)
In Project Navigator click project
4a. (keep project-wide-only settings). In target section select all targets and
click - button at bottom pane (or press Delete key on keyboard)
4b. (keep per-target settings). Select every target > Build Phases tab > Remove everything in every section.
I am trying to put a space in my app name (standalone sticker pack) in Xcode 8. The solutions I've seen on here are to change the Product Name (in packaging) or to change the "Bundle Display Name".
I've changed the product name and that hasn't worked (I cleaned, rebuilt, reset content and settings in simulator and logged out of xcode, logged back in and rebuilt app).
I can't see "Bundle Display Name" anywhere. Should I add it and if so, how do I do that?
I've read the thread How to change the name of an iOS app? and done the suggestions, but it's still showing in simulator and testflight without the space. Have I missed something?
Steps:
1. Open project Info.
2. Add a property Bundle display name into Custom iOS Target Properties. (as "Key")
3. Enter the display name, that will be shown on iPhone/iPad screen under an app icon. (as "Value")
It's my solution that works properly. Also you should delete previously installed app and reinstall it.
Just go to Target -> General -> In Identity -> Display Name. By default, it has your app display name which is unhighlighted. Enter here your new app display name.
There are two ways to change app display name.
Solution 1:
Goto Targets -> General Tab -> Identity section
In this you’ll find Display Name field where you set app display name.
Solution 2:
Bundle Display Name property is not present by default in Info.plist. You need to explicitly add this property.
Below image shows how to add this property.
Note: If still this new name is not reflected in your app then delete app and install it again.
When creating a new project, Xcode uses the Product Name by default. You can just change that in your Build Settings, even setting separate names for your schemes.
After changed Bundle display name make a Clean of project.
Change the Bundle Display Name (CFBundleDisplayName) in your Info.plist file
Check if you have any localization (InfoPlist.strings) files, and change the corresponding CFBundleDisplayName values in those files to the localized values.
That's it.
Goto Info.plist and add "Bundle display name" and set your rename in value box make sure the Bundle display name type is a string run the project automatically it will be changed
For xcode 9.3, Goto Targets, Build Settings, under packaging change Produce Name. See below screen shot
After this if it not changed, clean product to reopen X code.
I have a custom Xcode build scheme that moves some files to toggle between dev and prod variables. Can I change the app display name in the dev scheme as well?
For example, if the app name is "MyApp", it currently shows up on the home screen as "MyApp". Can I configure my dev build scheme so that it shows up on the home screen as "MyApp Dev"? I tried setting TARGET_NAME="MyApp Dev" in a pre-action build script, but it doesn't seem to work.
Xcode 7, iOS 9
You can do that easily.
Add a "User-Defined Setting" (e.g. DISPLAY_NAME) to your target and set different values for different Schemes.
Go to the "Info.plist" of your target and add "Bundle display name" key and set its value to "$(DISPLAY_NAME)"
In Xcode 8 (at least), in your build settings you should already have a setting called "Product Name" (under "Packaging"). That will take different values for different schemes, although they all default to "$(TARGET_NAME)". That's why, if you don't specify the display name, it takes the target name.
You can change any or all of them.
This way, you don't have to create a new user-defined setting.
This works for Xcode 9.
Target (General tab)-> Display name - $(PRODUCT_NAME)
In Build settings tab, search for Product Name and give the required product name under each schemes.
Totally new to iOS but I'm currently trying to setup Google Analytics. I have followed the SDK documentation and everything went great until this step:
Add the configuration file to your project
Drag the GoogleService-Info.plist file you just downloaded into the root of your Xcode project and add it to all targets.
It doesn't say anything on HOW to add it to all targets. Being new to Xcode and iOS in general, I'm completely lost. Anyone with an answer for me?
Thanks!
Select the GoogleService-Info.plist in the project navigator (the file hierarchy on the left side of Xcode). Then, if it isn't open yet, open the utilities bar (click the top-right most button in Xcode). You will see a section 'Target Membership'. Check all the checkboxes to add the .plist to all targets.
In most cases it is enough to just add the file to your project.
Physically drag the GoogleService-Info.plist file from your download folder ( or wherever you saved it) to your main project directory as shown below. Once you do that, the "Targets" dialog should open automatically and you can choose all targets (...click on all the targets shown)
In Xcode 6
Follow the step sequence in this digram.
First select your target.
Select build settings tab.
Search for "info.plist file"
Edit the value for key "info.plist file" (Add the actual plist path in step 4)
If you select the plist in question and then go to the file inspector (press command+option+1 or select the first tab on the right panel), you can select on which targets you wish to include it:
Update for Xcode 12.3:
It should be selected automatically, but check anyway:
ce you drag the file to the root dir, select it and on the very right hand side you will see Target membership, make sure all the targets are selected.
It is important to note that GoogleService-Info.plist file should be added to xCode i.e. open your xCode and drag the file to Runner > Runner.
Then click on GoogleService-Info.plist. On the right side of he screen you can find Target Membership.
I built my iPhone code atop Apple's sample project. It names the app "LazyTable" when placed on the home screen on iPhone. I would like to change this name. If I go to info.plist and manually type in a new name into the Bundle display name key, it works. But I don't want to hardcode because the PRODUCT_NAME is used in many places.
Info.plist
So I go into Project > Edit Project Settings to change the macro. I close the window, clean, and rebuild. The app name is still stuck with "LazyTable"! How do I make this change to the macro take effect?
Project Info
The approach you are using is correct. However, remember that each target can have their own settings that will override the project settings. Make sure the target does not override PRODUCT_NAME.
To do this, select the project in the Xcode project browser, then select the target. Each target has it's own build settings. Change the PRODUCT_NAME just as you would when editing the project build settings.