How to use shared AppGroup UserDefaults in macOS and Xcode extension
Issue #201
Go to both app and extension target, under Capabilities, enable AppGroup
Specify
$(TeamIdentifierPrefix)group.com.onmyway133.MyApp
$(TeamIdentifierPrefix)
will expand to something likeT78DK947F3.
, with.
Then using is like a normal UserDefaults
1 | let defaults = UserDefaults(suiteName: "T78DK947F3 .group.com.onmyway133.MyApp") |
Updated at 2020-11-12 19:57:33