CFBundlePrimaryIcon key flagged as missing when its not in TVOS app - xcode

Long time iOS dev making my first TVOS app, and I get the "missing info plist CFBundlePrimaryIcon" error, although it appears that the value is actually present in the plist. The file is a 400x240 png, and is in the package. Here's a screenshot showing the plist and the error.
I'm also using an asset catalog with the icon in there as well. I manually added all the plist icon entries attempting to work around this. Here is the icon in the asset file:
I don't understand how to clear this error.

So, this is technically not an answer to how to fix the project errors shown above, but rather a heavy-handed workaround.
Part of my problems originally had to do with the icon layers, and as it says in this post, setting the back layers to no alpha channel, and leaving the front layers transparent corrected that.
So I just made a whole new project, copied all the files over, including the icon and other image files, and voila it uploaded the first time with no errors and is now waiting for beta test review.
My best guess is that while I was messing around with the asset catalog I deleted some "magic setting" of some kind that is too obscure to recreate manually.
Hope this helps someone along the line.

Related

Xamarin.iOS - Assets won't update

I'm developing a xamarin app for iPads. When I try to change asset for splashscreen/launchscreen, it remains the same no matter what I do on ipads, even tho on storyboard it looks correct. What could possibly be the problem?
I already tried to add the references to project file, clean & rebuild, delete bin and obj files with no results, create new asset and refer to it (it just shows black screen then)
UPD: Problem kinda solved itself when I debugged it on different device, splashscreen was correctly shown. I assume it's a cache issue or something.

How can I diagnose an Xcode Code Signing failure?

With Xcode 10.2 I'm getting a Code Signing failure of
resource fork, Finder information, or similar detritus not allowed
Command CodeSign failed with a nonzero exit code
but I don't how to find which particular element of the massive project is causing the problem.
This, by the way, was not occurring with Xcode 10.1. Back then I did find that some of my .png images contained color profiles which were removed and stopped a code signing failure there.
The current failure occurred after bringing the code unchanged from under 10.1 where no failure happens. And it does not happen either when I take the code as modified under 10.2 back to 10.1. So this is making me crazy!
Now, I can't even find Apple documentation to help me find what to fix! Any suggestions will be gratefully processed. Thanks.
I examined (again) the dense paragraph above the code signing error message. The main thing it contained was a path to my app bundle. So I thought something extraneous might be within the bundle.
I went to the Products folder in the project navigator panel in Xcode and right-clicked my app, then selected Show in Finder, then in the Finder I right-clicked the app and selected Show Package Contents, then expanded the Contents directory and then the Resources directory which is the most likely place to find detritus.
Sure enough, there was a .png image file which I had rejected for use while experimenting with the app. I had commented out // the code lines referring to it, but had not deleted that image file from among the Supporting Files in the Xcode navigation panel.
I did delete it and re-built the app. Voila, no more code signing fault!
Thanks, guys, for your kind attention to this question, and all the questions people ask.

Storyboard Internal Inconsistencies

I have a similar situation explain on this thread (XCode 5 Storyboard Internal Inconsistencies), but I installed the final version of the Xcode and never installed any beta version. Additionally, I can't add comments in previous thread cause I don't have enough points. So i need to ask my specific case.
In XCode 5, I have a problem with all of my projects "The document 'main.storyboard' has X internal inconsistencies that were found and repaired. Please save this document to fix the inconsistencies."
If you choose to list the inconsistencies, you see that it's saying that some Images in my resources section, that uses this image, and is duplicating in the Storyboard. I try to save the document, but it does nothing, and when I relaunch the project, I get the same error.
I try all this things with NO SUCCESS:
I delete all duplicates in storyboardFile file.
Drop the image file from my project and add again.
Reconnect UIButtons with the problem image.
Change the image name file.
In my research, also I create a new project in XCode 5, add a same image in two objects inside Storyboard and got the same message.
Anyone have the similar problem?, and more important, anyone have a solution?
I have XCode 5 and OSX 10.8.5.
**** UPDATE *****
I found a workaround. The error is generated when one image inside the storyboard is used several times, if you delete the reference of the image and assign the image to the object by code, the error disappears, but I don't like it. I'll research a little more, but apparently is a bug from Xcode (I hope not).
This problem occurred for me Xcode 10.1 but was resolved. The error message provided a "Show Details" button.
Clicking on Show Details showed my problem, a duplicate.
Right-clicked on the identified storyboard (Main.storyboard) to open as source code.
Searched for the duplicate declarations and removed one of the duplicates.
The error message no longer occurs including when the storyboard is reopened.
An easy way to fix this problem is to open up the Storyboard in TextEdit, then go down to the resources section at the end and delete any duplicate entries for images you see. They're sorted alphabetically, so it's fairly simple to do.
Saved the file, loaded up XCode and no more error messages.
I upgraded to Xcode 5 last night and am experiencing multiple issues, including the one you described above. I also seem to have found a workaround, albeit different from the one you found.
To get rid of it I saved the project, closed it, opened a different project and ran it in the simulator, quit Xcode then reloaded the original project.
Error message no longer appeared.
I have no idea why but this seems to have solved it for me.
Now to tackle the other niggles......... :-/
Same error today after upgrading to Xcode 5: internal inconsistencies relating to images that are used more than once in storyboard, but I found a solution that worked for me here: https://devforums.apple.com/message/883402#883402.
I created a new Asset Catalog (New file / choose "Resource" / Asset Catalog).
Once created, I selected the option 'Import from project' and imported all my images. Seems to have done the trick.
After installing Mavericks and Xcode 5.0.1 the problem was fixed.
Try to find under inferredMetricsTieBreakers section at the end of the storyboard unused segue references in the whole document as in the photo

Any explanation for wrong images showing up?

Some background. Until I redo this part of the app, for now, I've dragged a bunch of images into my project. They are called Landscapexx.jpg and Portraitxx.jpg, where xx is a number from 0 to the total number of pictures (minus one) for that orientation.
At some point, I replaced the images used in the project. But the original images are still showing up on my device (but not in Xcode). Using NSLog to confirm which image is being loaded, I then look up the image with the same name in Xcode. Sometimes it's the same image. Sometimes it's not.
At first I thought the problem was that when building the app again the data remained. That would be a reasonable explanation. However, when I deleted the app, acknowledging that the data would be deleted, that did not solve the problem. Could this be a cache issue? If so, how do I clear the relevant cache?
One last thing. The images that appear incorrectly on the iPad have the project name checked in the file inspector.
The way I'm loading the images, by the way is using NSString *newImageName = [NSString stringWithFormat:#"Landscape%d.jpg",n];, for example. So the file simply needs to be in my project space somewhere, I thought. If there are two copies, I have no idea where the second one would be. I don't see them in Xcode.
P.S. If I run the app in the simulator, I get the same images as on Xcode. This suggests the errant images are cached somewhere in my iPad. Since deleting the app didn't take care of the problem, is there something else I can try?
EDIT: I found something that may point to an issue. If I go to the Build Phases screen and open the Copy Bundle Resources item, all the images are listed there. However some of them don't have the ...in projectname after them. These same items have the project checked in the file inspector. Not all the images are this way. What do I need to do to ensure all the files are correctly in the project?
I suggest deleting the app from the phone, cleaning the project, and rebuilding the app. This happens to me on occasion and this usually fixes it.
I figured it out. Going through all the menu options in Xcode, I found an option called Clean in the Product menu. I selected it, rebuilt the app and all is fine now. This option apparently clears out the precompiled stuff that occurs the first time a project is built.

Xcode shows old, deleted xib files

I've searched all over and haven't found any help...
I built a small test app with two UIViewControllers and their corresponding xibs. Things were fine, then I made some changes to both xibs but when I build and run, I get the old views. I've tried deleting the build folders, running in the simulator and device, cleaning all targets and still the same, old, broke-down xibs that I totally changed are still showing up. I've restarted all the Xcode apps and even my computer.
Getting pretty irritated!
EDIT: I never did figure out what the problem was. Basically, once I had built a project, it remembered the first xibs I made and wouldn't recognize changes to them. If I told a view controller to load from a different, valid nib name, it'd complain that the old one wasn't there.
I reinstalled Xcode and now it all works again. Sheesh.
Try deleting the app from the simulator (hold down on the app's icon to get to jiggle mode, then click the X by the app) and from your device. Then let Xcode reinstall it.
just clean the build using
Product -> Clean
menu.
Just modify your XIB files a bit, then save them, xCode will detect a modification (last modified date in the file system) then load the xib from its actual path, and not from a cache-path :P
I just found (and fixed) a related problem — one that demonstrates similar symptoms but whose root cause is slightly different.
In particular, the symptoms I observed were that my iPad app would initially display an old storyboard image for the first page and, after a short delay, would bring up the most recently edited story board contents. I went through most of the above machinations to no avail.
The problem is that the iPad loader first just dumbly loads your app's launch image into the screen. You usually set up this image as part of the early administrative setup of the app in XCode. At launch time, while the end user is considering the content and cogitating about where to touch the screen, the application is in the mean time madly getting itself ready, un-archiving the xib/nib/storyboard, and doing the real work of getting ready.
In the ideal situation the provided launch image is pixel-for-pixel the same as the one generated by the nib-unarchiving-process. However, if you forgot to update your launch image after updating the story board, you'll see an image shift at the completion of the unarchiving.
I wouldn't have suspected this as the problem except that I had read Jef Raskin's description of how he did exactly this on the Canon Cat word processor to provide the illusion of an instantly ready application: it takes advantage of the fact that the typical human response time to an application startup is on the order of seven seconds — plenty of time for even a floppy-based system to load and overwrite the bitmap facade that the loader sets up. Sometimes, it's good to have read a bit of arcane history. Jef would of course later go on to found a project whose name was Macintosh, and the rest is history — and this bug.
Not sure whether this helps, but I just had this.
It took me days to work it out. In my case I enhanced an existing Xib file. The changes I applied in interface builder never appeared in the app.
Eventually I found the cause. I had my FilesOwner view outlet set to a subview below the top view. When I enhanced the view I did this as an extension to th top view. Thus the changes never appeared when running the app.
Changing the view outlet to the correct view ( the top view in my case ) did the trick and it all worked fine ...
I know steve has found a work around but the problem is not in the XIB files at all. Xcode does not update the YouApplication-info.plist file to
If you open it up you will see the line: Main nib file base name. You must change the value to reflect your desired NIB file name
I had this problem, and it was a result of xcode continuing to copy previously compiled xib's - even though the source file was deleted, the build cache wasn't. Product > Clean and then recompiling solved it.
I just had this issue, just delete the app from the simulator.
Then do a clean on your project.
In xCode,
go to the Product menu,
select Clean.
Or just press Shift+Command+K!
I ended up recreating the xibs from scratch and that worked. Very frustrating.
you can try to modify your XIBs a bit, so xCode will detect a modification through the last modified date in file system. then it will load the xib from its actual path, an not from xCode cache.
I had the same problem, but i solved it by changing the datetime of my system to today. And re-saved the xib. I was testing the local notification.
Just an assumption, not sure if that really caused it: I finished a XIB that worked fine in the simulator and on an actual device. I then changed it to be localised in Xcode 4.5.1. The changes I did after that were not synced to the device until I manually deleted the app from the device and reinstalled via Xcode.
Deleted derived data, cleaned project and build. Old xib was magically removed. :D

Resources