我使用xcode 5和ios 7從頭開始重新創建了我的應用程序。我已將部署目標設置爲ios 5.0。我能夠在所有使用xcode 5的ios 5.0+模擬器上成功運行應用程序。並且我可以將我的應用程序的ios 7.0版本存檔到我的iphone,而不會出現任何問題。使用ios 6.1將ios 7應用程序歸檔時的故事板問題sdk
當我嘗試使用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顯示了在情節提要源兩次:
<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>
如果我從源頭上去除上述這兩個片段,我可以成功地在Xcode 4.6打開故事板。 3使用ios 6.1 sdk。但是,UI的結果不正確。
任何想法是什麼部分不能向後兼容ios 6.1 sdk?