after i do it, i am back on the main screen where the apps are.
Yikes! It sounds like your playground is causing some significant iOS subsystem to fail (either triggering a kernel panic or causing the entire UI subsystem to crash). This should not be possible — the playground sandbox is supposed to protect other apps and the system as a whole from misbehaving playgrounds — so crashes like this are automatically bugworthy.
Please file a bug report about this. If you can include a playground that reproduces the problem, that’d be grand. Also, after seeing the crash, trigger a sysdiagnose log and include that log in your bug report.
Note For information on sysdiagnose logs, see our Bug Reporting > Profiles and Logs page.
Please post your bug number, just for the record.
As to what you can do about this, that’s a bit tricky. To find a workaround you first need to isolate the specific part of your code that’s triggering this failure. Unless you have any ideas about what that might be, you have to do this the hard way:
Disable a chunk of your functionality.
Test.
If it still fails, go back to step 1.
Once it stops failing, start re-enabling code at a finer granularity until you know exactly what’s triggering the failure.
This is unlikely to be fun.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"