Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(datastore): Migrate to Amplify Swift V2 #4962

Merged
merged 12 commits into from
Jun 4, 2024

Conversation

Equartey
Copy link
Contributor

@Equartey Equartey commented Jun 3, 2024

Description of changes:
Support for Amplify Swift V1 via CocoaPods was depreciated May 31, 2024. This work migrates our implementation to consume the newer Amplify Swift V2 SPM based project. It does this by the following:

  1. Copies the relevant Amplify Swift plugin source files to the Amplify Flutter DataStore iOS plugin project.
  2. Removes Amplify Swift's API plugin in favor of injecting Amplify Flutter's API plugin in its place.

This means we no longer consume Amplify Swift via CocoaPods. Allowing us to consume the most up to date Amplify Swift features and fixes. Also noting remote sync GraphQL requests are now routed back to our Dart based API category via the Flutter method channel. This further reduces the dependency on Amplify Swift Plugins.

Note: At a latter date when the Flutter platform supports SPM we can natively consume the SPM package instead of copying and shipping Amplify Swift source files.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Equartey Equartey marked this pull request as ready for review June 3, 2024 16:32
@Equartey Equartey requested a review from a team as a code owner June 3, 2024 16:32
Comment on lines 101 to 108
// TODO: Migrate to Async Swift v2
// This enables custom selection set behavior within Amplify-Swift v1.
// Which allows models to be decoded when created on Android and received to iOS
extension FlutterModelSchema: SubscriptionSelectionSetBehavior {
public var includePrimaryKeysOnly: Bool {
return true
}
}
// Which allows models to be decoded when created on Android and received to iOS
//extension FlutterModelSchema: SubscriptionSelectionSetBehavior {
// public var includePrimaryKeysOnly: Bool {
// return true
// }
//}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to remove the commented code here or to uncomment it?

tyllark
tyllark previously approved these changes Jun 3, 2024
@Equartey Equartey merged commit 76cf1cc into main Jun 4, 2024
12 checks passed
@Equartey Equartey deleted the feat/datastore-spm-migration branch June 4, 2024 13:29
Equartey added a commit that referenced this pull request Jun 4, 2024
### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))
Equartey added a commit that referenced this pull request Jun 4, 2024
### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Equartey added a commit that referenced this pull request Jun 4, 2024
### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Equartey added a commit that referenced this pull request Jun 4, 2024
### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Equartey added a commit that referenced this pull request Jun 4, 2024
### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Equartey added a commit that referenced this pull request Jun 4, 2024
### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Equartey added a commit that referenced this pull request Jun 7, 2024
chore(version): Bump version

### Features
- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Equartey added a commit that referenced this pull request Jun 10, 2024
chore(version): Bump version

- feat(datastore): Migrate to Amplify Swift V2 ([#4962](#4962))

Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants