LoginSignup
34
33

More than 5 years have passed since last update.

iOSアプリ開発の処方箋 : 古いバージョンのiOS SDKをダウンロードしてインストールする方法

Posted at

諸事情により古いiOS SDKが必要な時の対応をまとめました。

今回追加インストールするSDK

  • iPhoneSimulator7.0.sdk
  • iPhoneOS7.0.sdk

Xcodeのダウンロード

developer.apple.com より、欲しいバージョンのSDKがバンドルされているXcodeのバージョンをダウンロードします。
Xcode download

古いバージョンのSDKをインストール

# ダウンロードしたXcodeのdmgファイルをマウントし、そのディレクトリへ移動します
$ cd /Volumes/Xcode/Xcode.app

# iPhoneSimulator7.0.sdk をコピーします
$ sudo cp -R Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk \
  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

# 2つ並びました
$ ls /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
iPhoneSimulator7.0.sdk  iPhoneSimulator7.1.sdk

# iPhoneOS7.0.sdk をコピーします
$ sudo cp -R Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk \
  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

# 2つ並びました
$ ls /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
iPhoneOS7.0.sdk iPhoneOS7.1.sdk

xcodebuildコマンドを用いて、インストールされているiOS SDKの一覧を表示します。
先ほどは無かった、7.0がリストに表示されるようになりました。

$ xcodebuild -sdk -version
MacOSX10.8.sdk - OS X 10.8 (macosx10.8)
SDKVersion: 10.8
Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
PlatformVersion: 1.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
ProductBuildVersion: 12F37
ProductCopyright: 1983-2013 Apple Inc.
ProductName: Mac OS X
ProductUserVisibleVersion: 10.8.5
ProductVersion: 10.8.5

MacOSX10.9.sdk - OS X 10.9 (macosx10.9)
SDKVersion: 10.9
Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
PlatformVersion: 1.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
ProductBuildVersion: 13C64
ProductCopyright: 1983-2014 Apple Inc.
ProductName: Mac OS X
ProductUserVisibleVersion: 10.9.2
ProductVersion: 10.9.2

iPhoneOS7.0.sdk - iOS 7.0 (iphoneos7.0)
SDKVersion: 7.0
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
PlatformVersion: 7.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
ProductBuildVersion: 11B508
ProductCopyright: 1983-2013 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.0.3

iPhoneOS7.1.sdk - iOS 7.1 (iphoneos7.1)
SDKVersion: 7.1
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
PlatformVersion: 7.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
ProductBuildVersion: 11D167
ProductCopyright: 1983-2014 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.1

iPhoneSimulator7.0.sdk - Simulator - iOS 7.0 (iphonesimulator7.0)
SDKVersion: 7.0
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
ProductBuildVersion: 11B508
ProductCopyright: 1983-2013 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.0.3

iPhoneSimulator7.1.sdk - Simulator - iOS 7.1 (iphonesimulator7.1)
SDKVersion: 7.1
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
ProductBuildVersion: 11D167
ProductCopyright: 1983-2014 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.1

Xcode 5.1.1
Build version 5B1008
34
33
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
33