How to handle PBXCp Error in iOS 6 - ios

I have some image files that when copied
into the Xcode project , I get the PBXCp error and a lot of warnings saying 'Dependency Analysis Warning'.What must be the reason?

I added each image individually to Xcode rather than adding the whole folder of images and the problem was solved.

Related

Unable to read input file '/Users/anonymous/Downloads/GoogleService-Info.plist'

This message just appeared out of nowhere even though I made absolutely no changes to the project. I have an Ionic cordova project that has been working for Android and iOS. The project builds fine in Visual Studio code for ios but when I open the project in xCode then I try to run the emulator in xCode I get the following error message:
Showing All Messages
unable to read input file '/Users/anonymous/Downloads/GoogleService-Info.plist': fopen(/Users/anonymous/Downloads/GoogleService-Info.plist, rb): Operation not permitted (1)
This is really weird because I haven't changed anything in the project so I'm not sure why it's trying to copy the .plist file from the downloads folder even though I've added it to the root project and the project\platforms\ios directory.
I found one solution that suggested adding the following to my config.xml:
That did not work. It actually caused build failures within Visual Studio Code.
Any help would be greatly appreciate. I'm not sure why this would issue would appear all of a sudden and the solutions I've seen online haven't been helpful.
I can see the .plist file in xCode

Unused Bundle Resource, not found on disk, after deleting it?

I'm trying to delete all the unused assets, to decrease the app size (icons, launch screens, etc), I started with the iOS project, but now I'm getting errors like this:
Bundle Resource 'Icon-Small#3x.png' not found on disk (should be at
'D:\Work\MyProj\MyProj\MyProj\MyProj.iOS\Resources\Icon-Small#3x.png')
I deleted the specified file, but it's not used in the project, at least it's not visually used. Some of the missed files are the default Xamarin X icons.
I deleted the array items in CFBundleIconFiles key, which pointed to all the missing files, but still getting the same error.
I don't know well about xamarin. But in Xcode, the images files are removed from Xcode better than from Find file utilities.
The project has a directory, .xcodeproj. And a file project.pbxproj will describe how many files will be compiled, and how many images resources in this project.
If a image file was deleted from file system, but it is still in this project.pbxproj. Then the compiler will argue this problem about it failed to find the image resource file.
So, deleting a image file in Xcode, will remove the entry from project.pbxproj and remove it from file system.
In Xcode, it will mark red colors for those missed files, I think xamarin should has similar feature too.
In iOS , some icons are required . Items marked with "Required" must be included.Refer the following image.
As we can seen ,Icon-Small#3x.png is required.It used for seetings on device (such as iPhoneX and iPhoneXs Max).Such as the icon in the following image.
So ,though you have deleted the array items in CFBundleIconFiles key.You will still get the error .
The reason you are getting this error is chances are you deleted the source files, but Xamarin still keeps on referencing them.
So resolve this error go to each folder, Resources and Resources/Drawables on android and delete each image separately. This should fix your issue

When renaming Xcode project, I get "images.xcassets missing"

When renaming project (Xcode 8) and following the steps shown here:
How do I completely rename an Xcode project (i.e. inclusive of folders)?, I am getting an warning saying that my images.xcassets folder is missing.
Can anyone tell me why this might be?
I tried following steps couple of times, but it happened every time.
Is it something to do with how the folder files are grouped in the file system? I just can't work it out.

All xib and storyboard files crashes Xcode 6.1

I am having a really difficult problem and have no idea how to fix it. I have a workspace with 3 projects and whatever xib or storyboard file I choose from these, Xcode always crashes, saying (Xcode quit unexpectedly). Also, if I create a brand new project within the workspace, these storyboard also crashes xcode when opening (but project can be built and runs fine, except you cannot open layout files). What could possibly create such an affect? Is the problem in my .xcodeproj file? The project worked yesterday, and I have not performed any change that I can remember.
If I build the project without selecting any xib or storyboard file I receive the following very cryptic error:
Command /Applications/Xcode.app/Contents/Developer/
Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
Similar to this one:
swift failed with exit code 1 while compiling in Xcode - possibly related to Bridging-Headers
Have tested all the answers, on both XCode 6.1 and 6.1.1 (Have tested to delete xcuserdata and DerivedData). If i build using the console, in the end I get this "very" helpful error.
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
I guess nobody has a complete solution for this problem, but could you help me on where to look? .xcodeproj file? Or could a error in one xib file prevent others from opening?
Ok, this was some sort of xCode bug. One of my swift files was corrupt somehow, and the fix was simply deleting it and copying the old content to the new file. Very strange that one SWIFT (!) file could prevent all xib and storyboard files from opening.
My recommendation to anyone having the similar problem is to backup your old project and remove files until xCode works. Then you have identified the problem, and should be able to fix it.

How do i fix this CopyPNG File error?

While reading /Users/user/Desktop/AppProject/PruebaApp/Logo Retina.png
pngcrush caught libpng error:
Read Er Could not find file:
/Users/user/Library/Developer/Xcode/DerivedData/PruebaApp-cblepoaxbqzyopcbcswwqjtftyon/Build/Intermediates/ArchiveIntermediates/MaderoAPP/InstallationBuildProductsLocation/Applications/MaderoAPP.app/Logo
Retina.png
Command
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng
emitted errors but did not return a nonzero exit code to indicate
failure
Im getting these errors while archiving project, at the end it does archive but i want to get rid of it. I had trouble with the app before and i read that i should delete the DerivedData/(myproject)folder so i did. and apparently it is trying to look for the images in that folder how do i fix this??? Help!
Try first by Hard Cleaning your project CMD+OPTION+SHIFT+K, If problem exists apply following method,
Build Phases -> Copy Bundle Resources, Any fileName is red color?
Or
Convert Logo Retina.png or Create it again, maybe it's an encoding\format issue.
Or
Rename "Logo Retina.png" to "LogoRetina.png".
~Good luck~
It also happens when you have multiple images with the same name in TARGET->Build Phases->Copy Bundle Resources. To resolve it -
Search for the image name that you are getting an error for in Build
Phases search bar at the top.
If you get multiple results in Copy Bundle Resources for the search query, just remove others from it by clicking on "-" sign. Make sure you have same images for the multiple results. If not you have to rename the actual files of other entries.
Just compile your code. You are good to go.
Hope it works for you.
Just open image in Preview app and export it as png file. Replace old image with new in Xcode.
Honestly I have had this problem intermittantly many times and clean then rebuild has fixed it.
Since the answers here are either not useful at all or quite complicated I want to add mine:
The error means that Xcode can not find the file, whether it is in the project's folder or not.
If you still need that image, what you can do is to open a Finder view and navigate to your project. Drag the file Xcode was complaining about into the project an uncheck 'Copy to folder'.
if you do not need the file anymore, on the left side of Xcode, find the file, it will be shown in red, simply tap on it and then delete / backspace
Hope that helps some people :)
To solve the issue copy the Image name. Then Filter it (Build Phases -> Filter textfield). Finally I removed it.
Also check that you are not naming the images with only a number like "0.png" I change it to "tuts0.png" and it worked.
I just had this error and honestly I think it was being caused by another error. I had an issue with my Crashlytics framework and I'm convinced it was effect some unassociated pngs with the copypng error. I replaced the Crashlytics.framework with a fresh version and viola, all errors were gone.
Don't ask me how this works, I'm just posting this in case someone else can benefit from it.
I wasn't able to fix this problem. So i delete and reinstalled xcode, this helped for me.
Fixed it by reverting to my old product name (in "Build settings"). Seems that the new product name confused the images path.
I have the same issue with resources. The problem was that I have copied target from another one and just forget to uncheck checkbox at target membership window.
i face this problem and this solution is working form me
you need to remove any reference for that image
Build Phases -> Copy Bundle Resources
after that clean and build and problem will be fixed
I had accidentally deleted the file from the location which was linked to x-code project. I had not copied the file in my xcode project but just the path. Hope it helps someone.
I've had similar issues with pngcrush /libpng crashing with PNGs (checksum errors / freeing object that have been freed etc). These could be reproduced on the command line so I recreated the PNGs, even converted them to other formats then back but the errors persisted. In my case Xcode then rejected the resulting archive for not having iPhone 5 support (as pngcrush killed the Default-568h#2x.png image). The above fix resolved this.
For those who are struggling with this error while building Cordova app.
Please keep the following point in consideration as it may lead to this error.
The images should be tagged as "resource-file" and not as "source-file" in plugin.xml of your Cordova plugin as the former includes the images in "Copy Bundle Resources" (under Build Phase) and the latter to "Compile Sources" of your equivalent xcode project of cordova app.
If non of above answers can fix your problem, try look into Xcode project where you reference your image file, I happened to referenced twice to the same png file. Once I delete one the reference, it worked. The error went away. Good luck.
It also happens when you have multiple images with the same name in TARGET->Build Phases->Copy Bundle Resources. To resolve it -
Search for the image name that you are getting an error for in Build Phases search bar at the top.
If you get multiple results in Copy Bundle Resources for the search query, just remove others from it by clicking on "-" sign. Make sure you have same images for the multiple results. If not you have to rename the actual files of other entries.
clean cmd+option+shift+k and Build Project...
work well for me....

Resources