简体   繁体   中英

Can't open Swift Guided Tour Playground

当我试图从Apple的电子书打开Swift Guided Tour游乐场时,它说“文件无法打开,因为它是来自Xcode的新版本。据我所知,我正在使用最新的非-Beta版本,我还没有使用Swift 2.0,还在学习第一个版本。所有游乐场都已经更新,可以使用Xcode 7 Beta或者什么?我正在使用Xcode 6.3.2,以防万一实际上是最新版本。

I got the same issue with xcode 6.3.2. I got the issue when I downloaded it via ibook link. Once I downloaded it via we, it worked. https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-ID1

My previous version was playground version='1.0' and the new one also same. But it includes lots of new libraries.

I got that problem too, and finally i open it OK, that just problem with where you download your .playground file:

@Xcelleratr Download your file here:

https://developer.apple.com/library/mac/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html

It will be OK my friend :)

works for Xcode version:

Version 6.3.2 (6D2105)

Version 7.0 beta (7A120f)

Im guessing it was corrupted could check it by: Right clicking on the playground file > show package contents > open contents.xcplayground in a text editor like sublime and look for playground version='3.0' near the top

If this is any higher it will pop up with the error you seen.

Just in case someone stumbled upon this problem, here is what happened to me:

  1. Download from guided tour page .
  2. Save it with .zip extension instead of .playground, as seen in this picture:

在此输入图像描述

  1. Double click the downloaded file, it will unzip it and you'll get your actual GuidedTour.playground file.

在此输入图像描述

So if you have a playground file and it only opens xcode and not a guided playground, right click the playground fle and show package contents, then go to contents.xcplayground and rightclick and open with text editor.

I had to change this line...

display-mode='raw'>

to ....

display-mode='rendered'>

then save and when you go back and open the playground it should be ok now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM