Xcode 5에 iOS 6 SDK를 설치할 수 있습니까?
Xcode 5에는 iPhone 6.1 시뮬레이터를 다운로드 할 수있는 환경 설정 창이 있지만 iOS 6 SDK를 다운로드 할 수있는 곳을 찾을 수 없으므로 Xcode 5로 개발할 때 활성 SDK를 iOS 6으로 설정할 수 없습니다 Xcode 5에서 iOS 6 SDK를 설치할 수있는 해결 방법이 있습니까?
편집하다:
Xcode 5가 일반적으로 사용 가능하고 이전 버전의 SDK를 다운로드 할 수 있으므로 이제 해결 방법이 더 이상 필요하지 않습니다.
편집 : 2014 년 2 월 1 일부터 Apple은 더 이상 iOS7 이전의 앱을 App Store에 제출할 수 없습니다. 따라서이 기술은 여전히 작동하지만 대부분의 독자에게는 유용하지 않습니다.
예, 괜찮습니다. 나는 여전히 하나의 프로젝트에 대해 iOS 4.3으로 빌드하고 있습니다 (업데이트 된 지 얼마되지 않았지만 iOS 6이 나온 후에도 여전히 받아 들였습니다). 현재 Xcode 5로 10.5 앱을 빌드합니다.
"기본 SDK"로 사용할 수 있도록 Xcode를 이전 SDK를 가리키는 방법을 참조하십시오 . 설정 방법에 대한 자세한 내용은 내 fix-xcode 스크립트를 사용하여 업그레이드 할 때마다 모든 것을 링크 할 수 있습니다 .
유일한 트릭은 이전 SDK를 얻는 것입니다. 그것들이 없다면, 일반적으로 이전 버전의 Xcode (여전히 developer.apple.com에서 구할 수 있음 ) 를 다운로드 하고 설치 프로그램 패키지를 열고 필요한 SDK를 찾아야합니다.
SDK는 다음의 설치 프로그램 패키지에서 찾을 수 있습니다.
Xcode.app/ 콘텐츠 / 개발자 / 플랫폼 /
또한 xcode 5로 업데이트 할 때 동일한 sdk를 제거했을 때 동일한 문제가 발생했습니다. 그러나 다른 컴퓨터에서 이전 SDK의 사본을 가져 와서 다음 링크에서 다운로드 할 수 있습니다.
http://www.4shared.com/zip/NlPgsxz6/iPhoneOS61sdk.html
(www.4shared.com 테스트 계정 test@yopmail.com/test)
두 가지 방법으로 작업 할 수 있습니다.
1)이 폴더의 압축을 풀고 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs에 붙여넣고 xcode를 다시 시작하십시오.
그러나 xcode를 업데이트하면 Xcode에 의해 다시 제거 될 수 있습니다.
2) 다른 방법은 원하는 위치에 압축을 풀고 붙여 넣은 다음 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs로 이동하여 심볼릭 링크를 작성하여 SDK가 동일한 경우에도 동일하게 유지되도록하는 것입니다 Xcode를 업데이트합니다.
빌드 설정> 아키텍처> 표준 (64 아님)을 변경 한 또 다른 변경 사항은 모든 배포 대상 버전을 나열합니다.
배포 대상 만 변경하려는 경우 zip을 다운로드 할 필요가 없습니다.
다음은 몇 가지 스크린 샷입니다.
예, 오늘 문제를 해결했습니다.
- 귀하 또는 귀하의 친구의 이전 Xcode 디렉토리에서 iPhoneOS6.1.sdk와 같은 SDK 파일을 찾으십시오.
- Xcode 5 디렉토리 (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs)에 복사하여 넣으십시오.
그런 다음 아래와 같이 SDK를 선택할 수 있습니다.
이것이 도움이되기를 바랍니다.
이전 SDK를 찾아서 다운로드하십시오. 이전 SDK는 여기에서 찾을 수 있습니다 .
xcode.app 디렉토리를 Xcode_4.6.3.app로 복사했습니다.
이제 두 xcode 버전 모두에서 테스트하고 디버깅 할 수 있습니다. 해당 폴더에서 폴더를 실행하거나 바탕 화면에 바로 가기를 만들어야합니다. 명령 행에서 빌드 할 때 iPhoneOS6.1
대신 매개 변수를 제공하십시오.iPhoneOS7.0
이것은 Xcode5 및 iOS에서 나에게 효과적이었습니다.
Xcode5의 SDK 디렉토리로 이동하십시오. 일반적으로 다음 위치에 있습니다.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
다음과 같이 이전 SDK에 심볼릭 링크를 추가하십시오.
sudo ln -s /Applications/Xcode_4.6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk iPhoneOS6.1.sdk
또는 명령 줄의 어느 곳에서나 정확하게
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
이전 SDK를 다운로드하여 설치할 수 있습니다
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
폴더. 변경 사항이 적용되도록 로그 아웃 + 로그인하면 새 XCode에 이전 SDK가 표시됩니다.
추가하기 위해 Xcode 5 자체로 이전 버전의 시뮬레이터를 실제로 다운로드 할 수 있습니다-환경 설정으로 이동하면 다운로드에서 찾을 수 있습니다.
- Apple Dev Center에서 Xcode 4.6.x를 다운로드 하십시오 (https://developer.apple.com/downloads/index.action).
- Applications 폴더 내에 Xcode4라는 폴더를 만들고 다운로드 한 dmg를 끌어다 놓으십시오.
터미널 창을 엽니 다
$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/
시스템 폴더 안에 있으므로 비밀번호를 입력하라는 메시지가 표시됩니다
- Xcode 5를 열면 두 SDK가 모두 표시됩니다.
가장 쉬운 해결책은 다음과 같습니다.
- 예를 들어, 이전 버전의 xcode에서 "iPhoneOS6.1 sdk"와 같은 이전 SDK를 찾으십시오. 그렇지 않은 경우 Apple Developer 서버에서 다음 주소로 다운로드 할 수 있습니다 . https://developer.apple.com/downloads/index.action?name=Xcode xcode.dmg를 열면 열 수 있습니다. Xcode.app (마우스 오른쪽 버튼을 클릭하고 "내용 표시")하고 Contents / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS6.1 sdk로 이동하십시오.
- 단순 폴더 iPhoneOS6.X SDK를 복사하여 xcode.app에 붙여 넣습니다.
- Applications 폴더에서 xcode.app를 마우스 오른쪽 버튼으로 클릭하십시오.
- Contents / Developer / Platforms / iPhoneOS.platform / Developer / SDKs /로 이동하십시오
- 여기에 붙여 넣기 만하면됩니다.
- xcode 앱을 닫았다가 다시여십시오.
시뮬레이터의 iOS 6에서 앱을 테스트하려면 :-활성 sheme에서 iOS 6.0을 선택하기 만하면됩니다.
iOS 6에서 앱을 빌드하려면 앱 디자인이 iOS 7이 설치된 iPhone의 이전 디자인이됩니다.-Targets-Base SDK에서 iOS6.1 선택
참고 사항 : Targets에서 기본 SDK를 변경하면 더 이상 iOS 7.0을 시뮬레이터에서 빌드 할 수 없습니다!
이것을 할 수 있지만 실제로는 필요하지는 않습니다.
이것을하는 방법
Jason Lee가 답을 얻었습니다. xCode를 설치할 때 이전 설치를 교체하지 않고 유지하는 것이 좋습니다. 그래서 나는 이것을 설치 폴더에 가지고 있습니다.
따라서 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
다른 SDK를 포함합니다. (Xcode.app를 올바른 번호로 교체하십시오) 이전 SDK를 복사하십시오.
/Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
복사 한 폴더는 다음과 같습니다.
이제 xCode를 다시 시작하면 이전 버전의 SDK를 기본 SDK로 설정할 수 있습니다.
왜 필요하지 않은가
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
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
"앱이 iOS 7의 혁신적인 기술과 원활하게 작동하는지 확인하십시오. 2 월 1 일부터 App Store에 제출 된 새로운 앱 및 앱 업데이트는 Xcode 5 및 iOS 7 SDK로 구축해야합니다."
현재 Xcode 4.6.3 및 5.0이 설치되어 있습니다. 다음 bash 스크립트를 사용하여 5.0을 이전 버전의 SDK에 연결했습니다.
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;
.app 경로를 제공하면됩니다.
./xcode.sh /Applications/Xcode-463.app
참고 URL : https://stackoverflow.com/questions/18423896/is-it-possible-to-install-ios-6-sdk-on-xcode-5
'Programing' 카테고리의 다른 글
파라미터로서의 Java 패스 메소드 (0) | 2020.04.06 |
---|---|
NTFS의 최대 파일 이름 길이 (Windows XP 및 Windows Vista)? (0) | 2020.04.06 |
내부 조인 대 위치 (0) | 2020.04.06 |
파이썬에서 값을 할당하지 않고 변수를 선언하는 것이 가능합니까? (0) | 2020.04.06 |
Eclipse 템플리트에서 사용되는 $ {user} 변수의 값을 변경하는 방법 (0) | 2020.04.06 |