How to change the DisplayName of an iOS Application? - ios

I know there are so many answers related to my question, such like.
Programmatically rename an XCode project
Renaming xcode 4 project and the actual folder
etc.
But look at following my code:
NSString *plistPath = #"...../TestingAPI-Info.plist";
NSMutableDictionary *dictionary = [[NSMutableDictionary alloc]initWithContentsOfFile:plistPath];
[dictionary setObject:#"myTestingApp" forKey:#"CFBundleDisplayName"];
[dictionary writeToFile:plistPath atomically:YES];
I am changing the name of apps icon by above code,
Changed name "MySuperApp => myTestingApp"
SO, Is it valid to change by using above code ? I have fear of app rejection ?? I also want to set all changes through above code like, Bundle identifier, Bundle name..etc ?
Is it valid or not ?? By using above code apple reject my application or not ??

As rckoenes said correctly, this won't work on the device. Any bundle contents are readonly, including the info.plist. You can not overwrite it.
To clarify:
Just open up the Info.plist file in Xcode and rename it to whatever you want. You don't need any code for this. You will find the YourProjectName-Info.plist file within your Xcode project.

The writeToFile call will not work i.e. the contents will never get update in the Info.plist file. API call may return a false success but contents of that file will never change since application bundle is read-only (obviously the contents within it as well).
As per Appstore review guidelines there is one which suggests,
2.6 Apps that read or write data outside its designated container area will be rejected.
But whether app bundle falls under "designated container area" is a matter of speculation because only Apple can clarify this. AFAIK I have not read anywhere about app getting reject for attempting to write into application bundle.
As a side note: It may not be a good idea to change application name randomly without the users consent.
Hope that helps!

This is very unusual, app name is your brand it is finalized with lot of suggestions and thinking. What is benefits of this and why is your requirements to change name likewise.

Related

App Store Connect issue ITMS-90129 keeps blocking upload

App Store Connect keeps blocking App upload by issuing
ITMS-90129: The bundle uses a bundle name or display name that is already taken.
So far I tried:
Changing the Display Name, Bundle Identifier (even with generated Hashcodes to make sure that the names really are not taken already)
Created alternative Profiles, Identifier and App in App Store Connect (also using the same mentioned hashcode)
Tried these changes in the Xcode input fields (under 'General') and also directly modifiyng the Info.Plist
Re-Exporting the project from Unity to XCode with the new naming (to make sure Unity is not writing some bundle id somewhere which is not visible in XCode)
(Update) Tried to Clean the build folder based on
minchaej suggestion
Additional information: The XCode project is exported from Unity and we're using Firebase which is installed via Pods.
I'm grateful for any hint where to continue looking - because I'm really running out of ideas. Thanks a lot for taking the time.
Cheers
vik
The solution for this (probably very Unity-to-XCode specific) issue was localization related:
I had to remove all but the English localization entry in the Localization section.
I'm not sure why there were other loca resources before (since we didn't set them up) but I assume these included an alternative app name which was causing the ITMS-90129 to pop up.
My salvation for ITMS-90129 is the next:
Remove definitions for
CFBundleName
CFBundleDisplayName
CFBundleSpokenName
for base(en) localisation InfoPlist.strings.
Setup this variables with single value $(PRODUCT_NAME) directly in Info.plist
Variable $(PRODUCT_NAME) define via root project Build Settings/Packaging/Product Name
Setup variable LSHasLocalizedDisplayName in YES value in Info.plist
Setup Russian (or other) localisation for variables
CFBundleName
CFBundleDisplayName
CFBundleSpokenName
via InfoPlist.strings
As I am personally assume, setup this variables via base localisation is the key of problems in which I am faced with

No suitable application records were found. Verify your bundle identifier 'com.swiftyjson.SwiftyJSON' is correct

It's really bothering. I have several apps on the App Store, some of them use SwiftyJSON, but this latter one is weird. I'm trying to upload it to the App Store but I get this strange error.
No suitable application records were found. Verify your bundle
identifier 'com.swiftyjson.SwiftyJSON' is correct.
I have double checked project's bundle identifier it's correct, com.myname.appname. Also, it's correct on the iTunesConnect as well. I've read other similar questions, none of them helped. I'm using carthage and Xcode 9.
I don't know how these are related but I removed the Info.plis file, create a new project and replaced the app's plist file with this new one and the error is gone.

Invalid Binary issue while uploading iMessage Sticker App using XCode 8

I have created a StickerExtensionPack. Apparently, Apple is treating a sticker extension pack as just another app that needs to go in the Sticker Category, fair enough.
However, when I uploaded the binary, I was sent back an email saying that the binary is invalid, because of the following reason:
Invalid Messages Application Support - The MessagesApplicationSupport
folder is missing and you have LSApplicationLaunchProhibited set to
true in your Info.plist. Either rebuild your application using the
current public (GM) version of Xcode or remove the
LSApplicationLaunchProhibited key from your Info.plist and resubmit
your application. Invalid iMessage App - The bundle contains an
invalid implementation of iMessage support. Add
MessagesApplicationSupport/MessagesApplicationStub next to your
Payload directory in your IPA.
MessagesApplicationSupport/MessagesApplicationStub must match the
binary at TapTeach.app/TapTeach and have no post processing applied to
it.
I'm doing a simple sticker pack. I'm on XCode and can not find LSApplicationLaunchProhibited anywhere in the info.plist within the my files!
Any guidelines on how to resolve this will be helpful. Thanks.
Try these steps:
turn off Bitcode from "Yes" to "No"
Change the version to CURRENT_PROJECT_VERSION = 1.10.11.
You don't need to recreate your project, just change the version. I reran the build and it's currently "in review" in iTunes without any errors.
So far, the only way I have been able to work around this issue is to repeatedly delete and recreate the project until iTunes Connect accepts a build. And really, I'm not even sure if the project recreation is actually helping - it could be entirely random - as it still only works about 50% of the time and turning off Bitcode, as mentioned by the OP, did not help.
At least two out of the three sticker packs I am currently working on have had this problem (with Xcode 8.0 and 8.1), so it's befuddling how this cannot be more widespread. I have to assume it's something specific that's causing it, but I am not sure what. So I guess until a proper solution is found: try, try again.

Delphi ios app gets wrong name on phone when in release build

This may seem like a stupid question. But when I make a debug build, my app gets the correct name on the "ios desktop". When I use release build, it gets the name of the app I made some time ago.
I have been into project settings and changed it for all similar/device debug/release modes.
I have also made a Windows search and replaced all places found.
I do also use other provision profiles, but I am still wondering if it could be something like that? But I just do not believe that can be the case... So clearly me + Windows search is missing something somewhere....
Check the the name in your .plist for the Bundle Display Name. That is the the name of the end product. check this similar question App store name and info.plist

NSUserDefault problem in iOS 4.2

I have prepared a "Settings.bundle" file that contains plist with properties. However, after I compile and load the app, I can't find the those properties in [NSUserDefaults standardUserDefaults]. After I go to the settings and modify the properties there, all the modified properties can be found in [NSUserDefaults standardUserDefaults] (the unmodified ones are still missing). Is this a known problem in iOS 4.2? I tried the same program in iOS 3.2 and it was ok.
I wrote a library that duplicates the settings from setting.bundle inside the app, during that I discovered that the defaults in setting.bundle are not registered unless the user goes to the app's settings in the settings app. Here's the function I wrote that goes though the all the plists in the settings.bundle and registers the user defaults: http://bitbucket.org/keegan3d/inappsettings/src/2053acd0524e/InAppSettings/InAppSettingsReader.m
I'm not sure why it's working in iOS 3.2 for you but it might be that the settings are registered from a previous build.

Resources