You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/swift.mdc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ When writing Swift:
14
14
- When writing a JSON string, favour using Swift raw string literals instead of escaping double quotes.
15
15
- When you need to import the following modules inside the AblyLiveObjects library code (that is, in non-test code), do so in the following way:
16
16
- Ably: use `import Ably`
17
-
- AblyPlugin: use `internal import AblyPlugin`
17
+
- `_AblyPluginSupportPrivate`: use `internal import _AblyPluginSupportPrivate`
18
18
- When writing an array literal that starts with an initializer expression, start the initializer expression on the line after the opening square bracket of the array literal. That is, instead of writing:
Copy file name to clipboardExpand all lines: .cursor/rules/testing.mdc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ When writing tests:
14
14
- When you need to import the following modules in the tests, do so in the following way:
15
15
- Ably: use `import Ably`
16
16
- AblyLiveObjects: use `@testable import AblyLiveObjects`
17
-
- AblyPlugin: use `import AblyPlugin`; _do not_ do `internal import`
17
+
- `_AblyPluginSupportPrivate`: use `import _AblyPluginSupportPrivate`; _do not_ do `internal import`
18
18
- When you need to pass a logger to internal components in the tests, pass `TestLogger()`.
19
19
- When you need to unwrap an optional value in the tests, favour using `#require` instead of `guard let`.
20
20
- When creating `testsOnly_` property declarations, do not write generic comments of the form "Test-only access to the private createOperationIsMerged property"; the meaning of these properties is already well understood.
Copy file name to clipboardExpand all lines: Sources/AblyLiveObjects/Internal/CoreSDK.swift
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
+
internalimport _AblyPluginSupportPrivate
1
2
import Ably
2
-
internalimport AblyPlugin
3
3
4
4
/// The API that the internal components of the SDK (that is, `DefaultLiveObjects` and down) use to interact with our core SDK (i.e. ably-cocoa).
5
5
///
6
-
/// This provides us with a mockable interface to ably-cocoa, and it also allows internal components and their tests not to need to worry about some of the boring details of how we bridge Swift types to AblyPlugin's Objective-C API (i.e. boxing).
6
+
/// This provides us with a mockable interface to ably-cocoa, and it also allows internal components and their tests not to need to worry about some of the boring details of how we bridge Swift types to `_AblyPluginSupportPrivate`'s Objective-C API (i.e. boxing).
7
7
internalprotocolCoreSDK:AnyObject,Sendable{
8
8
/// Implements the internal `#publish` method of RTO15.
Copy file name to clipboardExpand all lines: Sources/AblyLiveObjects/Internal/DefaultInternalPlugin.swift
+25-23Lines changed: 25 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,15 @@
1
-
internalimport AblyPlugin
1
+
internalimport _AblyPluginSupportPrivate
2
+
import Ably
2
3
3
-
// We explicitly import the NSObject class, else it seems to get transitively imported from `internal import AblyPlugin`, leading to the error "Class cannot be declared public because its superclass is internal".
4
+
// We explicitly import the NSObject class, else it seems to get transitively imported from `internal import _AblyPluginSupportPrivate`, leading to the error "Class cannot be declared public because its superclass is internal".
4
5
import ObjectiveC.NSObject
5
6
6
-
/// The default implementation of `AblyPlugin`'s `LiveObjectsInternalPluginProtocol`. Implements the interface that ably-cocoa uses to access the functionality provided by the LiveObjects plugin.
7
+
/// The default implementation of `_AblyPluginSupportPrivate`'s `LiveObjectsInternalPluginProtocol`. Implements the interface that ably-cocoa uses to access the functionality provided by the LiveObjects plugin.
fatalError("To access LiveObjects functionality, you must pass the LiveObjects plugin in the client options when creating the ARTRealtime instance: `clientOptions.plugins = [.liveObjects: AblyLiveObjects.Plugin.self]`")
@@ -33,11 +34,12 @@ internal final class DefaultInternalPlugin: NSObject, AblyPlugin.LiveObjectsInte
/// We need this intermediate type because we want object messages to be structs — because they're nicer to work with internally — but a struct can't conform to the class-bound `AblyPlugin.ObjectMessageProtocol`.
/// We need this intermediate type because we want object messages to be structs — because they're nicer to work with internally — but a struct can't conform to the class-bound `_AblyPluginSupportPrivate.ObjectMessageProtocol`.
0 commit comments