How to change Display Name of Safari Extension for iOS devices? - xcode

Can you please help me change the Display Name of the Safari Extensions(iOS v15) for the iPhone/iPad?
I did try (in Xcode) all combinations of updating Build and Bundle Ids and display names, but nothing worked. I tried updating the CBBundleDisplayName property in the project file and also in plist file, but didn't make any difference.
My app/extension ID is: "ABC.MNO.XYZ", and accordingly, there are four targets generated in Xcode, mainly App, Test, UITest, Extension.
The last target (Extension) one is already set to "ABC MNO XYZ Extension" by default, and there I tried to change its Display Name without suffix of Extension, but nothing worked, causing either build issues or no change in the app.
In sum, the app name and extension name, both in Settings > Safari > Extensions and also in the Safari Browser Extension's popup menu, should be set to "ABC MNO".
How to resolve this issue?

Change the "name" attribute in the manifest.json file, within the Targets projects, that(last folder) ends with the suffix "Extension", like "ProjectName Extension".
Then, remove the existing (installed) extension on the device, and rebuild the project, to see the new custom name.

Related

React Native App - Name change in Xcode - no longer runs ' ***App has not been registered

I have an elaborate React Native App which has been running perfectly until we decided to make it a white label product.
The name of the project had changed - we changed styling etc and everything was complete and tested - then I noticed the 'identity and Type' section in Xcode and an editable name box - i changed the name to the new white label brand. Xcode whirred away changing file names.
I tried to run the app in the ios simulator - it built but displayed an error:
I cleaned build folder. Same error - removed app cache - same error.
So i changed the name back to LRMApp as seen below:
Still get the same error - refuses to run at all!
Can anyone offer some advice to fix? I can role back to previous repo commit but would have to dissect a lot of work from a merge, so hoping there is an easy fix!
There are things to make sure that the changed name is returned to its original name.
You have to make sure that you changed the name of the project. Name
of the top-level folder in the project
Did you change the identity and type name?
Check out the name of the Scheme.
Check the internal folder name of the project.
Please check the name under 'identity and type' by selecting a
subfolder for your project.
Check the name of the 'Info.plist' file in the Packaging menu.
Check out the name of the 'Product Bundle Identifier' in the
Packaging menu.

Is there a way to change the name of a Safari app extension in Xcode?

I have created a Safari app extension through an Xcode target that I want to change the name of. Initially, when creating the Xcode target, I simply called it "Safari Extension", thinking that I would be able to change it easily later. I thought changing it would be as easy as changing the "Bundle display name" in the Info.plist file in the target folder, as shown here:
However, I tried this and built the app, but nothing changed. I also tried uninstalling and reinstalling the extension and even the entire app, to no avail. If anyone has a way to rename the Safari app extension, please let me know. Thanks so much!
You can rename an extension quite easily. In the target, select the extension you need and go to Info. Change the Bundle Display name.
You need to edit the "extension_name" key in the extension's messages.json file under Resources/_locales.en/messages.json
Try creating a new scheme: click on the top-left 'Messenger Black' in your image and choose 'New scheme...' and put the new name in here. Save the scheme and this should then work okay.

how can i change the name of my mobile app using xcode7

My app is currently called a silly name. Does anyone know how to change it using xcode7?. By app name i mean when you see the little app icon on the home screen with the apps name below it.
i have looked at other answers but they are only explained using Xcode 4-6.
xcode7 only!
Well, if you want to simply change your app's name in Springboard (aka Home screen), without renaming your project, targets and etc (which is always a lot of pain), you can just change "display name" in your app's Info.plist.
More info here: https://developer.apple.com/library/ios/qa/qa1823/_index.html
As far as I know, it applies to all versions of Xcode.
This did not change at all for quite a long time, so any older Xcode version answer does still apply:
In Project Navigator select your project > select your build target >
go to Build settings > Product name
Just change product name for your target.

Couldn't load a Xcode project with pods [duplicate]

How do I rename a project in Xcode 5?
What steps do I need to take?
In the past this was always a very tricky manual process.
Well, the answer is very very very Apple simple in Xcode 5!
In the Project Navigator on the left side, click 2 x slowly and the Project file name will be editable.
Type the new name.
A sheet will appear with a warning and will list all the items Xcode 5 believes it should change.
You can probably trust it, but you should inspect it.
The list will include the info.plist and various files, but also all the relevant strings from nib/xib files like MainMenu menus.
Accept the changes and you will get the prompt to save a snapshot of the project.
Always make a snapshot when Xcode asks, it will be useful to restore if something does not work.
Change the project name:-
Click on the target in xcode, on the right in "Identify and Type" under name change the name and press the ENTER button on your keyboard.
A window will appear confirming the change and what it will change. Once you confirm it will make the changes.
Change the root folder name:-
Go to the project directory and rename the root folder,
Open the project and u will find all the file are missing, u need to add all the files of project again
Right click the project bundle .xcodeproj file and select “Show Package Contents” from the context menu. Open the .pbxproj file with any text editor.
4>Search and replace any occurrence of the original folder name with the new folder name.
5>Save the file.
Change the Scheme name:-
rename .xscheme file
If your Project is static framework then make sure your header file has public target membership
I really recommend just opening the folder in a general editor such as Sublime Text, and doing a find/replace across the whole folder. The other methods I found were unstable, particularly when combined with .xcworkspace and cocoapods.
In Xcode 8.0, to rename your project, just go through the following instructions as described in Xcode help:
1- Select your project in the project navigator.
2- In the Identity and Type section of the File inspector, enter a new
name into the Name field.
3- Press Return.
A dialog is displayed, listing the items in your project that can be
renamed. The dialog includes a preview of how the items will appear
after the change.
4- To selectively rename items, disable the checkboxes for any items
you don’t want to rename. To rename only your app, leave the app
selected and deselect all other items.
5- Click Rename.
Source: http://help.apple.com/xcode/mac/8.0/#/dev3db3afe4f
Xcode 6 (beta 6 as of now) seems to be not very reliable with renaming projects. For me it didn't rename several of the files and groups. It also doesn't rename the physical folder the project is in. To rename my project to be sure that everything is clean I went the extra length to create a new project with the new name and copy over all the files. The assets are easy to copy but groups have to be recreated. The biggest issue with this however are CoreData data model files. Trying to simply copy this will result in a corrupt model file, even though everything looks like it is alright.
When you re-name the project name in XCode5 then info.plist entry removed from Targets --- > General ---> identity. You just need to mention it again.
In Xcode 7, renaming a project can still break your app. Make sure you backed it up before trying it.
Click on the project icon and find the project name in the inspector pane. If you change it there, Xcode will ask you if you want to rename related files. Might work. But if not, try this brute force approach:
Close Xcode
Using an advanced text editor like Sublime Text or Atom, open the
root folder. It will open the folder structure.
Perform a Global Search and Replace (it's probably cmd + shift + f), and
replace My Wrong App Name with New App. If your project name contained spaces, also search for My_Wrong_App_Name and replace
with
New_App. This changes all file contents.
Now you need to find all
the files inside the project with your old app name. Rename them
all, also the folders.
Important: Open the project file with
right click > Show Package Contents, and rename all files in there.
Reopen your Xcode project or workspace. Compile.
If you use Pods, you need to open the pods project as well and change the files in there.
Here is another great example which works well with xcode 5

App Name Not Changing for iOS Localization

I am dumbfounded as to why my icon/app name will not change on the iPhone home screen when I change languages in the settings.
I have the proper code in my French info.plist for example
"CFBundleDisplayName" = "Your_Product_Name";
"CFBundleName" = "Your_Product_Name";
But it still won't change.
The only way I've been able to change it is under Build Settings -> Product Name. But that shows the same name across all languages.
Any idea how to get the proper name for the correct language? Thanks!
You're on the right way, but still missing a step before getting it working :)
You need to add a setting in your "app"-Info.plist:
Add the "Application has localized display name" setting and set it to YES.
Assuming you have created your InfoPlist.strings correctly (you should have one InfoPlist.strings in your fr.lproj directory, and another one in the en.lproj directory, each of them containing the appropriate CFBundleName and CFBundleDisplayName settings), your app name should now be translated according to the device's language settings.
You can also check this pretty good tutorial about iOS localization to get you started: http://www.raywenderlich.com/2876/localization-tutorial-for-ios

Resources