Skip to content

Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views.

License

Notifications You must be signed in to change notification settings

BleepingSwift/access-app-delegate-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AccessAppDelegateSwift

Sample code demonstrating Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views..

This project accompanies the article: How to Access the App Delegate in Swift

Requirements

  • Xcode 26.2+
  • iOS 13.0+
  • Swift 6.0

Getting Started

  1. Clone this repository
  2. Run xcodegen generate (requires XcodeGen)
  3. Open AccessAppDelegateSwift.xcodeproj
  4. Build and run

What's Included

  • Examples.swift: Example code
  • ContentView.swift: ContentView
  • MyApp.swift: MyApp, DataView, AppDelegate, MyApp, DataView

Learn More

Read the full article at BleepingSwift for detailed explanations and additional examples.

License

MIT License - see LICENSE for details.

About

Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages