-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(DataStore): DisableSubscriptions flag for watchOS (#3368)
* fix(DataStore): Store larger than 32-bit values in Int64 over Int * fix: Removing ModelFieldType.int64 * feat(DataStore): DisableSubscriptions flag for watchOS * fix 'default' DataStoreConfiguration to non-watchOS. introduce 'testDefault' for shared testing. force plugin initializer to take in configuration for watchOS * move integration tests under watchOS flag * fix integration tests code * fix integration test code * Add verbose logging when subsriptions enabled, watchOS simulator * add doc comments
- Loading branch information
Showing
63 changed files
with
585 additions
and
125 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.swiftpm/xcode/xcshareddata/xcschemes/AWSCloudWatchLoggingPlugin.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...WSDataStorePlugin/Sync/SubscriptionSync/OperationDisabledSubscriptionEventPublisher.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import Amplify | ||
import AWSPluginsCore | ||
import Combine | ||
|
||
final class OperationDisabledIncomingSubscriptionEventPublisher: IncomingSubscriptionEventPublisher { | ||
|
||
private let subscriptionEventSubject: PassthroughSubject<IncomingSubscriptionEventPublisherEvent, DataStoreError> | ||
|
||
var publisher: AnyPublisher<IncomingSubscriptionEventPublisherEvent, DataStoreError> { | ||
return subscriptionEventSubject.eraseToAnyPublisher() | ||
} | ||
|
||
init() { | ||
self.subscriptionEventSubject = PassthroughSubject<IncomingSubscriptionEventPublisherEvent, DataStoreError>() | ||
|
||
let apiError = APIError.operationError(AppSyncErrorType.operationDisabled.rawValue, "", nil) | ||
let dataStoreError = DataStoreError.api(apiError, nil) | ||
subscriptionEventSubject.send(completion: .failure(dataStoreError)) | ||
|
||
} | ||
|
||
func cancel() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.