App Store - Bundle Display Name too long? - xcode

Getting a bundle display name length too long when trying the validate the archive to upload to the App Store.
Where is the Bundle Display Name stored? Unless I am confused I think my display name is only 8 characters long???
Here is the info.plist entry.

You are showing the wrong Info.plist. There are two types: the app has Bundle OS Type Code APPL and Bundle Creator OS Type Code ????, while a framework has Bundle OS Type Code FMWK and Bundle Creator OS Type Code ????.
So apparently what you've found is some framework Info.plist. Moreover, have now lamed it by changing the Bundle Creator OS Type Code to a wrong value.
You need to fix this one so it work again, and then go find the real one, the one belonging to the app. My guess is that you have lamed that one in some way too.

Related

Safari App Extension: Cannot find executable file that matches the value of CFBundleExecutable in nested bundle

I'm trying to validate my OS X application's archive, but I keep running into the following errors.
Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle MySafariExtension [My-Company.MyMacApp.pkg/Payload/MyMacApp.app/Contents/PlugIns/MySafariExtension.appex] property list file.
An unknown error occurred.
Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle MySafariExtension [My-Company.MyMacApp.pkg/Payload/MyMacApp.app/Contents/PlugIns/MySafariExtension.appex/Contents] property list file.
An unknown error occurred.
When I explore the contents of my app I can see the the nested executable in MyMacApp.app/Contents/Plugins/MySafariExtension.appex/Contents/MacOS/MySafariExtension
But when I install the app from a .pkg file the extension does not show in Safari. I still see the executable in the same path. I looked at this question without any luck figuring out what's going on.
Resources are scarce for Safari App Extension so hopefully some clarification as to what's going on here will help a lot of people! Thanks in advance.
UPDATE
After installing the package, if I click Allow Unsigned Extensions in Safari I can see the extension in safari preferences. So maybe there is an issue when signing the Safari App Extension. I'm using the same team/cert that is signing the OS X app though.
Turns out the issue was with the SafariAppExtension Info.plist. I mistakenly had it targeted as a member of the SafariExtension bundle and that was causing the issue.

ITMS-90289 - Using App Groups in Mac App Store

I have tried to submit my app to the Mac App Store and I am being shown Error ITMS-90289.
I am not sure where I am going wrong. Should I be naming the app group something different?
ERROR ITMS-90289: "Invalid code signing entitlements. Your application bundle's signature contains code signing entitlements that are not supported on Mac OS X. Specifically, value '[group.co.uk.smudgeinc.BLANK]' for key 'com.apple.security.application-groups' in 'co.uk.smudgeinc.BLANK' is not supported. This value should be a string or an array of strings, each starting with your TEAMID followed by a dot '.'."
group.identifier is used for iOS App Group names.
For Mac projects, the App Group should start with your Team ID (found here: https://developer.apple.com/account/#/membership).
When you add an App Group to your project, Xcode fills the name with $(TeamIdentifierPrefix). My project failed validation when I used $(TeamIdentifierPrefix).name, showing a similar message to yours.
Explicitly setting this value to [Team ID].name resolved the issue for me (i.e. Team ID is "ABC123" – use ABC123.name).

Xcode - failing to validate archive due to weird issues with resolving variables/placeholders in info.plist and entitlements

Something is really broken with my project or Xcode and I'm struggling since two days to figure out what is going on.
My application is running perfectly fine, it is an OS X application and it contains a Today Widget extension. I finalized the project recently and now I'm unable to publish the app due to validation errors.
It started with the validator complaining about my Application Group, which I use to share content between the main application and the Widget extension. The group was defined as $(TeamIdentifierPrefix)com.acme.GreatApp.
The validator was complaining that my Group name was in the wrong format and should rather start with my TEAMID. After 3 hours of running in circles I replaced the placeholder $(TeamIdentifierPrefix) with my team ID (e.g. S3F45A5S35.) – and that worked.
Then the validator complained about every kind of other placeholder in my info.plist and entitlements files, things like $(PRODUCT_NAME), com.acme.GreatApp.$(PRODUCT_NAME:rfc1034identifier) and $(EXECUTABLE_NAME). I replaced all those placeholders with their corresponding values, which then was accepted.
Then, for a while the validator complained about structural issues, which do not make too much sense to me:
iTunes Store operation failed.
Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle GreatAppWidget [com.acme.GreatApp.pkg/Payload/GreatApp.app/Contents] property list file
iTunes Store operation failed.
Bad bundle identifier. The bundle identifier 'com.acme.GreatApp.GreatAppWidget' of the application extension GreatApp.app/Contents/Plugins/GreatAppWidget.appex should extend the dotted path of the bundle identifier of its containing application (com.acme.GreatApp.GreatAppWidget)
Are you telling me my extension is contained in my extension?
iTunes Store operation failed.
Invalid bundle location. Bundle GreatApp.app/Contents/Plugins/GreatAppWidget.appex must be contained in parent bundle's Contents/Plugins directory.
Well, the error states that I should do what it claims is not correct. Obviously it IS in the parent apps folder Contents/Plugins. So what?
iTunes Store operation failed.
The CFBundleExecutable of two bundles may not point to the same file. The following shared bundle path have been found: GreatApp.app/Contents.
The thing is, my app and extension work perfectly fine. If there was anything broken like dependencies, paths or whatever, something most likely wouldn't work, no?
Furthermore, I did not modify any of the build settings or just anything which I do not understand. These are all the default settings. I created a new Cocoa application, added a new Today Widget Extension as target - and that is it. I did not mess around with any paths, locations, dependencies, anything.
Anyway, those errors were only visible for a while and I'm lucky I made a screenshot then. Because now, again it is showing raw placeholders in the error messages, even though I didn't change a thing that could cause that. The only thing I can recall I did was to delete/revoke all provisioning profiles and certificates locally on disk, in the Keychain, and in the Member Center and created everything from scratch through Xcode.
Now the errors look like this:
iTunes Store operation failed.
Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle ${bundleName} [${bundlePath}] property list file
iTunes Store operation failed.
Bad bundle identifier. The bundle identifier '${bundleIdentifier}' of the application extension ${bundlePath} should extend the dotted path of the bundle identifier of its containing application (${parentBundleIdentifier})
iTunes Store operation failed.
Invalid bundle location. Bundle ${bundlePath} must be contained in parent bundle's ${pluginsSubPath} directory.
iTunes Store operation failed.
The CFBundleExecutable of two bundles may not point to the same file. The following shared bundle path have been found: ${sharedBundlePath}.
So I thought maybe Apple just fuped it in the recent update and you just can't validate an app with extension. So I searched the web and found the really nice example Today-Scripts. I added app groups ($(TeamIdentifierPrefix)com.acme.Today-Scripts, the placeholder here perfectly works) to all targets, activated sandboxing, changed certs and provisioning profiles: And it perfectly validates!
So I compared all the build setting etc. And except that I had to replace the placeholders with their actual values, obviously the certs and profiles and the fact that in Today-Scripts there is an additional XPC target which is embedded into the Widget, they are atomically the same. Every single setting is the same.
I cleared all caches, really hard. Cleaned the project, cleared ~/Library/Developer/Xcode/DerivedData as well as ~/Library/Caches/com.apple.dt.Xcode, restarted several times, nothing helps.
I'm really desperate as I have no idea left what I can do. Please someone shed some light on what the heck Xcode is doing here and why.
What causes Xcode to fail to interpret all the placeholders in the info.plist and entitlements files?
How can these bundle errors above happen when I am working with
the exact settings XCode created by creating new cocoa app and adding an extension target?
the exact same settings/dependencies as the Today-Scripts example?
I finally found the culprit! The problem was, for some reason I can not explain, the info.plist of the extension was a member (Target Membership) of the main application. I just found that by analyzing the created archive file by file and found an additional info.plist inside the GreatApp.app/Contents/Resources folder. In that file the placeholders were not resolved. The archive validator then used this info.plist for validation.
That little checkbox cost me 3 days.
I was getting
"iTunes Store operation failed. Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle ${bundleName} [${bundlePath}] property list file"
error when I try to submit my adobe air app to mac app store.
The executable is located at "/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/AdobeCP15.plugin/Contents/MacOS/AdobeCP"
In info.plist file located at "/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/AdobeCP15.plugin/Contents/info.plist"
it is written as
CFBundleExecutable
adobecp
These files are generated automatically but it took time to discover the case-sensitivity. Therefore, I changed it into
CFBundleExecutable
AdobeCP
and error message disappeared.
I ended up at this post because I had a similar error, but a different cause. My issue was caused by having a WatchKit app and having the 'Embed Watch Content' Build Phase after my 'Run Script' Phase. Once I moved the 'Embed Watch Content' Build Phase in between 'Copy Bundle Resources' and 'Embed Frameworks', the validation of the WatchKit succeeded.

How to register a custom non-document UTI / file type for OSX to recognize it?

I've read all the tickets about this issue, but I still don't get it right. I have a non-document OSX app (for OSX Lion and MountainLion). I want this app to export and import custom data, associated with a custom file extension ".iobs". Internally, these files are just data archived with [NSKeyedArchiver archivedDataWithRootObject:], and saved onto the disk with the "iobs" extension.
So, my check list is this:
1) Export mechanism: checked. My app create correctly .iobs files. If I run "file <filename.iobs>" in the Terminal, I get "iObserve_exportedItems.iobs: Apple binary property list"
2) Declaration of an exported UTI, checked. As shown in the image below. I did NOT declared a custom Document type, since it I never use NSDocument inside my app, and there is no point. Anyway, I already tried and failed. I've tried also different combinations of "Conforms To" entries, but with no success.
3) Is there any 3rd point??? Do I need to start my app once to let the system know? I just ran it in Debug from Xcode so far, and this has no effect. So I guess my Info.plist is wrong, but I filled it from within Xcode4 interface, so???
Thanks for any help, hint, question, suggestion.
Ok, so apparently, I do have to declare a document type even if I don't specify a document class. See the attached screenshot. Note that leaving only the Document UTI doesn't work. I do need the two (exported UTI and document type). Note also that if I say it conforms to com.apple.binary-property-list, I don't have the right icon.
And for those who wonder, there is nothing to do to "register" a type (and its subsequent changes) apart from launching the app once.

iPhone app Rejection

I recently submitted my app and Apple rejected it because I used: 'AppName iPhone Edition'
Which seemed to be correct from reading their terms and conditions, but they told me I cannot use iPhone in the name displayed on the device.
So, the question is, when I change the Product Name in the build settings, it asked me for a new provisioning profile. Do I need to create a new provisioning profile, or can I just change the app name that appears on the device?
You can change your app name and not need a new provisioning profile as long as you keep the same bundle ID.
By default,the Info.plist has this:
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
Just change it to whatever you want and keep your product name unmodified.
You also need to change it yin iTunes Connect.
Provisioning profiles are tied to the app identifier by default (com.yourCompany.yourAppProductName). So when you change the product name (in the build settings) the identifier changes also. You can manually specify an identifier code in the summary to avoid problems like this.
Also be sure that you are changing the "Bundle Display Name" in the info tab. This name can be anything and does not require changing the product name or identifier.

Resources