tyiu on Nostr: mplorentz I was able to successfully and easily use SwiftData in iOS 17 as my ...
mplorentz (npub16zs…92l7) I was able to successfully and easily use SwiftData in iOS 17 as my persistence layer with the data models from Nostr SDK for Apple Platforms. I just put the NostrEvent or any of the subclasses in as a property into a new class tagged with the @Model macro and it worked.
Published at
2024-07-12 13:13:00Event JSON
{
"id": "f661504ee017fc617a1f97195010a162b6722ae7fd3baf865ff813a25c193cd6",
"pubkey": "2779f3d9f42c7dee17f0e6bcdcf89a8f9d592d19e3b1bbd27ef1cffd1a7f98d1",
"created_at": 1720789980,
"kind": 1,
"tags": [
[
"e",
"0f82977ed10e76618caf619fdc1d0bbf08ef23c6270b79e31da1253ecaec2abd",
"",
"root"
],
[
"e",
"fc513d5b2e6a773dd60301ac00d80934fe2a02b962c7bcc59372106ccf4387f0",
"",
"reply"
],
[
"p",
"d0a1ffb8761b974cec4a3be8cbcb2e96a7090dcf465ffeac839aa4ca20c9a59e"
],
[
"p",
"d0a1ffb8761b974cec4a3be8cbcb2e96a7090dcf465ffeac839aa4ca20c9a59e"
]
],
"content": "nostr:npub16zsllwrkrwt5emz2805vhjewj6nsjrw0ge0latyrn2jv5gxf5k0q5l92l7 I was able to successfully and easily use SwiftData in iOS 17 as my persistence layer with the data models from Nostr SDK for Apple Platforms. I just put the NostrEvent or any of the subclasses in as a property into a new class tagged with the @Model macro and it worked.",
"sig": "7b96ceefb3f7c5a9a9bf0994ae7eeaf65dcd8abceff27486eb3cbad8f71817a102374d35b4cfc1aa37aa5a040f7e0b63f556bc8471e8917560cca73883f7e5a2"
}