Bersaelor / KDTree

Swift implementation of a k-dimensional binary space partitioning tree.
MIT License
156 stars 27 forks source link

Having trouble opening playgrounds in Xcode 10 #42

Closed robert-dodier closed 4 years ago

robert-dodier commented 6 years ago

Hi, I'm working with Xcode 10 on macOS High Sierra 10.13.6. I just cloned KDTree from Git.

I am trying to open the playgrounds (KDTreePlayground.playground and Example/KDTreePlayground.playground). In both cases I get strange behavior: Xcode says "Running" and it seems to wait forever. A web search suggests this behavior has been observed often enough, but the suggestions I found (clearing temporary files, restarting Xcode) didn't help.

I suppose it's probably a bug in Xcode, but maybe it would be helpful if there was any advice in the Readme about how to open the playgrounds in order to work around the problem.

Incidentally I was able to use Example/KDTree.xcworkspace to build and run the example app, so that's great. Maybe you could put a note in the Readme which says something about how you intend that the various project files should be used.

Thanks a lot, looks like a great project.

Bersaelor commented 5 years ago

Mhmm, so I just tried the tip of the master branch, Xcode 10.1 and High Sierra.

The KDTreePlayground.playground works for me.

The playground does import the KDTree library, so before running the playground you might want to (0) always open Example/KDTree.xcworkspace in Xcode, since the project is edited via it's cocoapods example folder. Even if you want to make changes to the Core library, you do that in the Development Pods folder of the xcode workspace (1) choose KDTree_Example in the top left (thats the iOS target), not the OSX target (2) for good measures Product -> Clean Build folder (3) Then Product -> Build or just ⌘B (4) now you should be good and the playgrounds ▶️ button should work without issue (and the output should be 121 added)

Unfortunately xcode is not smart enough to realize it should build libraries that a Playground imports, so for every playground that imports any libraries you always have to build them (or rebuild if you made changes).

Bersaelor commented 4 years ago

Closing as Resolved.