This question already has an answer here:
Installing Firebase to my Xcode project resulted into generating 4 warnings I cannot seem to find a fix for
(1 answer)
Closed 11 months ago.
I have recently installed Firebase using Pods to my project. While everything works fine with my app functionally, I am observing multiple Buildtime warning messages for gPRC-Core and gRPC-C++. See screenshot below. It is the same error message for every warning which states:
Anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here
I have updated my cocoapods to the latest version and all my pods for Firebase are also up-to-date.
Will this cause any problems for me in the future? Is there any way of getting rid of these warnings because more than anything else, it is annoying to see warnings in my project which i can't clear?
Any feedback would be greatly appreciated. Cheers!
Personally, I don't like seeing these third-party library warnings in my Xcode. I usually keep my build clean and so whenever some warnings or errors pop up in that pane, I know these warnings/errors are real and should be fixed before I push the PR.
Anyway, you can get rid of these warnings by simply adding this line in your Podfile and doing pod install again with this new config
inhibit_all_warnings!
This should remove all these annoying warnings and give you a clean project to work with. Cheers!
I'm working on a project and I'm using Swift package manager to manage dependencies. I had just updated my Xcode to 12.5 and I had deleted the derived data, because I thought it would resolve a problem I was having (none of the errors showing up on the Issue navigator, but would show up in the Report navigator). Anyways, that is not the main issue.
After I deleted my derived data, the package should have re-fetched. However, that is not happening. I tried resetting the package cache and restarting my macbook. This has been going on for two hours with me looking up similar questions on stack overflow, but I coudn't find any solution.
Any help would be godsend.
Edit: Cloned the project in another directory to see if it would resolve the issue. No luck.
For anyone stuck in fetching <package> you might just needed to manually delete the cached files present in ~/Library/Caches/org.swift.swiftpm/
Thanks to
https://stackoverflow.com/a/67323117/3970488
Deleting cache only didn't work for me.
I had to;
Remove the stuck package,
Close the Xcode,
Delete the cache,
Delete the Derived Data,
Reopen the project and wait for it to fetch other packages,
Re-add the stuck package.
This solution is relevant to anybody encountering this issue on xCode v13.2.
According to Xcode 13.2 Release Notes, if you’re using Swift packages either standalone or as dependencies in an Xcode project or workspace, the Mac App Store version of Xcode fails during package resolution.
To solve this issue, you have to download Xcode 13.2 directly from the Apple Developer website. This would solve the problem.
More info can be found on this github issue.
This worked for me
cd ~/Library/Developer/Xcode
rm -rf DerivedData
Go to the left, to the packages and dependencies area, in the file managerenter image description here
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.
I installed Charts via cocoapods to an Xcode project but I get the following errors on building it: 'No such module Charts' and 'ChartPlatform.swift : Method does not override any method from its superclass'.
I made sure to uncomment 'use_frameworks', in the podfile and open the project using the xcworkspace file. Not sure where I went wrong. I've always installed pods the same way and haven't had problems till today.
How can I fix this?
I ran into the same problem because I was using an older version of Xcode. The Charts framework only works with Xcode 8 and swift versions 2.3 or 3.0. Try updating and see if that fixes the issue.
In my case I just removed Charts.framework from Embedded Binaries and then added again rebuild the project (Cmd+B) the error has gone.
I recently added the iOS Parse Framework to my Xcode 5 project. I am getting 10 errors now... None from code. They are all Apple Mach-O Linker Errors. I took the framework out and the errors went away. I am using the latest Parse.framework, so I do not know why I am getting these errors.
I also have another question, now that I updated to Xcode 5.1, when ever I use the UITabBarController or just want to add a tab bar to a ViewController... I gets all weird. The entire bar turns a solid grey...
Parse Mach-O Linker Error Picture
http://postimg.org/image/s0y7b6a23/
UITabController Problem Picture
http://postimg.org/image/osp4kdyej/
According to Parse iOS quick start doc :
You need to have all these frameworks added to your build Target
I had similar linker errors using v1.6.2 of the Parse SDK. except I got around 30 errors.
I ended up fixing the issue by removing the -ObjC linker flag from other linker flags under MyTarget > Build Settings > Linking.
This is what the sample Parse project found in the Quick Start section of the Parse docs does, so let's assume that it's correct.
You can try to delete path under target->Build Settings->Library Search Paths for your first question.
Solution step by step for fixing this problem (it is useless to modify your Xcode project's configuration, you just have to use the latest versions of all softwares, API(s), tools + clean all XCode builds and everything will be alright):
1 - Use the latest versions of Xcode, Swift/Objective-C and iOS.
2 - Delete all Xcode builds.
rm -rf ~/Library/Developer/Xcode/DerivedData/*
3 - Install/Update Cocoapods (it is important to use the last version) to manage dependencies.
sudo gem install cocoapods
4 - Update your Podfile:
vim Podfile
pod '[Name of the API]', '>= [Any API version]'
5 - Update your local repository:
pod repo update
6 - Update the dependencies of the Xcode project:
pod update
Generally from that point your "Apple Mach-O Linker Error Parse" will disappear.
To your second question - I had images that were not sized correctly in my tab bar and got the same result you speak of. I deleted them out of the tab bar and it went back to normal. Not sure if this answers your question, but doing this solved the problem for me. Tab bar images should be 50x50.
Ok its July 2015 and I tried all the solutions above but finally resolved this by using adding Parse through CocoaPods and removing (or not adding in the first place) the frameworks directly in my project.