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

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.

Related

error: Unable to resolve build file: XCBCore.BuildFile

error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference("3bf83096e50de72a94699e9afc1133ebe3512682230d04680075c283a974e273")) (in target 'MyTarget')
Xcode 10 is giving this error immediately when trying to build our project. It's not immediately clear what is causing it.
How can I resolve it?
For XCode 10 Beta: Problem occurs when I have two workspaces open that share the same project directories. Solution was
Short version
Shut down all but one workspaces
exit XCode and reopen XCode
XCode > Product > Clean Build Folder
Longer version
Shut down all but one workspace
XCode > Preferences > Locations > Derived Data > goto directory ~/Library/Developer/Xcode/DerivedData
Clear out subdirectories from DerivedData
exit XCode and reopen XCode
XCode > Product > Clean Build Folder
Thanks to #aferriss answer for the clue.
I came across this same error while using openframeworks 0.10 with xcode 10 recently. It seems like it was caused by having multiple openframeworks projects opened at a time. If you close them all one by one, and then reopen the one you'd like to work on, it should resolve the error. Hoping this is just an xcode-beta thing.
Xcode used to tell you that there as a workspace integrity problem, and you could just ignore it. But it seems like it's returned. There's some discussion about this issue here.
For me, XCode > Product > Clean Build Folder and restart Xcode then worked.
This was the culprit for my experience of the same error:
After setting the correct version of Command Line Tools (i.e., Xcode 10.2.1; see below) on my system, the error went away!
Just Restarted my Xcode and the problem went away
The key here is missingTargetProductReference, or you might get namedReferencesCannotBeResolved. Xcode can't find something.
This happened after upgrading to Swift5/Xcode10.
I found that removing linked frameworks and then re-adding them fixed the issue.
I had an embedded Xcode project that was not found (light blue). Deleting it and dropping it in again solved the issue.
In case this helps, I had a new repo and the Libraries weren't correctly linked.
I opened Xcode, cleaned, and went through, one by one, through Libraries on the menu. I clicked on it, which opened the info panel on the right, and pressed the small folder button, and found the path designated and clicked and opened, to make Xcode recognize those Libraries. Path names were often
/node_modules/react-native/Libraries/(something)/(something).xcodeproj
In my case, after trying all solutions in this question and some more (including updating Xcode 10.2 beta and even macOS), the only thing that worked was accessing the project bundle (right click > Show Package Contents) and remove everything except project.pbxproj:
project.xcworkspace
xcshareddata
xcuserdata
If you have a File Group which is backed by a physical folder and that physical folder has been deleted then you will get the same error "Unable to resolve build file: XCBCore.BuildFile".
In my case the physical folder has been removed (because I removed all "real" files from it) and in XCode group there was still one external project linked.
Solution:
- created a new group (without a folder) in XCode
- Moved external project reference there.
- rebuilt the project
Error gone.
For me there was a different solution after none of the above worked.
The problem started after using unlink for one of my packages.
Then for some reason, the Package was still there under Libraries, but it was greyed. After deleting the greyed Library, everything started working again.
My solution was that I was using the wrong Xcode version for the project I was working with. It still required 10.1 and I was attempting to run in 10.2. I instead opened it in 10.1 and the error went away while successfully compiling.
The problem is that on new xcode 10.2 there is a new BUILD Configuration, you need to change to LEGACY.
You can check how to change it here: https://medium.com/xcblog/five-things-you-must-know-about-xcode-10-new-build-system-41676cd5fd6c . CHECK THE GIF
So if you have a newer version of xcode different than the one used when the project was working probably this is what is causing the issue.
I have the same problem. Because a folder not upload to Git server, git not allow upload empty folder, then I create a folder in project folder, and it work well.
missing folder
In my case, it was a simple issue of a missing file.
Checked all secondary error messages. Error report said that my bridging-header.h file was not being found. Checked the path of the missing file from the target settings (just search for .h to get the right setting key). Fixed the new path and error went away.
The cause:
I had reorganized my folders after a system crash and added a second level to my project location.
I've faced the problem in Xcode 10.1.2. Xcode restarting and the clean project solve it in my case.
Seems like there are a number of reasons for which one runs into the same error. For my case, it was not having the Submodule checked out locally. After I made sure all my Submodules were downloaded, the error went away.
I had correct Command Line Tools and cleaning did nothing for me.
While resolving a merge conflict, A Group named "Recovered References" had appeared in my project navigator. Probably due to a mistake I made during merging. The Group was empty and deleting it fixed my problem.

XCode breakpoints is not working for a specific project

I am using XCode 6.4, recently we created a workspace and pod files for the project and I think during this process either a file related to breakpoints or related to preferences has been deleted.
I cant figure out what happened.
Now xcode doesnt stop at breakpoints. I have almost tried anything on stackoverflow but no luck:
I have the same problem, XCode breakpoints is not working only for a specific project and I solved in a very strange way.
I changed the name of the project's folder. Infact, I had previously renamed the project's folder with a name that contained numbers. I have deleted the numbers and the breakpoints work again!
I hope that someone can explain this solution because is a XCode mistery.

Xcode 6.2 "Invalid Argument" error upon adding folder reference

Every time I add a folder reference to an iOS project and run it on iOS simulator, Xcode fails to run the app on simulator with the error message "invalid argument". While I have read other threads where the error occurred after adding third party SDKs, I get this error even if I follow the steps below:
Create a new Xcode project (Objective C), and save it.
Select "Add Files to..." from project explorer, and select any folder with files. Select "Create folder references" and leave "Copy files to Project Folder" unchecked, in the dialog box.
Try to run the project on any iOS Simulator.
Most likely, this is a problem with my Xcode installation. Has anyone seen this error before? For now, I cannot make the project run again on simulator even by removing the folder reference.
i got the same problem when i developer hybrid app.
i am not sure if this works for you.
clean build.
delete the app in simulator.
hope it helps you.
I managed to solve the problem with the following steps. Just leaving it here in case someone else finds it useful:
Remove the folder reference that caused the error.
Add a Group with the same name as the deleted folder reference.
Add the files within the folder to the new group. You can choose to copy the files or otherwise.
This fixed the problem partly, because I still did not get to use a folder reference. But it saved me a lot of time since I could build the project instead of copying everything to a new project.
I am sure this is caused by some problem in my Xcode configuration.

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.

Xcode weird random error that doesn't go away

I have a regular project i'm working on for a while -
I've edited the plist file, which caused some problem, so i've reverted to the old plist file (where all used to work), but the following errors always show and dont go away,
I've tried cleaning the project (Cmd+Shift+k , Cmd+Opt+Shift+k) , Tried resetting my pbjprox, tried clearing ~/Library/Developer/Xcode/DerivedData/ and /var/folders
Nothing works, and i guess the errors are cached somewhere that i can't think of...
Would appreciate your hints about this
Shai
This is easy to fix - your files are not on location where Xcode expects them. Just delete the file from your project and add it again.
If this doesn't work, it can be a collision with your versioning system - see Missing file warnings showing up after upgrade to XCode 4
I would copy these files into another location (outside the project folder) and then remove them from the project and add them back (Add Files to ...). Make sure to select Copy Items into destinations group's folder
Sounds like Xcode is a little confused about the association of these files to your project.

Resources