From c91aebf12308ab01b987b87869ef34e14bc8d8bd Mon Sep 17 00:00:00 2001 From: Abe White Date: Mon, 16 Dec 2024 23:03:29 -0600 Subject: [PATCH] Experiment with native bridged model layer --- Package.swift | 6 +++--- Sources/FireSideModel/FireSideModel.swift | 6 +++--- Sources/FireSideModel/Message.swift | 1 + Sources/FireSideModel/Skip/skip.yml | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index 55b87c8..607b676 100644 --- a/Package.swift +++ b/Package.swift @@ -19,6 +19,7 @@ let package = Package( .package(url: "https://source.skip.tools/skip-ui.git", from: "1.7.0"), .package(url: "https://source.skip.tools/skip-foundation.git", from: "1.0.0"), .package(url: "https://source.skip.tools/skip-model.git", from: "1.0.0"), + .package(url: "https://source.skip.tools/skip-fuse.git", "0.0.0"..<"2.0.0"), .package(url: "https://source.skip.tools/skip-firebase.git", "0.4.0"..<"2.0.0") ], targets: [ @@ -32,10 +33,9 @@ let package = Package( .product(name: "SkipTest", package: "skip") ], resources: [.process("Resources")], plugins: [.plugin(name: "skipstone", package: "skip")]), .target(name: "FireSideModel", dependencies: [ - .product(name: "SkipFoundation", package: "skip-foundation"), .product(name: "SkipModel", package: "skip-model"), - .product(name: "SkipFirebaseFirestore", package: "skip-firebase"), - .product(name: "SkipFirebaseAuth", package: "skip-firebase") + .product(name: "SkipFuse", package: "skip-fuse"), + .product(name: "SkipFirebaseFirestore", package: "skip-firebase") ], resources: [.process("Resources")], plugins: [.plugin(name: "skipstone", package: "skip")]), .testTarget(name: "FireSideModelTests", dependencies: [ "FireSideModel", diff --git a/Sources/FireSideModel/FireSideModel.swift b/Sources/FireSideModel/FireSideModel.swift index 98659e5..86dbf5a 100644 --- a/Sources/FireSideModel/FireSideModel.swift +++ b/Sources/FireSideModel/FireSideModel.swift @@ -1,6 +1,6 @@ -import SkipFoundation -import OSLog import Observation +import SkipFoundation +import SkipFuse #if !SKIP import FirebaseCore @@ -12,7 +12,7 @@ import SkipFirebaseFirestore let logger: Logger = Logger(subsystem: "fire.side", category: "FireSideModel") -public actor FireSideModel { +public struct FireSideModel { /// The global Firestore instance for the app, configured using the default /// `Android/app/google-services.json` and `Darwin/GoogleService-Info.plist` configuration files /// which can be downloaded for your project from https://console.firebase.google.com/project/ diff --git a/Sources/FireSideModel/Message.swift b/Sources/FireSideModel/Message.swift index dfa3773..0a1fd69 100644 --- a/Sources/FireSideModel/Message.swift +++ b/Sources/FireSideModel/Message.swift @@ -1,5 +1,6 @@ import Foundation import Observation +import SkipFuse #if !SKIP import FirebaseCore diff --git a/Sources/FireSideModel/Skip/skip.yml b/Sources/FireSideModel/Skip/skip.yml index b6e8347..4091d36 100644 --- a/Sources/FireSideModel/Skip/skip.yml +++ b/Sources/FireSideModel/Skip/skip.yml @@ -6,3 +6,6 @@ # - block: 'dependencies' # contents: # - 'implementation("androidx.compose.runtime:runtime")' +skip: + mode: 'native' + bridging: true