Howto import iOS6.1 DocSets from Xcode4 into Xcode5 - ios

on SO there are links which describe importing the iOS6.1 SDK from Xcode 4 into Xcode 5. What I additionally want is having the DocSet for iOS6.1 also along with Xcode 5.
I already made a copy from
/Applications/Xcode-4.6.3.app/Contents/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiOS6.1.iOSLibrary.docset
to
/Applications/Xcode.app/Contents/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiOS6.1.iOSLibrary.docset
but it doesn't get listed on Xcode 5's download preferences window.
Any ideas?
Background of my request (to prevent questions/comments like "Why do you want to use the old SDK and documentation, hey?"):
I'm still deploying my AppStore apps with iOS6.1 SDK, because I'm not happy with iOS7. Otherwise I need working with Xcode 5 for other reasons and I want to prevent using both Xcode versions 4 and 5 on my machine.
Thanks,
Konran

There is no way other than to use Dash, it works with old documentation and others: http://kapeli.com/dash

Related

iOS App's on Device with xCode6.4 and xCode7 beta

i want add a Comment to these Answer,Test iOS app on device without apple developer program or jailbreak but i don't have 50 comments :(
I want to know if is possible that I install xCode7 beta, than go back to xCode6.4 and start from xCode6.4 my App on my device? I have problems with the convert from my projects from xCode6.4 in xCode7. I hope someone can help me. I can start the Apps from xCode7 on my device without problems :) but i need the code from xCode6.4...
Please Help me...
Greetz
Xcode is only an IDE you use. In general, an IDE could switch freely.
BUT with IOS development you always work against a Base SDK that defines the abilities of the apple frameworks.
Now Xcode 7 comes with IOS SDK 9
Xcode 6 comes with IOS SDK 8
So Switching between Versions of Xcode also switches the base sdk (unless otherwise configured)
--> your app may behave differently with different base sdks. If that is acceptable though OR you don't see any change THEN switching is no issue
I switch all the time :)
EDIT: just saw the swift 2 tag. That is not supported in Xcode 6 so you can't switch

run xcode 5 and iOS7 changes in older version

We are working as a team and my partner had made changes to support iOS 7 and Xcode 5.
Now the problem is I have installed Xcode 4.6 in my system. His code is not supported in my Xcode. So I am not able to run this project in my system. I don't want to move to Xcode 5.
Is there any other way that I can still run this project in Xcode 4.6 ?
Let me know if you need to know anything else.
Tell your friend using Xcode 5.x to change the Interface builder document -> Opens in to Xcode 4.6 of your storyboard, to any storyboard file on the project.
This will enable you to open the project in Xcode 4.6. However i wont recommend you to use Xcocde 4.6.x since apple want you to use Xcode 5.x, actually starting Feb 1 2014 Apple would reject apps that won't be submitted with Xcode 5.x and optimised for iOS 7. Here is a link to that announcement.
Another thing important to mention is that you won't be able to test the project on iPhone 5s or compile to arm64 (for better performance on supported devices).
According to Apple
Starting February 1, new apps and app updates submitted to the App
Store must be built with the latest version of Xcode 5 and must be
optimized for iOS 7. Learn more about preparing your apps by reviewing
the iOS Human Interface Guidelines.
Apple Announcement
So anyhow you have to change your development to Xcode5. Better start now to change you development environment to Xcode5.
Apple suggests developers to develop with the latest environment. Tats why apple announces the Betas to test our app early when a new OS comes.
I too faced a similar kind of issue. You need to create a new storyboard file with Xcode 4.6 and use that storyboard for further changes. There's no other way to resolve your issue.

What determines if an iOS app gets the new look in iOS 7

What exactly does iOS 7 use to determine whether the application should be displayed with the traditional iOS 6 style UI (aka iOS6 compatibility mode), or the newer iOS 7 UI?
If I build our app in Xcode 5, with base SDK set to 7 I get the iOS 7 UI as expected
If I build our app in Xcode 5, with base SDK set to 6 I still get the iOS 7 UI (unexpected, happens on real device and simulator)
If I build in Xcode 4.x, I get the older UI as expected
In all cases, the deployment target is set to 5.
Since our app has fairly custom UI we're not ready to move to the new look of iOS 7 yet. However we do need to make some backend changes to support iOS 7 which we need to release now. Can we still submit apps built with Xcode 4.x and expect them to be accepted?
For the time being, you are able to. Apple will make an announcement when they stop accepting apps built with Xcode 4.x. My company is currently submitting apps with Xcode 4.6 since we do not have a new enough operating system for 5. I suspect it will be at least a few months until they stop.
Running against 6.1 Base SDK should do it.
However, as I discovered yesterday. Anything less than 7.0 Base SDK isn't supported by Xcode 5 (officially) and so it is undefined behaviour.
My app suddenly switched from iOS6 UI to iOS7 UI with no code changes.
In the end I restarted my mac and phone, deleted the app, deleted derived data and reinstalled cocoapods and it was working on iOS6 UI again.
Make sure that you set the Base SDK to iOS 6 in both the Project build settings & the target build settings - that should do the trick. Even though the target settings are supposed to override the project, I found that when just the target was set to 6 - it compiled with 7.
Regarding XCode 5, it's true that it doesn't officially ship with the iOS 6 SDK. However, you can extract it from XCode 4.6 and use it in 5.
You'll find the SDK in the XCode app under:
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Simply copy it from an existing installation of XCode 4.6 or from its .dmg (which can still be downloaded from Apple's website) to the corresponding folder in XCode 5, restart and you should now be able to select it as the Base SDK. Note that you'll have to do this after every update of XCode so you might find it easier to use a symbolic link rather than copying.
We've successfully submitted apps built this way to the App Store although as has been said before me, it would be a good idea to transition to iOS 7 ASAP before Apple makes it compulsory.

How can i build my app with old ios version on new iOS 7 and Xcode 5

I have updated my mac with ios7 xcode 5... ui is change... can i build my pp with older version. i mean is there any seeting which will allow me to build my app on older version from new one.
Thanks
AFAIK .. The only way to do this will be to download the older SDKS and link them to XCode.
With iOS7 SDK you can still set your deployment target to iOS6 and things like Autolayout etc will work.
Really supporting older versions of the SDK might actually not be worth it since API deprecations etc might cause your app to break in the real world.
I found solution to my problem after doing experiments... hope this is correct as result is what i wanted...
i copied all SDK from my old Xcode 4.6 folder after opening content package folder and then found SDKs inside to my new Xcode5 folder.
then i got option to change base SDk was showing both SDK for new and old ios. selected for 6.1 and also deployment target to 6.1....and yes i got my UI back ....everything was same that for ios6.1.
hope i will not get any issue when i will upload it on itunes...
Set your deployment target to 6.0 in your Xcode5 project.
Build & Archive your project to create an .ipa file.
Install it in your iOS7 device using iTunes.

Is it possible to install iOS 6 SDK on Xcode 5?

Xcode 5 has a preferences pane that allow one to download iPhone 6.1 simulator, however I can't find a place where it allows downloading of iOS 6 SDK, thus it is not possible to set the active SDK to iOS 6 when developing with Xcode 5. Is there a workaround that would allow Xcode 5 to install iOS 6 SDK?
EDIT:
Workarounds should no longer be necessary now that Xcode 5 is generally available and allows you to download previous versions of the SDK.
EDIT: Starting Feb 1, 2014, Apple will no longer accept pre-iOS7 apps for submission to App Store. So while this technique still works, it will not be useful for most readers.
Yes, this is fine. I still build with iOS 4.3 for one project (it's been awhile since we updated; but they still accepted it after iOS 6 came out), and I currently build 10.5 apps with Xcode 5.
See How to point Xcode to an old SDK so it can be used as a "Base SDK"? for details on how to set it up. You can use my fix-xcode
script to link everything for you every time you upgrade.
The only trick is getting the old SDKs. If you don't have them, you generally need to download old versions of Xcode (still available on developer.apple.com), open the installer package, and hunt around to find the SDK you need.
SDKs can be found within the installer package at:
Xcode.app/Contents/Developer/Platforms/
I was also running the same problem when I updated to xcode 5 it removed older sdk. But I taken the copy of older SDK from another computer and the same you can download from following link.
http://www.4shared.com/zip/NlPgsxz6/iPhoneOS61sdk.html
(www.4shared.com test account test#yopmail.com/test)
There are 2 ways to work with.
1) Unzip and paste this folder to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs & restart the xcode.
But this might again removed by Xcode if you update xcode.
2) Another way is Unzip and paste where you want and go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs and create a symbolic link here, so that the SDK will remain same even if you update the Xcode.
Another change I made, Build Setting > Architectures > standard (not 64) so list all the versions of Deployment Target
No need to download the zip if you only wanted to change the deployment target.
Here are some screenshots.
Yes, I just solved the problem today.
Find the SDK file, like iPhoneOS6.1.sdk, in your or your friend's
older Xcode directory.
Copy & put it into the Xcode 5 directory :
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs.
Then you can choose the SDK like below :
Hope this helps you.
Find and download old SDK. Older SDKs are found here.
I have copied the xcode.app directory as Xcode_4.6.3.app.
Now you can test and debug in both xcode versions. You have to run them from the corresponding folders or create shortcuts in your desktop. When building from command line give the parameter as iPhoneOS6.1 instead of iPhoneOS7.0
This worked great for me in Xcode5 and iOS.
Go to into Xcode5's SDK dir. Its usually located at:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Add a symbolic link to the old SDK like this:
sudo ln -s /Applications/Xcode_4.6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk iPhoneOS6.1.sdk
Or more accurately from anywhere in the command line,
sudo ln -s /Applications/Xcode_4.6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
You can download the older SDK and install it in
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
folder. Logout + Login just to make sure the changes take effect and you should see the older SDK in your new XCode
Just to add, you can actually download old versions of the simulator with Xcode 5 itself - just go to preferences and you'll find them under Downloads:
Download Xcode 4.6.x from the Apple Dev Center: https://developer.apple.com/downloads/index.action
Create a folder called Xcode4 within the Applications folder and drag-n-drop the downloaded dmg there.
Open a terminal window
$sudo cp -R /Applications/Xcode4/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
You will be prompt to enter a password since you're inside a system folder
Open Xcode 5 and you should now see both SDKs
Just for me the easiest solution:
Locate an older SDK like for example "iPhoneOS6.1 sdk" in an older version of xcode for example.
If you haven't, you can downlad it from Apple Developer server at this address:
https://developer.apple.com/downloads/index.action?name=Xcode
When you open the xcode.dmg you can find it by opening the Xcode.app (right click and "show contents")
and go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1 sdk
Simple Copy the folder iPhoneOS6.X sdk and paste it in your xcode.app
right click on your xcode.app in Applications folder.
Go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Just paste here.
Close your xcode app and re-open it again.
To test an app in iOS 6 on your simulator:
- Just choose iOS 6.0 in your active sheme.
To build your app in iOS 6, so the design of your app will be the older design on an iPhone with iOS 7 also:
- Choose iOS6.1 in Targets - Base SDK
Just note : When you change the base SDK in your Targets, iOS 7.0 won't be available anymore for building on the simulator !
Can do this, But not really necessary
How to do this
Jason Lee got the answer. When installing xCode I preferred keeping previous installations rather than replacing them. So I have these in my installation Folder
So /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs Contain different sdks. (Replace Xcode.app with correct number) copy previous sdks to
/Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Here is my folder after I copied one.
Now restart xCode and you can set previous versions of sdks as base sdk.
Why it is not necessary
Refering Apple Documentaion
To use a particular SDK for an Xcode project, make two selections in your project’s build settings.
Choose a deployment target.
This identifies the earliest OS version on which your software can run.
Choose a base SDK
Your software can use features available in OS versions up to and including the one corresponding to the base SDK. By default , Xcode sets this to the newest OS supported by Xcode.
Rule is Use latest as base SDK and set deployment target to the minimum version app supposed to run
For example you can use iOS 7 as base sdk and set iOS 6 as deployment target. Run on iOS 6 simulator to test how it works on iOS 6. Install simulator if not available with list of simulators.
Additionaly You can unconditionally use features upto iOS 6. And Conditionally you can support new features of iOS 7 for new updated devices while supporting previous versions.
This can be done using Weakly Linked Classes ,Weakly Linked Methods, Functions, and Symbols
https://developer.apple.com/library/ios/documentation/developertools/conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-SW3
Weak Linking
Suppose in Xcode you set the deployment target (minimum required version) to iOS6 and the target SDK (maximum allowed version) to iOS7. During compilation, the compiler would weakly link any interfaces that were introduced in iOS7 while strongly linking earlier interfaces. This would allow your application to continue running on iOS6 but still take advantage of newer features when they are available.
The other answers here are correct too, but I find the following steps to be the easiest:
Just download Xcode 4.6.3 from the dev center link that says "Looking for an older version of Xcode?" (currently points here) and mount the dmg.
Then in terminal, copy the SDK files over:
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Finally, relaunch Xcode and you're done.
My app was transitioned to Xcode 5 seamlessly because it can still build with the original iOS Deployment Target that you set in the project (5.1 in my case). If the new SDK doesn't cause some insurmountable problem, then why not build using it? Surely there are many improvements under the hood.
For example, I will much prefer to use Xcode 5 instead of Xcode 4.6.3. Why? I'll get a lot more battery life because the UI scrolling of text/code areas in Xcode 5 no longer chews up an entire CPU thread.
Linking the 6.1 SDK into Xcode 5 as described in the other answers is one step. However this still doesn't solve the problem that running on iOS 7 new UI elements are taken, view controllers are made full-size etc.
As described in this answer it is also required to switch the UI into legacy mode on iOS 7:
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:#"UIUseLegacyUI"];
[[NSUserDefaults standardUserDefaults] synchronize];
Beware: This is an undocumented key and not recommended for App Store builds!
Also, in my experience while testing on the device I found that it only works the second time I launch the app even though I'm running the code fairly early in the app launch, in +[AppDelegate initialize]. Also there are subtle differences to a version built using Xcode 4.6. For instance, transparent navigation bars behave differently (causing the view to be full-size).
However, since Xcode 4.6.3 crashes on Mavericks (at least for me, see rdar://15318883), this is at least a solution to continue using Xcode 5 for debugging.
I downloaded XCode 4 and took iOS 6.1 SDK from it to the XCode 5 as described in other answers.
Then I also installed iOS 6.1 Simulator (it was available in preferences). I also switched Base SDK to iOS 6.1 in project settings.
After all these manipulations the project with 6.1 base sdk runs in comp ability mode in iOS 7 Simulator.
From 1st february Apple will reject app built only for iOS6 or lower. Here is also the official communication from Apple. Better start building for iOS7.
To clarify my statement: If you build for iOS6 or lower, apple will reject your app.
If you build for iOS7 AND lower everything is fine, this means:
you must use xcode5
you should deploy on iOS7 at least.
The content of the Apple email is pretty clear at me
"Make sure your apps work seamlessly with the innovative technologies
in iOS 7. Starting February 1, new apps and app updates submitted to
the App Store must be built with Xcode 5 and iOS 7 SDK."
I currently have Xcode 4.6.3 and 5.0 installed. I used the following bash script to link 5.0 to the SDKs in the old version:
platforms_path="$1/Contents/Developer/Platforms";
if [ -d $platforms_path ]; then
for platform in `ls $platforms_path`
do
sudo ln -sf $platforms_path/$platform/Developer/SDKs/* $(xcode-select --print-path)/Platforms/$platform/Developer/SDKs;
done;
fi;
You just need to supply it with the path to the .app:
./xcode.sh /Applications/Xcode-463.app

Resources