CFBundleExectuable Error - iphone

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

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.

Validate causes error during Uploading iphone application

I am trying to upload an iphone application.In the last step I created an archive file and it also available in the organizer window.But when l clicks validate button it shows error.
"My Application does not contain a single–bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single–bundle application."
In my application have no static libraries .
Please give me a solution...
Thanks in advance
First of all go to the Build Settings, set the "Skip Install" to "Yes" and then
Under the Build Phases, examine the Copy Headers section. If there are any header files listed as Private or Public, drag them down to the Project section.

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

how to implement facebook in my application for iPhone

I have complete code for implemention for facebook in my application But the problem arises as follow :
Firstly whenever i import FBConnect\FBConnect.h the error will show that it doesn't "NO such file or direectory"
secondly due to this error i have 182 error in my application..
Thanks
You need to tell the compiler where to find the header files; in XCode, this is called "Header Search Path". You will also have linker errors later if the libraries aren't accessible.
Find "Header Search Paths" in build settings. Enter full path of the facebook sdk src folder(upto the folder-facebook-iphone-sdk/src) there.
This is assuming you have copied the reference of the FBConnect folder in your project and not the files themselves.
I tried by copying the files directly, but couldn't do so. Following the facebook developer wiki word by word would solve your problem.
Take care to see that your file name is correct..if so then check it out that that the file is present in the correct directory..

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.