You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
15
15
16
16
### Development
17
-
- 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.
17
+
- 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.
18
18
- Use ARKit instead of RealityKit. The camera preview works, but I was never able to see my objects in the scene.
19
19
- 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.
20
20
- To change the name of the playground, edit the `BuildSettings.xcconfig` file
@@ -41,7 +41,6 @@ Make sure the **Module** is set to `None` and **Inherit Module From Target** is
41
41
<br>
42
42
43
43
### Debugging
44
-
45
44
- 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*.
46
45
- 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).
0 commit comments