Xcode side-by-side install. Is it fine to use? - xcode

Xcode offers side-by-side install. However, I haven't tried it but now I'm being pressured to test the new beta SDK (for future projects) while keeping my current SDK environment (for current production). So I'm considering a side-by-side install.
Currently Xcode 4 is not stable enough, but before to install, I want to know possible issues with a side-by-side installation. I'm preparing Xcode 3.x (legacy) and Xcode 4.2 (beta) addition to current 4.0.x.

You shouldn't have any difficulties. I've been running side-by-side installations of Xcode for years now, no problems.
Helpful hint: Modify the icons for the different Xcode installations to differentiate between SDK versions. Mixing up beta and production environments has caused issues for me in the past. Cached link to my post on the subject, since my blog is currently down.

Related

Xcode compatibility deprecation?

I've run several tests with Xcode 5.1, 6.4, 7.0 and various macOS versions and noticed it's not forward compatible as expected, and this behavior is not documented anywhere AFAIK.
Xcode 5.1 is compatible up to OS X 10.11
Xcode 6.4 is compatible up to macOS 10.12
Xcode 7.0 is compatible up to macOS 10.13
It seems that Apple purposely disable Xcode on newer macOS to force updates, but I don't see the reason. It's not visible in Xcode's plist either.
This mean I can't have a fixed set of development tool if I upgrade my OS, while I can still run very old versions of Visual Studio on newer versions of Windows for instance.
Why that, and is there any documentation of that behavior?
Apple and Microsoft have very different philosophies on how to handle forward and backward compatibility. As a general rule, each major version of Apple's Xcode environment in recent years has been capable of running only on the OS that it was released with and one or two versions of the macOS that follow (for example, as you point out, Xcode 7 will still run on 10.13).
Generally speaking, if you are going to be developing new features and functions for a macOS (or iOS) application, Apple encourages you to use the latest SDK and then take advantage of the Xcode Deployment Target mechanism as well as some of the OS- and language-specific tools, such as #available, to help you write code that will run on both new and older versions of the OS, using the same code base.
You may agree or disagree with this philosophy, but it is how Apple views their ecosystem.
In practice, if you are continuing to develop (or support) using the older SDKs, it is useful to maintain build and test environments that are native to the older versions SDKs. This can be done on dedicated hardware or using virtualization tools. However, in many cases, it is possible to pull code forward to newer versions of the tools by using the Deployment Target settings, thereby allowing you to maintain a single code base that retains compatibility with older iOS/macOS, but also avails you of the latest tools and features in the newer versions.
In our case, we tend to try to move forward along with the platform SDKs as quickly as possible. For our iOS work, that generally means updating the SDK release with the new iOS every year, and thus upgrading our compiler chain. For our macOS product, we have maintained backward compatibility with much older versions (since the adoption of new macOS tends to be slower than new iOS), which means that we currently have development and test environments for Xcode 7.x and Xcode 9.x. Due to specific changes in the Xcode 7-Xcode 8 timeframe (related to QuickTime) we cannot use just the Deployment Target to maintain our oldest compatibility without the older Xcode. In the near future, we'll make the decision to drop support for older macOS versions and move to using our Xcode 9-only as our basis.

Xamarin: error MT1108: Could not find developer tools for this 11.0.3 (15A432) device

I started to have this issue once I upgraded my phone to iOS 11.0.3.
It seems that now Visual Studio Community Edition for Mac (v7.2 build 636)
I've tried with both with XCode v9.0 (9A235) and v9.0.1 (9A1004)
This is the error that I receive in the application output in Visual Studio for Mac:
"error MT1108: Could not find developer tools for this 11.0.3 (15A432) device. Please ensure you are using a compatible Xcode version and then connect this device to Xcode to install the development support files."
I've verified that the path is set correctly for xcode-select, so in theory, it should work correctly. I'm almost thinking that the Xamarin toolchain does not yet support iOS v11.0.3
I've also tried deleting the bin/obj folders to no avail.
Might anyone be able to confirm that the Xamarin toolchain is compatible with iOS v11.0.3, and if so are there any special steps that need to be taken to make the toolchain recognize the version?
I can potentially downgrade my device to v11.0.1, but before I do I'd like to know if the toolchain is indeed incompatible.
Please let me know if there is more information that I can provide.
Apple ships some extra development code for devices when it release Xcode (an additional disk image to be loaded by the operating system).
In general Xcode ships them for everything it support at that point of time. Which means that when a newer version of iOS is shipped after the Xcode release the missing disk image might be unavailable until an updated Xcode is released (Apple can't guarantee future compatibility of the disk image).
E.g. for Xcode 9.0 (I don't have 9.0.1 installed)
/Applications/Xcode9.app/Contents//Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0 (15A372)/DeveloperDiskImage.dmg
Xamarin.iOS tries to load the image based on the device version. If it cannot find it it will report the MT1108 error. A potential workaround would be to rename (or copy) the disk image to match your iOS version number. YMMV depending on the changes that Apple introduced in that iOS update.
Note that Xamarin.iOS does not need the disk image for most features. The most visible one, where it's required, is to automatically start the application on devices.
As you found out the deployment works and you can manually start the application and the debugger will connect. I'll update the documentation to include this information.
Update
There was no further Xcode 9.0.x release after iOS 11.0.3. However the next Xcode release (9.1) included support for all 11.0.x versions.
/Applications/Xcode91.app/Contents//Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0/DeveloperDiskImage.dmg
The shasum of both images are identical so you can assume the one from Xcode9.0 could be renamed/copied without any issue.
Navigate to project folder and delete folders named bin & obj. That should fix the problem.

How can I have two versions of Xcode without conflicts?

My stable version of Xcode, the previous one to Xcode 8, launched two days ago, use provisioning profiles for APNs and many other data. I'd like to install Xcode 8 to learn about the new features but I'm scared about damaging my current working Xcode version because the last time I installed a beta Xcode version I remember I couldn't send packages from the stable version, something like files from two versions overlapped becoming "main files" those from the beta version.
I need precise instructions about how to install a Xcode beta version in El Capitan having and older working version without damaging anything.
By the way... is it possible to install Xcode 8 in El Capitan? And submit compiled app from this version?
You can download Xcode-beta 8 from https://developer.apple.com as usual and you can Xcode 7 & 8 side by side as they have different names Xcode-beta and Xcode (see image)

XCode 3 -> 4 confusion

I've just upgraded from OSX 10.6 -> 10.8. I had XCode 3.2.6 installed and I installed 4.5 through the appstore. I appear to have both versions installed now (which I don't mind) but I'm lost as to where everything lives now, /Developer doesn't seem to have anything new in it.
Also, my commandline tools like svn have stopped working now, they are not found. I know XCode 4 has newer and better tools (newer SVN, Git, etc) but how do I get it set up nicely? I thought cmd-line tools were part of the XCode 4 installation.
Uninstalling 3.2.6 is fine if needed, I just want to avoid clashes.
To answer your specific questions, Xcode 4.5 is in your Applications folder. It is packaged as a single app instead of using the /Developer folder. Xcode 3.2.6 is in your /Developer folder. You can keep both versions installed.
Xcode 4.5 does not install the command line tools initially. You can install them from Xcode's Downloads preferences. You can also install them by choosing Xcode > Open Developer Tool > More Developer Tools.
I'd look up any transition guides for moving from Xcode 3 to 4. There are lots of different features, so it may take a while to get used to the new layout and where Xcode puts things.
Try these links for starters:
http://docs.xamarin.com/ios/tutorials/transitioning_from_xcode_3_to_xcode_4
http://beginning-mac-programming.timisted.net/xcode-4-general-overview.html

how to fix old xcode installations on mac

I had xcode 3.2.something. and iwth ios sdks 3.0-3.1-....4.1 and 2 iphone simulator sdks.
Now i installed xcode 4.0 with ios sdk 4.3 something like that.
Now all my previous applications cannot be launched nor on device nor on simulator because there's not a single old sdk available.
so next i reinserted the original cds containing macosx and xcode and reinstalled the first xcode i used, but now there's not one ios sdk available at all.
i've been surfing the net for hours now, andi have a couple of questions:
1)have i had to uninstall the xcode 3.2.x before installing xcode 4?
2)how to uninstall applications on mac??? just to make sure that the answer i've found is the correct one.
3)how can erase the traces of all previous xcodes and their sdks in order to install the original one, now that i learned how to install different xcode versions side by side.
4) now what do you think i should to recover? do i have to back up everything and reinstall mac from the beginning?
thank you
So, your questions:
1. Have I got to uninstall XCode 3.2 before installing XCode 4? - No, you don't, but the XCode installer will overwrite your old copy by default. When installing the newer version of XCode and the iOS SDK you must specify a different install directory (eg, create a new folder in the root of your drive called 'Developer 4' for XCode 4.
2. How can I uninstall XCode? - Normally on a mac you would just drag your application to the trash, but it's a little more complicated with XCode. Refer to the instructions at this link: http://pushkararora.com/how-to/how-to-uninstall-xcode-completely/
3. How can I erase all traces of all previous XCodes? - see the answer above for question 2 :)
You can obtain old versions of the SDK from various unofficial online sources if you need to roll back to iOS 3 SDKs. However, it may not be all that much work to move your apps over to the 4.x SDKs.
ok it turned out that at the beginning i was using xcode 3.2.4 with ios sdk 4.1
The xcode that comes with mac osx only targets mac sdk. No iphone support
So i got xcode 3.2.4 setup from a backup (you can find it online) and installed and this should work
And now i have 3.2.5 using sdk 4.2 and targetting all till 3.0
and also xcode 4.0.2

Resources