Why is my provisioning profile unable to be selected? - iphone

Edit: Doh! The reason it was unable to be selected was because the bundle identifier entry in the info.plist actually did contain the extra junk strings mentioned below. For some reason (possibly a carriage return in the string) resulted in the extra characters to be invisible in the info.plist so I didn't know they were still there. I just had to put my cursor at the end of the com.company.app and hold down the delete key to solve to problem.
Hope that helps someone else.
Hi,
I have an app. In the info.plist I have the bundle identifier as "com.company.app"
I have created a provision profile with the app identifier as "com.company.app" that is installed.
Under Project -> Edit project settings -> Code Signing Identity, I can select the provisioning profile correctly however if I right-click the target -> Get Info -> I cannot select the provisioning profile (It is greyed out with the message "Profile does not match Application identifier 'com.company.app FJ33AB3.au.com.company... FJ33AB3.au.com.company.company"
So where could it be getting that extra rubbish (FJ33AB3.au.com.company... etc) from? And any ideas how this can be fixed??
Thanks,

The reason it was unable to be selected was because the bundle identifier entry in the info.plist actually did contain the extra junk strings mentioned below. For some reason (possibly a carriage return in the string) resulted in the extra characters to be invisible in the single line of the info.plist so I didn't know they were still there. I just had to put my cursor at the end of the com.company.app and hold down the delete key to solve to problem.
Hope that helps someone else.

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.

Bundle Identifier confusion

Bundle Identifier in info plist has my name as company name and then product name which is basically application name.
So my question is that when i enter Bundle Identifier in provisioning profile myname.appname it shows in red that please use alphabet characters or numbers only. Why is that. I don't have company domain name instead i have myname. So i m using myname.appname in Bundle Identifier it shows message in red.
Am i doing something wrong here.
Please suggest.
Thanks
solved it. was using space in my name that is where the problem was.there should be no space if using name instead of company name. So basically myname.appname with no space in between

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 \ [ ] { } ( ) + *).

Rename the app in 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

Which characters are allowed in iPhone app name

I discovered I probably should rename my app. What characters are allowed in the name? I have searched for the list of restricted characters but have found none.
A second question. Apparently the simulator won't allow a slash in the name. Any workarounds (assuming / is allowed)?
You can keep your product name simple (not sure about the the exact rules - I stick with alphanumeric characters), but put additional characters (like '/') in the Bundle Display Name key of your Info.plist file. The name of the built file on disk will be your product name (set by the Bundle Name key), but the iPhone will show the Bundle Display Name value.
I ran into a similar problem a while back with the + character - I couldn't sign any apps with the character in the bundle name. So, I changed the name from Xxx+ to XxxPlus and set the Bundle Display Name to Xxx+. Looked like I wanted it to in the GUI and the signing worked fine.
/ is allowed, see attached scree cap .. alt text http://img713.imageshack.us/img713/5462/slashs.jpg