Share a playground in Swift Playgrounds on Mac
You can share your playground so other people can try your code.
If you have an Apple Developer account and you create an app playground, you can submit your app to App Store Connect to make it available to others.
Use AirDrop, Mail, Messages, and more
In the Swift Playgrounds app on your Mac, go to the My Playgrounds window (choose Window > My Playgrounds or click at the top left of the More Playgrounds window).
Control-click the playground you want to share, then click Share.
Choose how you want to share your playground:
AirDrop: Click a recipient. The recipient must accept your document before it’s sent.
Messages, Mail, or another app: Click the icon for the app you want to send with, enter the recipient and other requested information, then send it.
Submit an app to App Store Connect or install it on your Mac
You can install an app you created in the Applications folder on your Mac. Or, if you have an Apple Developer account, you can submit your app to App Store Connect.
If you have an Apple Developer account, sign in (if you haven’t already) by choosing Playgrounds > Settings > Account, then clicking Sign In.
Note: To submit an app to App Store Connect, you need to create a custom icon for it using an image imported from your Photos, Files, or another app. You can’t use a placeholder icon when submitting an app to App Store Connect.
Click near the top left to open the left sidebar, then click App Settings near top of the sidebar.
Create a custom icon by clicking Custom, then importing or pasting an image for your icon.
Click Capabilities, click , then select any capabilities you want to add to your app—for example, Bluetooth, Calendar, Camera access, or Speech Recognition.
Enter an explanation for each capability you want to add.
This explanation is shown to the user to request permission to grant the capability.
Enter a team and bundle ID, a version number, and a category for your app (to display on the App Store for customers—for example, Education, Business, or Games).
To install the app in the Applications folder on your Mac, click Install on this Mac.
To submit the app to App Store Connect, click Upload to App Store Connect.
For information about using App Store Connect to follow up on your App Store submission, see App Store Connect.
Create a PDF of a playground book
You can create a PDF of your playground book to print or share with others. The PDF is an image-based file (it doesn’t contain text information), so you can’t copy and paste text from it.
Open the playground book you want to print or share, then choose File > Export as PDF.
Find a location where you want to save the PDF, then click Save.
Export a playground book
You can export a playground book to share it with others or save a version for yourself.
In the Swift Playgrounds app on your Mac, open a playground, then choose File > Export as New Playground.
To rename the playground, select its name, then enter a new name.
To use the changes you’ve made as the new starting point for the exported playground, make sure Start Over with My Changes is turned on. Then, if the person who receives your playground chooses to reset it, their changes will be discarded but not yours.
If Start Over with My Changes is turned off when you export the playground, both your changes and theirs are discarded if they reset the playground.
To save the playground to your My Playgrounds page, click Export to My Playgrounds.
From the My Playgrounds page, you can share the playground.