Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aheze committed Apr 19, 2021
1 parent d2edc06 commit 74b23f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Intro | Positioning | Distances | Angles | Completed App
For me, making a playground book was much harder than a regular Xcode project. Here's some tips that I picked up along the way.

### Development
- Instead of dragging files into the project, create them locally (<kbd>Command</kbd> + <kbd>N</kbd>), them copy over the contents. Whenever I dragged in a file, I got a "There was a problem running this page" error.
- Instead of dragging files into the project, create them locally (<kbd>Command</kbd> + <kbd>N</kbd>), then copy over the contents. Whenever I dragged in a file, I got a "There was a problem running this page" error.
- Use ARKit instead of RealityKit. The camera preview works, but I was never able to see my objects in the scene.
- Pre-compile ML models if possible. See [this article](https://heartbeat.fritz.ai/how-to-run-and-test-core-ml-models-in-swift-playgrounds-8e4b4f9cf676) for details.
- To change the name of the playground, edit the `BuildSettings.xcconfig` file
Expand All @@ -41,7 +41,6 @@ Make sure the **Module** is set to `None` and **Inherit Module From Target** is
<br>

### Debugging

- To avoid the "There was a problem running this page" error, **turn on Authoring Debug Mode in the Settings app**. This gives you the full stack trace! If only I knew this earlier... I was commenting out lines of code until the error went away, AirDropping to my iPad every time. Go upvote [their answer on Stack Overflow](https://stackoverflow.com/a/67076862/14351818) *now*.
- You can get the playground page's current text, including the user-modified code, with `PlaygroundPage.current.text`. Put the below code in `viewDidLoad` to see what it is (for testing purposes).
```
Expand All @@ -61,4 +60,11 @@ DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
}
```

### Get Help
I probably wouldn't have finished if not for these.
- [Swift Discord server](https://discord.gg/zemPCtxE)
- [Apple Developer Forums](https://developer.apple.com/forums/)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/swift)



Binary file not shown.

0 comments on commit 74b23f7

Please sign in to comment.