Apple Mach-O Linker Warning, in xcode 9.4 - ios

I update xcode version 9.4 to 10.2.1, I have created a project on xcode 9.4, run it once on xcode 10.2.1 and then delete this version and switch back to xcode 9.4 due to some reasons ... when I tried to run project on xcode 9.4 it gives lot of warnings and 198 errors
how to solve this issue.

If it's only linker errors, try to clear derived data on Xcode (Which you can access from Xcode > Preferences > Locations) and run application after clean and build. Some times your lesser disk spay might caused to these kind of issues as well.

When you opened the project on XCode 10.2.1 did you allow the project to be updated to the "recommended settings"?
It would have appeared as the yellow yield icon in the issues log.
A possible solution is to go into Time Machine (hopefully you keep backups) and revert your project folder to a copy from before you updated XCode

Related

react-native xcode 10.1 "config.h" file not found

Recently, I upgraded from Xcode 9 to Xcode 10.1 for my existing react-native project. My RN project worked perfectly from Xcode 9, but after opening it in Xcode 10.1, I cant build my project in Xcode 10.1. It gives error saying
cant find "config.h".
I have also tried cleaning and restarting the xcode.
A somewhat obtuse quirk in 10.1 is that it switches legacy build settings to their new default. Go to your target's Workspace (or Project) Settings (File > Workspace Settings) and change Build System from New Build System back to Legacy Build System.

Xcode9-beta2 destroyed my project/compiler/environment

My project works fine in Xcode 8.3.3. When I compile my project with Xcode 9, it shows compile error in some C++ files which have been included into my project for a long time. Then I switch to Xcode 8.3.3 and just want it built successfully, however, Xcode keeps on showing the previous error in Xcode 9.
Clean project/delete derived data/relaunch Xcode/reboot/uninstall Xcode9 and reinstall Xcode 8.3.3, all of them don't work. I think some of configurations are destroyed by Xcode9-beta2.
Anyone could help.

Xcode 9 Bug: Cannot find cdtool

After installing Xcode 9 beta, Xcode 8 gives me an error when compiling a project:
Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform <DVTPlatform:0x7fd67af0a930:'com.apple.platform.iphonesimulator':<DVTFilePath:0x7fd67af0a7c0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>>.
I suspect Xcode 9 modified some shared state with Xcode 8 (set a path, overwrote a file, etc.). But I've tried deleting and both Xcodes to no avail.
The project uses Core Data and it's clearly failing when trying to compile the xcdatamodel.
I can still compile and run under Xcode 9.
An Apple engineer reached out about this...
Those of you with cdtool errors in Xcode 8, I suspect you installed the iOS 10.3 Simulator runtime from Xcode 9. It was discovered this week that this causes a problem with cdtool in Xcode 8.3.
You can work around that by moving iOS 10.3.simruntime aside and restarting CoreSimulatorService (source):
sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/Backup
sudo mv /Library/Developer/CoreSimulator/Profiles/Runtimes/{,Backup/}iOS\ 10.3.simruntime
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Then restart Xcode, Simulator, etc. Those of you that deleted CoreSimulator.framework and thus cannot run Xcode.app any more can reinstall CoreSimulator.framework with:
installer -pkg /Applications/Xcode-beta.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /
Didn't work for me because I also have a Watch app and got the error on the Watch SDK.
I ended up deleting both Xcode 8 and 9 Beta, deleting /Library/Developer and ~/Library/Developer. Then reinstalled Xcode 8 and it worked.
You can also remove the 10.3 folder from
/Library/Developer/CoreSimulator/Profiles/Runtimes
Restart Xcode in order to take effect (may not be needed).
I agree with this answer. In addition I first removed all existing(took backup) Xcode version from machine.Then kept xcode 8.3.3 in Application folder. Made the project to open with default Xcode 8.3.2. Problem got resolved.
The problem came when I updated Xcode 9 beta to 9.2.

Swift does not support the SDK 'iPhoneSimulator9.3.sdk'?

I have just installed the xcode 8.0 and upgrade my project to swift 3. I was using swift 2.2 and xcode 7.3.1.
But getting following error:
Swift does not support the SDK 'iPhoneSimulator9.3.sdk'
Command
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
failed with exit code 1
This happened to me when I had simultaneously installed both Xcode 7 and 7.3 and after automatic update I was left with 8.0 only.
One indication that something got messed up was output of xcodebuild -sdk -version in terminal:
DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7fd810db4c50:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk'>': SDK with name 'watchos3.0' being superceded by SDK with 'watchos3.0'.
Solution:
Quit Xcode
go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
remove the iPhoneOS9.3.sdk folder from that directory. Be sure to make an external copy if you still need it so you can put it back later.
restart Xcode, clean, and build
???
PROFIT
UPDATE:
According to #tsafrir comment, delete also 'iPhoneOS9.3.sdk' for simulator folder:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhon‌​eSimulator.platform/‌​Developer/SDKs
The iPhoneOS9.3.sdk for the simulator is at Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs.
quit xcode
delete
clean
build again.
Not the best solution, but selecting - "Use Legacy Compiler Version": Yes, removed that warning for me.
It happen due to old xcode still in system and you updated new one.
For fixing this use following step.
Quit Xcode
go to
Simulator and iPhoneOS. platform
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
3. remove the iPhoneOS9.x.sdk folder from that directory. Be sure to
make an external copy if you still need it so you can put it back
later.
Copy old xcode sdk (iPhoneOS9.x(Updated SDK))
Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ iPhoneOS9.3(Updated SDK)
5> Paste this SDK in new XCODE 8 in this folder
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
6> Clean and Build.
Fixed
Open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs

iPhone running iOS 8.3 shows up as ineligible in Xcode 6.2

Current setup:
iPhone 6+ updated to iOS 8.2
iMac running Mavericks (10.9) with Xcode 6.2
Deployment target set to 8.2
When I connect the iPhone, it shows up as ineligible.
Also, it shows this warning:
I've tried:
to reboot both iPhone & iMac -> Not solved
to manually select iPhone from: Product > Destination > Ineligible Devices
Many other answers in this question, but all for problems using Xcode 6.3, not 6.2.
I know I can solve this:
upgrading to Yosemite & installing Xcode 6.3
using an iPhone running 8.2
But is there any possibility that mounting the Xcode 6.3 DMG and copying some libs / symlinking something it will work?
Just copy the folder DeviceSupport/8.3 from Xcode 6.3 to Xcode 6.2.
Details:
Download Xcode 6.2 and 6.3, install as /Applications/Xcode_6.2.app and /Applications/Xcode_6.3.app (or similar names)
In both installations, there's a folder Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
In Xcode 6.2, this folder contains packages for iOS 8.2 and many lower versions, but not for 8.3.
In Xcode 6.3, this folder also contains a package for iOS 8.3. In my case, the folder is called 8.3 (12F69)
Copy the iOS 8.3 package from Xcode 6.3 to Xcode 6.2 (this command is one line, of course):
cp -r '/Applications/Xcode_6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.3 (12F69)' '/Applications/Xcode_6.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport'
Or even better, create a link:
ln -s '/Applications/Xcode_6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.3 (12F69)' '/Applications/Xcode_6.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport'
Now restart Xcode 6.2 and connect your device through USB. Xcode should allow you to test apps on it.
Diego Freniche's solution (copying the whole iPhoneOS.platform folder) was a great help, but when I ran my app from Xcode 6.2, it looked slightly different than it did when I deployed an ipa file on the phone (buttons in wrong positions, status bar display wrong). I guess Xcode got confused and built the app as if it was targeted at a different iOS version.
With this solution (only copy one folder in DeviceSupport), it looks like the app works exactly as it is supposed to. I'll let you know if I encounter problems, but I haven't seen any so far.
A little progress, but this is a WIP.
Looks like in Yosemite Xcode 6.2 works correctly with 8.3 devices. Need to test on Mavericks
Testing with Xcode 6.2 in Yosemite (need to test also in Mavericks, any feedback would be appreciated)
Go to your Xcode 6.2 folder and rename
/Applications/Xcode-6.2 copia.app/Contents/Developer/Platforms/iPhoneOS.platform
into
/Applications/Xcode-6.2 copia.app/Contents/Developer/Platforms/iPhoneOS.platform.old
Mount your Xcode 6.3 DMG, install it
Copy from Xcode 6.3 this folder:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
inside your Xcode 6.2 folder.
you'll probably find an error telling you rootuser does not own the simulator / OS Platform folder. To solve that just open Terminal, then:
$ cd /Applications/Xcode6.2.app/Contents/Developer/Platforms
$ sudo chown -R root iPhoneSimulator.platform/
$ sudo chown -R root iPhoneOS.platform/
now you can run your app inside your iOS 8.3 device from Xcode 6.2 but you have no simulators in the target tdestination menu
UPDATE: I'm getting weird errors while ibtool tries to compile the storyboards:
/Users/dfreniche/Desktop/Test/Test/Base.lproj/Main.storyboard: The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.)
So finally give up and update to Yosemite. If there's any new info on this, please share.
Had the same problem with connecting iOS8.3 devices to Xcode 6.2 on Mavericks. Ok on a machine at work running Xcode 6.4 on Yosemite. Software update on the Mavericks machine doesn't offer any higher version. Looking at the specs of Xcode 6.4 (and presumably 6.3 of the original question) says it requires OS X 10.10 (i.e. Yosemite). So, whether or not you can hack around it, the behaviour you/we are seeing on Mavericks is what Apple intends.
I have the same issue and I don't want to just use the lastest version of XCode for the need of maintaining my old projects. I end up with installing two versions XCode(6.2 and 6.3) to solve this problem. Here is what I did.
Download XCode6.2 install package from apple site
Upgrade the existed XCode6.2 to x6.3
Open my project on XCode6.3 (this time the device can be recognized by XCode, and I think XCode6.3 might have done some updates to your project.)
Close my project, re-install XCode6.2, there will be a prompt saying I have a newer version and if I want to keep both. Click Yes. Then I have two versions of XCode.
After all those steps done, I can finally open my project and use my device in XCode6.2. Hopefully it can help someone.
XCODE 6.3 is out.. It solved my problem.. If you have Yosemite, you can download the 6.4 beta version

Resources