Skip to content

Private-Playgrounds/Try-Swift-Playgrounds

Repository files navigation

Warning

Public APIs Only

  • App Store apps may only use public APIs.

  • This workshop is not about shipping to the App Store.

  • Today's examples are for debugging and personal experimentation.


App Review Guidelines 2.5.1

Try Swift Playgrounds

To everyone joining iOS Private Playgrounds, welcome.

This project is where you'll add and share what you build in the workshop. Create your folder, add your view, and make it available from the list in Playgrounds/ContentView.swift.

Add Your Work

Work on your own branch and merge your changes through a pull request.

  1. Create a branch for your work.
  2. Open Playgrounds.xcodeproj in Xcode.
  3. Create a folder for your work at Playgrounds/<ParticipantName>/.
  4. Use the samples in Playgrounds/WorkshopSample/ as references for your view.
  5. Add your Swift files inside Playgrounds/<ParticipantName>/.
  6. Register your entry in Playgrounds/ContentView.swift with a new NavigationLink.
  7. Run the Playgrounds scheme and confirm your entry appears in the list.
  8. Commit and push your branch.
  9. Open a pull request into main, then merge it when your sample is ready. You do not need to wait for workshop staff approval.

Example

List {
    // Add one entry per participant here.
    // Keep your view in `Playgrounds/<ParticipantName>/`.
    
    NavigationLink {
        YourSampleView()
    } label: {
        Text("Your Sample")
    }
    
    NavigationLink {
        WorkshopSampleView()
    } label: {
        Text("Workshop Sample")
    }
}

Repository Layout

Playgrounds/
  ContentView.swift         # Register your NavigationLink here with a clear label
  WorkshopSample/           # Reference implementation for participants
  <ParticipantName>/        # Add your work here, for example `Alex`
Docs/                       # Guides for exploration, private API patterns, and workshop ideas
PrivateInterfaces/          # Reference interface files used in the workshop

Start Exploring

When you start looking for private APIs, begin with runtime inspection so you can see what is actually present on the object in front of you. After that, use declarations and headers to broaden the search.

Explore with po

  • po allows you to check raw data from runtime objects.
  • Start here when you already know the target view or object and want to inspect what is visible at runtime.

Commands

Command What it shows
_ivarDescription Check the list of instance variables for a specific object.
_shortMethodDescription Quickly inspect the available methods on a class or object.
_methodDescription Inspect method information in more detail.

Explore with headers.82flex.com

  • headers.82flex.com is a convenient site for browsing iOS framework headers.
  • Use it when you want to search by name quickly or get a rough sense of where a type is declared.

Private API Calling Patterns

These are the main calling patterns covered in the workshop docs and samples.

Use these patterns after you know the key, selector, symbol, or class name you want to try.

Pattern Use it when
Key-Value Coding You know the property name and want to read or set it through Objective-C Key-Value Coding.
Calling Objective-C Methods by Selector You know the selector name and want to call the Objective-C method from Swift.
Resolving Symbols with dlsym You know the exported symbol name and want to resolve it at runtime with dlsym().
Adding an Objective-C Header You want to expose a private Objective-C type to Swift and refer to it directly by name.

Workshop Theme Ideas

These are just starting points 🚀 Feel free to explore beyond them and try any fun idea that catches your interest.

See Workshop Theme Ideas for previews and more details.

Difficulty Theme
Show a custom view controller above the message area of UIAlertController.
Present UISheetPresentationController as a full-screen sheet with interactive dismissal, like Apple Music Now Playing.
★★ Show a Menu independently from its source view with showsMenuFromSource.
★★ Apply VariableBlur to any view with UIBlurEffect.
★★ Show UISheetPresentationController from the left side on iPad.
★★ Show a custom view inside UIMenu.
★★★ Keep the background glassy for UISheetPresentationController even with the large detent.
★★★★★ Enable glass on the medium detent of UISheetPresentationController. The default medium detent looks subdued.

Interoperability Requests

About

Playgrounds, samples, and guides for the try! Swift 2026 iOS Private Playgrounds workshop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors