Import iOS 6 SDK into Xcode 4.2 on Snow Leopard - ios

I installed Xcode 4.2 on a Snow Lopard and when iOS SDK was published I imported the iOS 5.1 SDK following this topic Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?
Now I need to import iOS 6 SDK and I would know if this tutorial is still working for iOS 6 SDK.
Thank you!

This worked for me (after "su -", so I'm running as root), and with the Xcode 4.5 .dmg file mounted as a disk drive.
echo copying iPhoneOS6.0.sdk
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
echo copying iphonesim6.0.sdk
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
echo copying devicesupport for 6.0
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.0\ \(10A403\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
#remove old -latest- link
rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
echo setting up Latest link
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
ln -s ./6.0\ \(10A403\) ./Latest
Note: Xcode dmg file available from https://developer.apple.com/downloads/index.action?name=Xcode (1.56 GB)

I tried following the tutorial that you have linked.
It works perfectly for me. Just copy "6.0" instead of "5.1".

With a Intel Core Duo (32 bit) running Snow Leopard the iOS 6 simulator doesn't work (because some of the libraries are missing 32 bit variants).
It also appears that while it is possible to test on an iPhone 4 device upgraded to iOS6 by copying the iPhoneOS.platform files but it does not appear to be possible to do the same with an iPhone 5. I assume this is due to the new armv7s format on the device.
So what you can do depends on your mac and your iOS device.

For the building of Cordova projects the same procedure works, however you will probably get this error:
dyld: Library not loaded: /usr/lib/system/libdispatch.dylib
Referenced from:
/Developer42/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/lib/libSystem.dylib
Reason: no suitable image found. Did find:
/Developer42/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/lib/system/libdispatch.dylib:
unknown required load command 0x80000023 Command
/Developer42/usr/bin/ibtool failed with exit code 255
This build fail happens because of /Classes/MainViewController.xib which is not compatible with iOS 6.... i think ;)
The workaround:
Select your projects target and expand the Supporting Files folder. Inside this folder, click on any file OTHER THAN MainViewController.xib. You need to expose the File Inspector. After you expose the File Inspector, select the file MainViewController.xib. At this point xcode will try to crash, don't let it!... just keep pressing Continue in the crash prompt until the File Inspectors settings changes to reflect the .xib file. You should keep pressing Continue until you get past the crash prompts such that you can make edits to the File Inspector. In the File Inpsector, under Target Membership unselect the target.
Close xcode, reopen and all should be golden!!
Avoid selecting MainViewController.xib in the future as it will crash your session.

I just tried to import the iOS 6 SDK into Xcode 4.2 for Snow Leopard, but when I tried to build one of my old projects, I got the same errors that iOSGuru mentioned. The troublemaker seems to be the iOS 6 simulator. Once I removed the iOS 6 simulator, my old project built normally using "Latest iOS(iOS 6.0)" selected as the Base SDK. That means I can't test on the iOS 6 simulator, but I'm testing on my real device running iOS 6 so I don't think that's such a big deal.
I haven't tried to build anything using iOS 6 features yet, so there's a chance something might still break there, but omitting the iOS 6 simulator seems to let me build with the iOS 6 SDK.

Related

How to run a previously compiled version (or a previous build) of an Xcode project in ios 10.0 simulator

I'm trying to test one of my apps on ios 10. I have downloaded the Xcode 8 beta which ships with the ios 10.0 Simulator. However, as expected, Xcode 8 is throwing tons of errors on the libraries I'm using [like Alamofire] which is preventing me from building in Xcode 8, which I don't feel I need to worry about right now. I'm just looking for an easy way to run the last stable compiled version (which I can successfully build within Xcode 7 for ios 9.3). I am unable to trigger the ios 10.0 Simulator from my terminal via xcrun as I have used to achieve similar things in the past.
Any guidance would be much appreciated!
EDIT -- Solved
I figured out a way to achieve what I was looking for, for those interested.
In Xcode7 go to Preferences > Locations > and change Command Line Tools to Xcode 8.0
In Terminal, type xcrun simctl list to see the available Simulators (ios 10.0 simulators should be available now).
Copy the UDID of the Simulator you want.
Make sure the normal Simulator app is not running, then run open /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID <Copied UDID>
After the desired Simulator is booted, run xcrun simctl install booted <path to project .app file> (the path to the .app file can be found in Xcode on the left pane, under your main project, under the folder "Products" copy the file path from the [project-name].app file located there)
This should install the app onto the desired Simulator. I did encounter some errors the first few times I tried this. I got around them by simply quitting the Simulator.app and trying again (Worked for me on the fourth try).

Use Xcode 7 with iOS 10

I want to use Xcode 7 with iOS 10.
As I understand, working with iOS 10 beta requires Xcode 8 beta, so I should upgrade my Xcode. However, my code can't be built by the new compiler, so I want to stay with Xcode 7.
How can I achieve that?
You need use DeveloperDiskImage from Xcode 8 Beta.
For this extract Xcode 8 Beta app and copy DeveloperDiskImage for iOS 10 to your Xcode folder.
Suppose you extract Xcode to Downloads/Xcode-beta.app
cp -r /Users/fanruten/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A345\) /Applications/Xcode_7.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
After copy DeveloperDiskImage you should start Xcode and connect iOS device to your mac.
Edit:
With a standard Xcode install one can create a soft link:
sudo ln -s \
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5309d\) \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
You can use any SDK on an older build of Xcode simply by copying and pasting the folder of the OS you need. Also you obviously cannot have two apps with the same name so just rename them to Xcode 7 and Xcode 8.
right-click / ctrl-click the Xcode 8 application icon to show the package contents and navigate to this location and copy the iOS 10.0 or WatchOS 3.0 folder etc.
/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
/Applications/Xcode8.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport
Then navigate to the same location in Xcode 7 and paste the folder.
/Applications/Xcode7.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
/Applications/Xcode7.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport
Restart Xcode 7. You'll have to wait a while for Xcode to rebuild the symbols etc.
For me none of the above suggestions worked.
Instead, I navigated to this location(press CMD+SHIFT+K to insert the below path) (through finder)
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
And copied the 10.0(14A5339a) folder, which contains the developer disk image. I then pasted it into
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
EDIT: I'm using Xcode7 (version 7.3.1-7D1014),iOS 10 public beta 6(14A5345a)-this is released on aug 19,2016
Although copying the folder containing the disk image is still the best way to go, i had no time downloading the newest Xcode to get hold of the disk image folder, so i basically archived the app and exported it using the save for development deployment option, then installed it on the test device using iTunes app.
In my case i hade Xcode 8.0 wanting to build on a 10.2.1 iOS device.
Pascal && Fanruten are right.
tested on 12th aug, Xcode Version 7.3.1 (7D1014) AND iOS 10.0 (14A5309d) on iPhone6 Plus.
I made a symbolic link as suggested (path are a bit different... see below.) but works with linking to Xcode Version 8.0 beta 4 (8S188o).
only for completeness:
Beta 4
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5322e\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
Beta 5
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5339a\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
Tymac's answer almost worked for me. Rather than copy and past, I had two Finder windows opened and then dragged the iOS 10 folder to the Xcode 7 folder. Once it's in Xcode 7, open the folder and make sure there is a dmg file.
Earlier I had dragged a copy of the iOS 10 device support folder to my desktop then copied it to the Xcode 7 folder. That seemed to unpack the dmg file so Xcode 7 still complained. Needs to be a dmg file in the folder.
One warning. I tried to use XCode 7.3.1 with ios 10 images from XCode 8.1 for cordova project (it works), but had problems with push notifications permissions (different setups for ios 8/9/10). Not sure about it, but it seems to me that some compiler directives are missing in 7.3.1
Here it is for XCode 9 and iOS 11 Beta 1:
sudo ln -s \
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\) \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0
my two cents for Xcode Version 11 beta against Xcode 10 after wwdc2019:
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0
so I can use my iPhone with iOS 13 beta in Xcode 10.
after ln -s , pls relaunch Xcode

Build and Debug using ios 8.4 SDK in Xcode 7

Xcode 6.4 doesn't allow to debug on iOS 9 devices so i installed xcode 7 but it doesn't have iOS sdk 8.4 installed. Since I have a xcode 6.4 installation, i copied the
iPhoneOS8.4.sdk to the /Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs folder
and copied the
iPhoneSimulator8.4.sdk to /Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs.
However the iOS 8.4 sdk does not appear in the base sdk options list.
In addition to copying the iPhoneOS8.4.sdk folder you need to edit
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist
and set MinimumSDKVersion to 8.4 and restart Xcode. Then Xcode will find and list the older SDK.
There is one work around for this situation. I used to do this in my routine work as below:
Open your project in Xcode 6.4 (You can see iOS 9 device debugging is disabled)
Now just open Xcode 7 (without any project opened from it) such that it looks active in "Dock Tray".
By doing above two steps, Xcode 6.4 will now enable to debug with iOS 9 devices.
Hope this helps.
You were copying an iPhoneOS8.4.sdk which is a relative symlink to iPhoneOS.sdk in that same folder in xcode6. So you ended up with two symlinks (..8.4, ..9.1) pointing to xcode7’s iPhoneOS.sdk (which is iOS 9.1)
Remove any changes you made.
You got two options. The first is the preferred one, as xcode7 updates will delete your 8.4 SDK in the future.
create a symlink called iPhoneOS8.4.sdk in the xcode7-folder. Let it point to your xcode6 iPhoneOS.sdk (which is iOS 8.4)
Use this command from your xcode7 sdk directory
ln -s <your xcode6 path>/iPhoneOS.sdk iPhoneOS8.4sdk
copy the xcode6 iPhoneOS.sdk folder to the xcode7 location. Do not overwrite iPhoneOS.sdk (which is xcode7's iOS 9). Rename it to iPhone8.4sdk instead

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

How can I install the new iOS SDK on Xcode 5?

How can I install the new iOS SDK on Xcode 5 to be able to compile applications for the new iOS on Xcode 5? I've tried to use iTunes to transfer compiled applications to the device. But it doesn't work any more.
Edit
I've tried to copy SDK folders from xCode 6 to xCode 5 as described on here. But, it doesn't work because of an issue with ibtool during compilation process
Yes you can.
If you're using Mavericks and want to continue using Xcode 5, do these steps:
Rename Xcode.app to Xcode 5.app
Download and copy Xcode 6 to Applications-Folder, and rename it to
Xcode 6.app
and...
Execute this command in Terminal:
sudo ln -s /Applications/Xcode\ 6.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.0\ \(12A365\)/ /Applications/Xcode\ 5.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.0\ \(12A365\)
If you are trying iOS8 you can't use anything less than Xcode 6 beta.

Resources