xcode: ERROR ITMS-90022: "Missing required icon file.." - ios

I've read numerous other answers for this, but I thought it was worth posting the same question with an addendum..
I actually solved this exact same problem once before by adding the correct images in my images.xcassets window, however I don't recall how I figured out which boxes to put the image in? How do I link the errors to the correct box?

Are you using Cordova? I see you tagged it but have no mention of it?
If you are just to save you some time and effort theres a really good npm plugin that generates all this for you & my xcode picked up all the different sizes automatically. cordova-icon.
It's really simple, just have an icon.png in your root and run cordova-icon in your console. It generates icons for android iOS and windows.

Related

Image.file() Showing Blank When Specified File Was Explicitly Created

In the iOS variant of my Flutter app, when I explicitly create a .jpg file using
File(path.join(filePath, fileName))
..createSync(recursive: true)
..writeAsBytesSync(buffer);
the widget that renders the file (by calling Image.file(), passing to it the file as an argument) results with a blank image.
No exception was thrown indicating that the file was not found or file contents was invalid. Its behaving as if the file is blank, but when I browse to the file using Finder, the file is there and when I click on the image, Preview renders the expected image.
When the same code is executed when the image comes from the device camera or device gallery, it works and when the same code is executed in the Android variant with the file being explicitly created, it works too.
The only thing I can think of is that it has to do with creating the image deep inside my iOS simulator directory structure
ie-/Users/joselitope/Library/Developer/CoreSimulator/Devices/F2AE8082-E670-498B-B2C6-9A83BE1855A4/data/Containers/Data/Application/7B01A347-69AE-4A1F-8567-7FCC256013F5/tmp/comp_image_cropper_2CC9EEFB-A126-4811-BD80-485B4C41F3A2-18523-00001C049E5AAE85.jpg
but again, the file is visible using Finder so this may not be the reason.
Maybe I have to set certain permissions when creating the file in iOS or perhaps settings applicable to iOS in my pubspec.yaml?
All help is greatly appreciated.
My environment is as follows:
Catelina 10.15.7,
Flutter 1.22.5 channel stable,
XCode 12.3,
Simulator: iPhone 12 Pro Max - 14.3,
Someone posted a suggestion that prompted me to look into this problem again. (That someone has since removed his suggestion so I am unable to thank him.)
Anyways, when I tried to reproduce the problem it wasnt happening anymore even in the exact use case it was happening previously.
So the question remains is why and the only thing I ruled out that it wasnt a race condition as this code has been running on Android for quite some time on various devices.
This is what I could come up with:
Knowing the filepath I was writing to, I realized that I was writing to the app's /tmp directory which iOS periodically empties out. I am thinking that I shouldn't be putting stuff there. Instead, I've been writing to the app's documents directory and it hasnt happened since.
The initial /tmp directory was chosen for me by a package I was using and since it was so long and Im new to iOS, I didn't really look into it all that much, caring only that the file was there, which it was.
Anyways, keeping my fingers crossed that the fix sticks.

xcode 8.2.1 (with swift) not loading external files

I have a little problem with xcode. I've already seen this question/problem but the answers couldn't help me this time (yes, I've had this problem in the past).
So my problem is, that xcode is not loading my images/external files while testing/running the app.
If I put my images in xcode without folder, so just the images, it loads. But when I put them in a folder (and some sub-folders) , xcode can't find the images anymore when I'm running the app (in the storyboard it can finds them).
I've already cleaned the app and re imported the images.
Also it isn't a problem with just 1 project, if I start an all new fresh project, I have the same problem.
I hope I've explained my problem enough, if there are questions, I'll be more than happy to answer those.
Also if you can help me out, I will be thankful forever! This problem is really slowing down the development of our app.
Have a nice day!
Try putting the images into the .xcassets folder where your AppIcon is. Also, add files individually into the .xcassets and not drag a whole folder of images into the project.
Sorry for the short answer but you could add more information to the question like images of your folder structure and how you call the image

Today View Extension (Widget) not working

I found several other threads with similar problems, but no one has exactly the same problems.
Besides it DID work some time! the errors now keep occurring while it was working some time before..
When Running my app, that has a build Target "Today View Extension", I get no actual result.
The Extension is shown in Notification Center, but has no body (Simulator AND device).
Also when I try to run the App (not the target extension) and attach the process manually by PID I get this error:
I also had the error that my Extension (that has a "Bundle Display Name" entry in Info.plist for a custom Name) did show the Name of the Extension-containing App, and not the string that was set in the Info.plist
Strange thing is that sometimes it worked, sometimes it doesn't, but when it does not there were like five different reasons why not.
I want to ask people who have similar/same problems to post them here to collect all the issues appearing and possibly collect workarounds / solutions for these problems.
Thank you.
For anyone having troubles now:
With beta 4 and beta SDK 4 a lot of bugs were fixed:
[self setPrefferedContentSize:]
to set the views size is now working properly (if you have troubles viewing your Extension)
If your updated Extension is not showing in Notification Center be sure to have a look at the log output, there you can see what task the debugger is attached to, if there is "no Selection" try stopping and running again, it will work after some tries!
If you have questions feel free to ask,
Happy coding
I don't exactly have a solution, but I've observed this happening when anything is "wrong" with my Today extension. For example, if I don't have a file properly targeting the widget. I'm guessing that instead of just crashing to the home screen, iOS just gives you an empty widget? I've written about my own issues here, for reference.
I had similar issues. But it seems to be alright now. Since the "Today View" is an extension and is bundled with the containing app, you should just build and run the containing app. From there, you can pull down the "Today View" and if your widget / today view is not added, add it.
You should be able to see all your updated changes without a problem with this and you won't have to attach any process.

Xcode Search and Destroy

I'm trying to clean up my project in iOS XCode. I know you can do this in other tools but I'm unsure with Xcode. I have googled but I'm getting the impression this can't be done. Is there a way to search your project for unused items i.e. images and then remove them if not required?
Have you heard about Slender :
is one of tools that tells you which asset files aren't being used. Along the way, you can also see which assets are missing their #1x counterparts, or if your #2x images have incorrect pixel
Slender Link
Hope it helps.
There is also one question that helps you too How to find unused images in an XCode project?

PNG-images turn blank/corrupted after build and archive

I ran into a strange problem today, after renaming a couple of images in my app and making sure they work on a device as well as the simulator, I used Build and Archive as I always do to build my app to distribute to the testers.
However, this time I got strange reports from the testers saying the images were gone, so I installed the build on my phone and to my surprise they were gone as they said. Tried to do a clean and build again but no change.
When I open the .app archive I can clearly see that many, but not all, of the images have turned blank, they appear to be the same physical size on the disk and they also seem to have the correct height and with when I press space to preview them, I can't however open them with photoshop for example (the file-format module cannot parse the file).
This is very confusing and as I have to get the build ready for testing very soon I would very much appreciate some help in this matter.
Your source PNGs seem to be slightly off-standard or at least incompatible with Apple's pngcrush. Make sure you use a commonly well functioning tool for creating the PNGs - when in doubt reconvert/resave them.

Resources