#PropertyWrapper
Exploring a Call Once property wrapper in Swift using parameter packs.

paul-samuels.com/blog/2026/01...

#swift #propertyWrapper #parameterPacks
Call Once · paul-samuels.com
paul-samuels.com
January 30, 2026 at 2:18 AM
Yes.
Line 2 creates an NSFetchRequest. Don't confuse this with the FetchRequest propertywrapper.
Line 3 to 5 sets the properties needed for the NSFetchRequest.
Line 8 inserts the first SectionEntity found into the RecordListView.
Line 9 inserts the viewContext into the Environment of subviews.
April 15, 2025 at 8:05 AM
Swift property observers work on most variable declarations. This only helps if you want to watch variables and you're open to recompiling.

Property wrappers work on any variable that isn't top-level code.

In neither case does the "property" need to be a property of a class, struct, or enum.
December 20, 2024 at 8:28 PM
Stop Me Here. propertyWrapper Alert!!! I have the urde to write a propertyWrapper for a single property.
.
.
no, really, it's overkill, and justified only for an educational purpose.
February 5, 2025 at 12:29 AM
Controversial opinion: Xcode should have propertyWrapper snippet build in by 2021 or later.
February 5, 2025 at 12:23 AM
@ frozen @ propertyWrapper @ dynamicMemberLookup public struct Foo {}
January 10, 2025 at 7:10 PM
📦 Simon Whitty just added a new package, Awaiting – Swift @propertyWrapper that waits asynchronously until the value matches a predicate.

https://swiftpackageindex.com/swhitty/Awaiting
February 11, 2025 at 10:36 AM
今なら RemoteConfigValueObservable を Swift 5.9 の Observable にできそう contribute chance

firebase-ios-sdk/FirebaseRemoteConfigSwift/Sources/PropertyWrapper/RemoteConfigValueObservable.swift at 10.15.0 · firebase/firebase-ios-sdk github.com/firebase/fir...
firebase-ios-sdk/FirebaseRemoteConfigSwift/Sources/PropertyWrapper/RemoteConfigValueObservable.swift...
Firebase SDK for Apple App Development. Contribute to firebase/firebase-ios-sdk development by creating an account on GitHub.
github.com
September 23, 2023 at 4:54 PM
SwiftUIで作られたViewはOSから再レンダリングを要求されたらそれに応えねばならないので、例えばObservableなPropertyWrapperを持つViewModelを持っていても、そのinitの中で何かしらの処理を呼び出すのはナンセンスでonAppearなどのライフサイクルの中でコールすることで呼び出し回数を制御しなければならない。
March 17, 2025 at 1:33 PM
SwiftUI、struct(= value type)で実装するのでclass(= reference type)のようにPropertyWrapperで定義されている以外の内部変数を更新できず、宣言的な実装が至る所で求められる。ゆえに複雑なViewの状態も宣言的に実装しないといけないのでデータ構造きちんとしないと逆にしんどくなる感じがある
December 6, 2024 at 2:18 PM
GestureStateなるPropertyWrapperが存在していることもこのAppleのドキュメント見るまで知らなかった。わざわざそれ用のPropertyWrapperを自作していたのにOSレベルで標準提供されているのね...
developer.apple.com/documentatio...
LongPressGesture | Apple Developer Documentation
A gesture that succeeds when the user performs a long press.
developer.apple.com
December 6, 2024 at 2:06 PM
昨今のSwift(特にSwift5でPropertyWrapperが追加されたあたりから)言語自体の機能も出来ることも増えすぎて何も選定できないような状態になってる笑
August 10, 2024 at 9:58 AM
PropertyWrappers were a good feature, but they totally break Swift6 compatibility in their current form. If you have any field with propertyWrapper in your class, you can’t make it Sendable
November 20, 2024 at 5:39 PM