Could not download and install iOS 9.3 Simulator. The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk.

升級(jí)到Xcode9.0以后,去下載模擬器,發(fā)現(xiàn)提示“Could not download and install iOS 9.3 Simulator. The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk.”的錯(cuò)誤

看起來(lái)是個(gè)https證書驗(yàn)證的問(wèn)題巢价,那怎么做呢粱甫?

  1. 通過(guò)終端命令打開(kāi)Xcode
sudo /Applications/Xcode.app/Contents/MacOS/Xcode
  1. 打開(kāi)下載模擬器的窗口Xcode-Preferences-Components點(diǎn)擊iOS9.3 Simulator苇本,彈出窗口淫茵,提示警告美莫。
  2. 查看終端的輸出
2017-09-30 13:43:09.368 Xcode[3443:318102] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
2017-09-30 13:43:09.372 Xcode[3443:318051] [MT] DVTDownloadable: Error Domain=NSURLErrorDomain Code=-1202 "Could not download and install iOS 9.3 Simulator. The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7f9c412b1dc0>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, NSErrorFailingURLStringKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, NSErrorPeerCertificateChainKey=(
    "<cert(0x7f9c5e340200) s: *.test.edgekey.net i: Symantec Class 3 Secure Server CA - G4>",
    "<cert(0x7f9c5e340c00) s: Symantec Class 3 Secure Server CA - G4 i: VeriSign Class 3 Public Primary Certification Authority - G5>"
), NSErrorClientCertificateStateKey=0, NSLocalizedDescription=Could not download and install iOS 9.3 Simulator. The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk., _kCFStreamErrorDomainKey=3, NSUnderlyingError=0x7f9c41374bc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk." UserInfo={NSErrorFailingURLStringKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9843, kCFStreamPropertySSLPeerCertificates=(
    "<cert(0x7f9c5e340200) s: *.test.edgekey.net i: Symantec Class 3 Secure Server CA - G4>",
    "<cert(0x7f9c5e340c00) s: Symantec Class 3 Secure Server CA - G4 i: VeriSign Class 3 Public Primary Certification Authority - G5>"
), _kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7f9c412b1dc0>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, _kCFStreamErrorCodeKey=-9843}}, _kCFStreamErrorCodeKey=-9843}
2017-09-30 13:43:09.372 Xcode[3443:318066]  DVTDownloadable: Download Failed. Downloadable: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg. Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7f9c412b1dc0>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9843, NSErrorPeerCertificateChainKey=(
    "<cert(0x7f9c5e340200) s: *.test.edgekey.net i: Symantec Class 3 Secure Server CA - G4>",
    "<cert(0x7f9c5e340c00) s: Symantec Class 3 Secure Server CA - G4 i: VeriSign Class 3 Public Primary Certification Authority - G5>"
), NSUnderlyingError=0x7f9c41374bc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk." UserInfo={NSErrorFailingURLStringKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9843, kCFStreamPropertySSLPeerCertificates=(
    "<cert(0x7f9c5e340200) s: *.test.edgekey.net i: Symantec Class 3 Secure Server CA - G4>",
    "<cert(0x7f9c5e340c00) s: Symantec Class 3 Secure Server CA - G4 i: VeriSign Class 3 Public Primary Certification Authority - G5>"
), _kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7f9c412b1dc0>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, _kCFStreamErrorCodeKey=-9843}}, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “devimages.apple.com.edgekey.net” which could put your confidential information at risk., NSErrorFailingURLKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, NSErrorFailingURLStringKey=https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg, NSErrorClientCertificateStateKey=0}
2017-09-30 13:55:29.805 Xcode[3443:318051] Unknown class GPUTesselationSliderCell in Interface Builder file.
2017-09-30 13:55:34.791 Xcode[3443:318051] Could not find image named 'DVTInFieldChooseButtonSmall'.
2017-09-30 13:55:35.089 Xcode[3443:318051] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-13247/IDEKit/NavigableItems/IDENavigableItem.m:1175
Details:  No match from <IDEKeyDrivenNavigableItem 0x7f9c5cb31960: (supports Any NSObject, represents: <Xcode3EditingGroup: 0x7f9c597a7200>)> to <Xcode3Target:0x7f9c5975de00:TestProject>. Iterating the whole tree might have taken a significant amount of time.
Object:   <IDEKeyDrivenNavigableItem_Xcode3EditingGroup_Any: 0x7f9c5cb31960>
Method:   -_descendantItemForRepresentedObject:stopAtClass:
Thread:   <NSThread: 0x7f9c50407620>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
  1. 查看輸出的下載地址https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg页眯,將下載地址 copy到瀏覽器中,發(fā)現(xiàn)提示
    截圖-1.png

    點(diǎn)擊訪問(wèn)此網(wǎng)站,既可以下載模擬器文件
  2. 將下載好的文件*.dmg拖到com.apple.dt.Xcode/Downloads文件夾中厢呵,通過(guò)終端open ~/Library/Caches,找到com.apple.dt.Xcode窝撵,點(diǎn)擊右鍵,選擇顯示包內(nèi)容,如果里面沒(méi)有Downloads文件夾襟铭,則新建碌奉,完成后,將*.dmg拖到這里面
  3. 回到窗口Xcode-Preferences-Components蝌矛,再次點(diǎn)擊剛才點(diǎn)擊過(guò)的iOS9.3 Simulator直接跳過(guò)下載道批,直接安裝了。
  4. 在安裝其他版本的模擬器入撒,就可以直接在Xcode-Preferences-Components點(diǎn)擊就能下載了隆豹,這算不算Apple的bug呢。
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末茅逮,一起剝皮案震驚了整個(gè)濱河市璃赡,隨后出現(xiàn)的幾起案子判哥,更是在濱河造成了極大的恐慌,老刑警劉巖碉考,帶你破解...
    沈念sama閱讀 218,284評(píng)論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件塌计,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡侯谁,警方通過(guò)查閱死者的電腦和手機(jī)锌仅,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,115評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)墙贱,“玉大人热芹,你說(shuō)我怎么就攤上這事〔移玻” “怎么了伊脓?”我有些...
    開(kāi)封第一講書人閱讀 164,614評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)魁衙。 經(jīng)常有香客問(wèn)我报腔,道長(zhǎng),這世上最難降的妖魔是什么剖淀? 我笑而不...
    開(kāi)封第一講書人閱讀 58,671評(píng)論 1 293
  • 正文 為了忘掉前任纯蛾,我火速辦了婚禮,結(jié)果婚禮上祷蝌,老公的妹妹穿的比我還像新娘茅撞。我一直安慰自己,他們只是感情好巨朦,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,699評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布米丘。 她就那樣靜靜地躺著,像睡著了一般糊啡。 火紅的嫁衣襯著肌膚如雪拄查。 梳的紋絲不亂的頭發(fā)上,一...
    開(kāi)封第一講書人閱讀 51,562評(píng)論 1 305
  • 那天棚蓄,我揣著相機(jī)與錄音堕扶,去河邊找鬼。 笑死梭依,一個(gè)胖子當(dāng)著我的面吹牛稍算,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播役拴,決...
    沈念sama閱讀 40,309評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼糊探,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起科平,我...
    開(kāi)封第一講書人閱讀 39,223評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤褥紫,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后瞪慧,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體髓考,經(jīng)...
    沈念sama閱讀 45,668評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,859評(píng)論 3 336
  • 正文 我和宋清朗相戀三年弃酌,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了氨菇。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,981評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡矢腻,死狀恐怖门驾,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情多柑,我是刑警寧澤,帶...
    沈念sama閱讀 35,705評(píng)論 5 347
  • 正文 年R本政府宣布楣责,位于F島的核電站竣灌,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏秆麸。R本人自食惡果不足惜初嘹,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,310評(píng)論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望沮趣。 院中可真熱鬧屯烦,春花似錦、人聲如沸房铭。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 31,904評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)缸匪。三九已至翁狐,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間凌蔬,已是汗流浹背露懒。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 33,023評(píng)論 1 270
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留砂心,地道東北人懈词。 一個(gè)月前我還...
    沈念sama閱讀 48,146評(píng)論 3 370
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像辩诞,于是被迫代替她去往敵國(guó)和親坎弯。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,933評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容