xcode 5 と ios 7 を使用してアプリをゼロから再作成しました。展開ターゲットを ios 5.0 に設定しました。xcode 5を使用して、すべてのios 5.0+シミュレーターでアプリを正常に実行できます。また、アプリのios 7.0バージョンを問題なくiPhoneにアーカイブできます。
この問題は、xcode 4.6.3 を使用して ios 6.1 SDK を使用してアプリでビルドしようとすると発生します。次のビルド エラーが発生します。
"The document Main.storyboard could not be opened. Could not read archive."
そのファイルをソース コード ビューで開くと、上部に次のように表示されます。
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="rS3-R9-Ivy">
私はバージョンを 2.0 に変更します。これは、一部の人々が提供しているアドバイスです。これを行った後、クリーンアップして再構築すると、次のエラーが発生します。
"The document Main.storyboard could not be opened. Failed to unarchive element named 'tableViewCellContentView'."
この時点で何をすべきかわかりません。それが役立つ場合は、tableViewCellContent がストーリーボード ソースに 2 回表示されます。
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jxu-2I-e7e" id="p3Z-Dy-Wwr">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Share Location" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QHi-wS-Lfa">
<rect key="frame" x="20" y="11" width="116" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="jfR-fE-3PU">
<rect key="frame" x="251" y="6" width="51" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<inset key="insetFor6xAndEarlier" minX="20" minY="-2" maxX="-20" maxY="2"/>
</switch>
</subviews>
</tableViewCellContentView>
と
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ase-uh-S8O" id="Qfa-Dd-22s">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="m8y-pR-Z3V">
<rect key="frame" x="15" y="3" width="36" height="22"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4bW-Fg-tmx">
<rect key="frame" x="15" y="25" width="43" height="15"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
上記の 2 つのスニペットをソースから削除すると、ios 6.1 SDK を使用して xcode 4.6.3 でストーリーボードを正常に開くことができます。ただし、結果として UI が正しくありません。
これのどの部分が ios 6.1 SDK との下位互換性を持たないか考えていますか?