My project was working without errors on XCode 4.2 on Lion. Now I'm running Mountain Lion with XCode 4.4 and when I try to build the project it gives me an error that tree.h file cannot be found. I checked the header search path and it was correct. I searched the web for such an error and found the same solution on many different pages but couldn't understand that particular solution, see for example this page.
How can I solve this problem? Alternately, can you clarify the weird solution that is spread all over the internet?
I had to add another header search path which is: $(SDKROOT)/usr/include/libxml2. This fixed the problem.
Go in the XCode preferences and install the command line tools.
Related
I am running macOS Monterey 12.4 on an M1 MBP with XCode 13.4 installed.
I'm building a swiftUI project for ios and trying to connect a Firebase/FireStore DB to the project using Swift Package Manager and import: firebase-ios-sdk.
On doing so, I get a Package Resolution Failed message with a box and list of all the firebase-ios-sdk that could not be resolved: list
Package Resolution failed
I tried deleting the derived data folder content, resetting package caches, resolving the package version, restart Xcode. Did not work.
Last night I uninstalled XCode and re-installing Xcode overnight. Did not work, still the same issue today.
When I import Firebase to the .swiftui file, I get a code error message - No such module 'FirebaseCore'
I will really appreciate your assistance, I am a Newby.
Thanks
Adriaan
UPDATE: (SOLUTION)
Chris Parker # https://codecrew.codewithchris.com solved the issue for me.
Here is what he wrote and it worked for me:
"I just tried to install Firebase again and the problem still exists. I looked a bit closer to the options that had defaulted with regard to the Dependency rule and the option that had defaulted was “Branch”. I changed that to “Up to the next major version” and the package selections that I was expecting to see did in fact appear so that’s what the problem was."
I just want to say a really big thank you to Chris at codewithchris, he really came through for me.
THANK YOU CHRIS PARKER
Xcode "File" -> "Packages" -> "Reset Package Caches" solved the issue for me. Hopefully, it will be useful to others as well.
I have updated my Xcode to the latest version of 8.0
After the update, I am facing a new build error preventing me to run the project on the simulator.
The error is the below in DDXMLNode.m:
reference to 'XML_DOCUMENT_NODE' is ambiguous
I am using the XMPP framework as pods (pod 'XMPPFramework') so I still can't figure out a way to solve this.
Note that the project is working normally on the device and was working on both Device and Simulator with the previous Xcode Version.
I have tried to search the internet but I still didn't find any solution for this.
I tried to clean the project and delete everything in the DerivedData folder as well, but it didn't solve the issue.
Appreciate any help.
Actually I am posting this answer in case it may help someone in the future.
After searching a lot without finding any answer, I discovered the following:
There is a file called module.modulemap that contains 2 methods.
module libxml [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2/libxml/tree.h"
export *
}
module libxmlSimu [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/libxml2/libxml/tree.h"
export *
}
The first one is used for real devices, the other one for the simulator.
However, when building the app on the simulator, and for a reason that I didnt figure it out, tree.h is being duplicated and causing all these issue.
So what I made to be able to run the project on the simulator was to comment the first method so the app can build successfully.
NB: Don't forget to uncomment the method once you want to run the project again on the real device.
Hope this will help anyone who will face the same issue.
i have tried some way.
I search the word XML_DOCUMENT_NODE with a result here:
then replace every error with the left symbol. It turns out to be OK for me now.
Lately I've started to take up a course for learning swift to devolp iOS OS X and Watch OS apps. I'm taking this course on udacity. The first step is to download a project and put it in a folder on your desktop. I had to open the app and then run it, which should've worked. But not for me somehow. I hit run and the following error showed up (this is the complete error log):
Some poeple suggested that I should update my XCode but I already have. I currently have XCode 7.3! I'm quite new to this platform, that's also why I'm doing this course, so I don't really know what I have to do. Can someone please tell me what's going on here?
This is the result of a corrupted swift class. If you encounter a class looking similar to the following code:
Ôæ≠fiÔæ≠fiqcaJÔæ≠fihJ0ç硡ˇ2ç硡ˇ$5y$ġˇˇ% 7.ġˇˇÔæ≠fiÔæ≠fiP‚—ġˇˇfl‚ġˇˇ ˗ġˇˇ∞B‚ġˇˇÄ+€
Try to re-create the class or re-download it. This solved my problem and to me, it would look like the only solution possible for a corrupted class.
Delete derived data.
Windows->Projects->select your project and delete derived data
This worked for me for couple of projects which i downloaded from internet.
I do everything restarts Xcode, rebuild Project, adding toolChains lock unlock them,
so there are two possibilities
first, maybe you install the beta version of Xcode
or try this, this work for me->
I tried to run a project in Xcode12/Swift4, while the project was written on Xcode8/Swift3
so I install Xcode version 11.7 and run this work for me.
if you not done with 11.7 then install another version of Xcode and try the appreciated version
May this help you
I have recently updated version to xCode6.2 and previous one I was using xCode6.2 beta.
It works fine with all previous versions and xCode6.2 beta as well.
When I am update it's version, I have removed xCode beta completely and install new one. But it is getting this issue, and I have added UIKit, Foundation to libraries. No luck yet.
The thing what I have tried and suspicious additionally;
Check framework search path at build settings(nothing mentioning that)
Other LD Flags in build settings.
This is suspicious, because it's have keys -frameworks Foundation, -frameworks UIKit
Have not enough understandings about other LD flags this values, so tried to remove them, but nothing new.
When I open other project with new version of xCode, they are all working fine but just that project.
Can anybody help this?
It's probably better to simply uninstall xcode completely with appCleaner or such. And reinstall it.
I suspect it will work and you will save time otherwise spent searching for a solution.
After struggling a few hrs, I found the solution.
The error was because of the some path specified in OTHER_LD_FLAGS and OTHER_C_FLAGS have not changed.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk
It was like this but it should be iPhoneOS8.2.sdk according to the changes of xCode version
I updated my Flash Builder SDK to use the latest AirSDK 15,change the application to use 15.
After that I got the error: Could not resolve
<s:ViewNavigatorApplication>
I the found some one else had that problem and added the /frameworks/libs/mobile to the build path I added the path and then i got a different error: Could not resolve
<s:Callresponder>
I then tried to add the MX path and a lot of other paths but could not get rid of the error. I have now spend over 10 hours all because I need to update my iOS application so it will run on the new iOS8.
Flash Builder 4.6 Premium - Mac OS Maverick.
Thanks.
Adding
-swf-version=26
--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml
--namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml
--namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml
to the "Additional compiler arguments" in properties -> Flex Compiler seems to fix it.