Rename the app in iphone - iphone

I have almost finished my iPhone app, but want to rename it as I don't like the name I chose in the beginning. Is this easy to do, and if so, how do I do it?

Go to target-> yourApplicationName(double click/get Info)->Build->ProductNAme
Set your new name for that application there
hAPPY cODING...

I don't know what rename does, but there are a possible 5 names to deal with. There's the name of your .xcodeproj file directory, the name of your target within that project, the Product Name under Packaging in the Build Settings, and the Bundle Display name in the Info.plist, and the name you provide for the app in iTunes Connect. None of these 5 names needs to be the same, and you can name them all slightly differently. In fact this is common.
For instance, you might want the Bundle Display Name to be short so that it will fit under the icon, and it can have spaces in it. The Product Name can be much longer and more descriptive, but can't have spaces. You iTunes Connect name might be longer still, with spaces, and you may have change the spelling, etc. slightly if your preferred spelling is already taken, etc.

In the latest version of xcode.
Project > rename.
Choose new name.

I had the same problem recently and tried Project -> Rename, as well as Target -> application name -> Build -> ProductName
Then, I remembered the .plist file. If you double click the .plist file in your app's resources folder, you'll see "Bundle Name". Changing this did the trick for me!

Change your bundle display name in info.plist file

Related

How to Localize NSPhotoLibraryUsageDescription key (ALAssets)

I'm trying to localize the NSPhotoLibraryUsageDescription key defined in the application's info.plist file (reference here).
This key gives you a point to provide custom message when the app is first asking for access to your camera roll.
I'm using ALAssetsLibrary to enumerate assets groups (which triggers the access request message to pop-up).
So far my googling doesn't answer how I could achieve this.
I want to avoid localizing the whole info.plist file as it contain a lot more non-locale dependent content.
Anyone already solved this or have hints how to proceed?
There is a file you can create (which may be created for you when you create a project) called InfoPlist.strings. This file is used and localized much like the file Localizable.strings.
In it you would have and entry something like:
NSPhotoLibraryUsageDescription = "Test of new Photos warnings";
Note that there are no quotation marks around the key
I think as long as the key is included in info.plist, it will localized using the value in InfoPlist.string if it is available for the language. Otherwise it will use whatever is defined in info.plist.
I have my note here https://github.com/onmyway133/notes/issues/290, or you will get
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
Once these issues have been corrected, you can then redeliver the corrected binary.
Make sure
You declare the keys in Info.plist
You localize it in InfoPlist.strings
You don't need double quotes, like "NSPhotoLibraryUsageDescription" = "Test of new Photos warnings";, you can just use NSPhotoLibraryUsageDescription = "Test of new Photos warnings";
The only way to make this work for me was in Xcode to:
1) Go to Project target -> Info-> Localization-> Add localization
Added language there. This operation created the <projectName>/<LanguageInitials>.lproj folder.
2) I created file InfoPlist.strings inside the folder <projectName>/<LanguageInitials>.lproj;
3) I added the text:
NSPhotoLibraryUsageDescription = "<Add your translated text here>";
inside that InfoPlist.strings file.
4) I then added that folder to the project with File -> add new files to the project or drag and drop.
Note: to test this I:
Cleaned cache, set the language on simulator to be the new one, edited the language in scheme to be the new one at running on simulator and restarted the simulator.

where in an XCode project does it set "InfoPlist.strings" as the filename to use for locationalization?

where in an XCode project does it set "InfoPlist.strings" as the filename to use for locationalization?
Just trying to understand how XCode pulls things together here. For example to set the app name specifically I can change this in "AppName_plist-Info.plist", however if I go localization it seems it then has to be set via the "InfoPlist.strings" files.
I can see in XCode where it specifies the "AppName_plist-Info.plist" file name, in the Target/BuildSettings/Packaging information area, but I don't see mention of "InfoPlist.strings", so how does Xcode/IOS know to override what is in "AppName_plist-Info.plist" based on what's in "InfoPlist.strings"?
Xcode doesn't really override the name, it creates localizations in your apps bundle. iOS will look for the name of the app in de localization folder to which the language of the system is set.
These files have pre-determent names, thus you can not set them.
All the localized files will be for example in bundle.app\en.lproj for english or bundle.app\nl.lprojfor dutch.

CFBundleExectuable Error

Can’t install application
The application at /Users/myname/Documents/SDK/iPhoneApplications/x/build/Debug-iphoneos/x.app does not specify a CFBundleExecutable
I don't know what this means or how to fix it. Can anyone help?
It only occurs when trying to build to a device - it is an iPhone 3G running 4.1 and I am using the latest SDK which allows me to build on iOS 4.1
I also faced the same problem and the solution that worked in my case was to add CFBundleExecutable in info.plist.
Here are the steps to do it
Click on the + icon in your info.plist and add CFBundleExecutable as String type.
2.then in its value just add
$(EXECUTABLE_NAME)
and then rebuild your app.
This worked for me and hope it works for you as well. All the best.
This value is specified in your Info.plist file. I would check your target for the debug configuration and make sure you have the correct plist file specified.
Double-click on your target and search for the Packaging section or for Info.plist.
If the plist is correct, check the content of your Info.plist to make sure you have either a value for either key CFBundleExecutable or key Executable file (they are the same value, but can be displayed with raw or friendly labels).
I faced this issue yesterday and I spent more than 6 hours to find the solution, just follow the instruction below.
1- Go to your "TARGETS".
2- Then go to "Build Settings".
3- After that go to "Basic" then "Combined".
4- Then under the Packaging, you will find the "Info.plist File", check here if your file correct or not, if it's not equal to "Your project Name/Info.plist" you must change it to "Your Project Name/Info.plist".
in my case, i have changed "Mach-O Type" to "Static Library", this may lead to the same question. just change it to Executable , worked for me
After you setup CFBundleExecutable to $(EXECUTABLE_NAME), you have to set EXECUTABLE_NAME's value in xcode. Select your target in TARGETS then go in the Build Settings tab and then search for Product Name.
Check that all your schemes product names are specified corretly to avoid any error (shouldn't contain any of the followin caracter \ [ ] { } ( ) + *).

Change a localized InfoPlist.strings using an Xcode target

Here's an obscure problem. I'm using an InfoPlist.strings to localize my app name. It's only got one value: CFBundleDisplayName = "Mon App". The strings file is localized (putting it in a directory for that localization).
I've just made an extra target, where I change things like the non-localized app name (different Info.plists), and the icon. I'm also changing the Default.png using a run script build phase (copying different files depending on the app type I'm building).
I've tried using the script to copy different versions of my InfoPlist.strings, but I couldn't make it work. Here's what I used:
if($TARGET_NAME == "MonApp")then
cp fr.lproj/MonApp_InfoPlist.strings fr.lproj/InfoPlist.strings
endif
I've seen a post suggesting wincent strings util for processing strings, but wanted to see if there's an easy way to do this. Any help greatly appreciated.
You don't need to do this.
If you have fr.lprog/InfoPlist.strings and en.lproj/InfoPlist.strings in your project, you should see just one InfoPlist.strings entry, with two subitems fr and en. If you drag and drop the InfoPlist.strings file into a Copy Bundle Resources build phase, all localized versions will be copied into the appropriate .lproj files at build time. You don't need to create a separate target or write a script to do this; the right thing happens.

Bundle Display Name in iPhone

Is it possible to modify the BundleDisplay name at runtime ???
Thanks
I'd be really surprised if you could, since doing so would require you to edit the Info.plist file, which is in a write-protected directory. Even if you could modify it, it would cause the code signature to no longer match the application bundle, and the app would refuse to launch.
The closest you can get to using a different display name is to provide localized versions of it.
If you set the Bundle Display Name to a variable ie ${MY_BUNDLE_DISPLAY_NAME} and make sure that gets set in your build phases or from your ENV, or from an XCCONFIG file when building from the command line, the name should be replaced with what you set it with.