diff --git a/.circleci/config.yml b/.circleci/config.yml index 759d3778646..ca9e62316f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,12 @@ commands: command: | flutter pub global activate melos 1.3.0 melos bootstrap + activate_pana: + steps: + - run: + name: Install and set up pana + command: | + flutter pub global activate pana install_tuneup: steps: - run: @@ -63,6 +69,21 @@ jobs: name: Analyze Dart/Flutter Code command: melos run analyze --no-select + pub_analysis: + executor: docker-executor + parameters: + plugin_threshold: + type: string + description: the plugin name and the pub analysis threshold in the format : + steps: + - install_flutter + - checkout + - install_melos + - activate_pana + - run: + name: Run pub analysis and fail if the score is below the max score + command: param=<< parameters.plugin_threshold >> && plugin=${param%:*} && threshold=${param#*:} && melos exec -c 1 --fail-fast --scope="$plugin" -- pana --no-warning --exit-code-threshold $threshold . + unit_test_flutter: executor: docker-executor parameters: @@ -181,6 +202,20 @@ workflows: jobs: - format_flutter - analyze_flutter + - pub_analysis: + matrix: + parameters: + plugin_threshold: [ + # should be in format : + "amplify_analytics_pinpoint:10", + "amplify_api:10", + "amplify_auth_cognito:10", + "amplify_authenticator:0", + "amplify_core:10", + "amplify_datastore:20", + "amplify_flutter:20", + "amplify_storage_s3:10", + ] - unit_test_flutter: matrix: parameters: @@ -189,6 +224,7 @@ workflows: "amplify_analytics_pinpoint", "amplify_api", "amplify_auth_cognito", + "amplify_authenticator", "amplify_core", "amplify_datastore", "amplify_datastore_plugin_interface", diff --git a/.circleci/test_all_plugins.sh b/.circleci/test_all_plugins.sh index 2f4d914ee63..11ec5962068 100755 --- a/.circleci/test_all_plugins.sh +++ b/.circleci/test_all_plugins.sh @@ -7,14 +7,16 @@ test_failure=0 test_suite=$1 plugin=$3 project_root_dir=$2 + dummy_file_path=example/lib/amplifyconfiguration.dart +category_dir=$(echo $plugin | cut -d'_' -f 2) set +e set -o pipefail # Check for federated plugin structure -if [ -d "${plugin}_plugin" ]; then - cd "./${plugin}_plugin/" || exit +if [ -d "${category_dir}" ]; then + cd "./${category_dir}/" || exit else cd "./$plugin" || exit fi diff --git a/.github/ISSUE_TEMPLATE/BUG-REPORT.yaml b/.github/ISSUE_TEMPLATE/BUG-REPORT.yaml new file mode 100644 index 00000000000..998da46c857 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG-REPORT.yaml @@ -0,0 +1,114 @@ +name: Bug Report +description: File a bug report +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: textarea + id: description + attributes: + label: Description + description: Describe the bug + placeholder: | + A clear and concise description of what the bug is. + validations: + required: true + - type: checkboxes + id: categories + attributes: + label: Categories + description: "Select the affected categories, if applicable." + options: + - label: Analytics + required: false + - label: API + required: false + - label: Auth + required: false + - label: DataStore + required: false + - label: Storage + required: false + - type: textarea + id: repro + attributes: + label: Steps to Reproduce + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: false + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: "If applicable, add screenshots to help explain your problem." + placeholder: "No screenshots provided" + validations: + required: false + - type: checkboxes + id: platforms + attributes: + label: Platforms + description: "Please mark the platforms where this issue occurs." + options: + - label: iOS + required: false + - label: Android + required: false + - type: textarea + id: environment + attributes: + label: Environment + description: "Please provide details of your Flutter build environment (`flutter doctor`)." + placeholder: | + Paste the output of running `flutter doctor` here + render: bash + validations: + required: true + - type: textarea + id: dependencies + attributes: + label: Dependencies + description: "Please provide your project's dependency versions (`flutter pub deps --no-dev --style=compact`)." + placeholder: | + Paste the output of running `flutter pub deps --no-dev --style=compact` here + render: bash + validations: + required: true + - type: input + id: device + attributes: + label: Device + description: "Which device(s) did you experience the issue on? (or `N/A` if not applicable)" + placeholder: "iPhone 12, Pixel 5" + validations: + required: true + - type: input + id: os + attributes: + label: OS + description: "Which operating system(s) did you experience the issue on? (or `N/A` if not applicable)" + placeholder: "iOS 15.1, Android 11" + validations: + required: true + - type: input + id: cli-version + attributes: + label: CLI Version + description: "Which version of the Amplify CLI are you running? (`amplify -v`)" + placeholder: "7.6.21" + validations: + required: true + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Please add any other context about the problem here. + placeholder: "No additional context provided" + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 111d4e8ad5b..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Platform** -Amplify Flutter current supports iOS and Android. This issue is reproducible in (check all that apply): -[] Android -[] iOS - -
- - Output of flutter doctor -v - - ```Paste your output of "flutter doctor -v" here``` - -
- -
- - Dependencies (pubspec.lock) - - ``` - Paste the contents of your "pubspec.lock" file here - ``` - -
- -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.gitignore b/.gitignore index 7c41cc0040d..f42db0fbc45 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ Podfile.lock **/test-results/ .test_coverage.dart .last_build_id +.fvm/ # IDEs .idea/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6396f65706d..44c6094dbf7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ Thank you for your interest in contributing to our project! <3 Whether it's a bu - [Our Design](#our-design) - [Development Process](#development-process) - [Setting up for local development](#setting-up-for-local-development) - - [Packages inside Amplify Flutter](#packages-inside-amplify-flutter) + - [Packages inside Amplify Flutter](#packages-inside-amplify-flutter) - [Steps towards contributions](#steps-towards-contributions) - [Pull Requests](#pull-requests) - [Release](#release) @@ -155,6 +155,21 @@ toolkit for interacting with AWS backend resources. 2. [AWS SDK for iOS](https://github.com/aws-amplify/aws-sdk-ios) 3. [AWS SDK for JavaScript](https://github.com/aws/aws-sdk-js) +## Unit Tests + +To run all the flutter unit tests for all plugins: + +```bash +$ melos run test:unit:flutter +``` + +or run all unit tests for a given platform + +```bash +$ melos run test:unit:android +$ melos run test:unit:ios +``` + ## Integration Tests In addition to unit tests which mock Amplify API interaction, this repository has integration tests which @@ -207,83 +222,6 @@ $ melos run provision_integration_test_resources Note: you will need to have [`jq`](https://github.com/stedolan/jq) installed, which you can install by running `brew install jq`. The provisioning script uses the [Amplify CLI headless mode](https://docs.amplify.aws/cli/usage/headless). -The auth tests require some additional configuration to support lambda triggers for automatically -verifying temporary test users. Note that this should only be done for the test environment, never a production one. This can be done manually by [following this process](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html#aws-lambda-triggers-pre-registration-example-2) or by following these instructions for the amplify CLI: - -``` -$ cd packages/amplify_auth_cognito/example -$ amplify update auth - Please note that certain attributes may not be overwritten if you choose to use defaults settings. - Using service: Cognito, provided by: awscloudformation - What do you want to do? - Walk-through all the auth configurations - Select the authentication/authorization services that you want to use: - User Sign-Up, Sign-In, connected with AWS IAM controls ( Enables per-user Storage features for images or other content, Analytics, and more) - Please enter a name for your identity pool. - authintegrationtest - Allow unauthenticated logins? (Provides scoped down permissions that you can control via AWS IAM) - No - Do you want to enable 3rd party authentication providers in your identity pool? - No - Do you want to add User Pool Groups? - No - Do you want to add an admin queries API? - No - Multi-factor authentication (MFA) user login options: - OFF - Email based user registration/forgot password: - Enabled (Requires per-user email entry at registration) - Please specify an email verification subject: - Your verification code - Please specify an email verification message: - Your verification code is {####} - Do you want to override the default password policy for this User Pool? - No - Specify the app's refresh token expiration period (in days): - 30 - Do you want to specify the user attributes this app can read and write? - No - Do you want to enable any of the following capabilities? - Do you want to use an OAuth flow? - No - ? Do you want to configure Lambda Triggers for Cognito? - Yes - ? Which triggers do you want to enable for Cognito - Pre Sign-up - ? What functionality do you want to use for Pre Sign-up - Create your own module - Successfully added resource authintegrationtestPreSignup locally. -``` - -When prompted to edit the function now, choose "yes" and add the following code to the `custom.js` file -created by the amplify CLI, from [documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html#aws-lambda-triggers-pre-registration-example-2). - -```js -exports.handler = async event => { - // Confirm the user - event.response.autoConfirmUser = true; - - // Set the email as verified if it is in the request - if (event.request.userAttributes.hasOwnProperty("email")) { - event.response.autoVerifyEmail = true; - } - - // Set the phone number as verified if it is in the request - if (event.request.userAttributes.hasOwnProperty("phone_number")) { - event.response.autoVerifyPhone = true; - } - - // Return to Amazon Cognito - return event; -}; -``` - -Finally, run a push to update the resources with the new function resource (lambda trigger): - -```bash -$ amplify push -``` - Additionally, the storage category requires some manual configuration as the [headless CLI does not yet support storage](https://github.com/aws-amplify/amplify-cli/issues/7378). Those instructions are notes in the [storage example app](packages/amplify_storage_s3/example/README.md). diff --git a/build-support/lint_android.sh b/build-support/lint_android.sh old mode 100644 new mode 100755 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 50e47bd7282..f21a7b28fbc 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -25,10 +25,10 @@ dependencies: flutter: sdk: flutter file_picker: ^4.0.0 - amplify_flutter: 0.4.0 - amplify_analytics_pinpoint: 0.4.0 - amplify_auth_cognito: 0.4.0 - amplify_storage_s3: 0.4.0 + amplify_flutter: 0.4.1 + amplify_analytics_pinpoint: 0.4.1 + amplify_auth_cognito: 0.4.1 + amplify_storage_s3: 0.4.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.3 diff --git a/melos.yaml b/melos.yaml index 42a6af80da1..ad82a2c0774 100644 --- a/melos.yaml +++ b/melos.yaml @@ -33,16 +33,11 @@ scripts: flutter build apk --verbose test:unit:flutter: - run: | - melos run test:unit:flutter:plugin amplify_analytics_pinpoint && \ - melos run test:unit:flutter:plugin amplify_api $PWD && \ - melos run test:unit:flutter:plugin amplify_auth_cognito $PWD && \ - melos run test:unit:flutter:plugin amplify_core $PWD && \ - melos run test:unit:flutter:plugin amplify_datastore $PWD && \ - melos run test:unit:flutter:plugin amplify_datastore_plugin_interface $PWD && \ - melos run test:unit:flutter:plugin amplify_flutter $PWD && \ - melos run test:unit:flutter:plugin amplify_storage_plugin_interface $PWD && \ - melos run test:unit:flutter:plugin amplify_storage_s3 $PWD && exit 0 + run: melos exec -c 1 "flutter test" + description: > + Runs flutter unit tests in all plugins and example apps. Manually run only, not in CI + select-package: + dir-exists: test test:unit:android: run: | @@ -134,11 +129,11 @@ scripts: # AUTH build:examples:ios:amplify_auth_cognito: > - melos exec -c 1 --scope="amplify_auth_cognito_example" --fail-fast -- \ + melos exec -c 1 --scope="amplify_auth_cognito_ios_example" --fail-fast -- \ flutter build ios --simulator build:examples:android:amplify_auth_cognito: > - melos exec -c 1 --scope="amplify_auth_cognito_example" --fail-fast -- \ + melos exec -c 1 --scope="amplify_auth_cognito_android_example" --fail-fast -- \ flutter build apk --debug --verbose # TODO: LINT COGNITO PLUGIN diff --git a/packages/amplify_analytics_pinpoint/CHANGELOG.md b/packages/amplify_analytics_pinpoint/CHANGELOG.md index b6e82f86a73..dd384ee5f24 100644 --- a/packages/amplify_analytics_pinpoint/CHANGELOG.md +++ b/packages/amplify_analytics_pinpoint/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) - chore: bump Kotlin version to 1.6.10 (#1346) diff --git a/packages/amplify_analytics_pinpoint/example/pubspec.yaml b/packages/amplify_analytics_pinpoint/example/pubspec.yaml index 703cfd62992..20dee9bc191 100644 --- a/packages/amplify_analytics_pinpoint/example/pubspec.yaml +++ b/packages/amplify_analytics_pinpoint/example/pubspec.yaml @@ -6,7 +6,7 @@ description: Demonstrates how to use the amplify_analytics_pinpoint plugin. publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ">=2.12.0 <3.0.0" dependencies: amplify_analytics_pinpoint: @@ -17,7 +17,7 @@ dependencies: # the parent directory to use the current plugin's version. path: ../ amplify_auth_cognito: - path: ../../amplify_auth_cognito + path: ../../auth/amplify_auth_cognito amplify_flutter: path: ../../amplify_flutter diff --git a/packages/amplify_analytics_pinpoint/pubspec.yaml b/packages/amplify_analytics_pinpoint/pubspec.yaml index a012c48d653..df1beeba6de 100644 --- a/packages/amplify_analytics_pinpoint/pubspec.yaml +++ b/packages/amplify_analytics_pinpoint/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_analytics_pinpoint description: The Amplify Flutter Analytics category plugin using the AWS Pinpoint provider. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_analytics_pinpoint environment: @@ -8,8 +8,8 @@ environment: flutter: ">=1.20.0" dependencies: - amplify_analytics_plugin_interface: 0.4.0 - amplify_core: 0.4.0 + amplify_analytics_plugin_interface: 0.4.1 + amplify_core: 0.4.1 flutter: sdk: flutter plugin_platform_interface: ^2.0.0 diff --git a/packages/amplify_analytics_plugin_interface/CHANGELOG.md b/packages/amplify_analytics_plugin_interface/CHANGELOG.md index b7b7cf17a74..12c5e9ab330 100644 --- a/packages/amplify_analytics_plugin_interface/CHANGELOG.md +++ b/packages/amplify_analytics_plugin_interface/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) ## 0.3.2 (2022-01-21) diff --git a/packages/amplify_analytics_plugin_interface/pubspec.yaml b/packages/amplify_analytics_plugin_interface/pubspec.yaml index c2724f30dd4..68596a2ab40 100644 --- a/packages/amplify_analytics_plugin_interface/pubspec.yaml +++ b/packages/amplify_analytics_plugin_interface/pubspec.yaml @@ -1,13 +1,13 @@ name: amplify_analytics_plugin_interface description: The platform interface for the analytics module of Amplify Flutter. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_analytics_plugin_interface environment: sdk: ">=2.12.0 <3.0.0" dependencies: - amplify_core: 0.4.0 + amplify_core: 0.4.1 flutter: sdk: flutter meta: ^1.1.8 diff --git a/packages/amplify_api/CHANGELOG.md b/packages/amplify_api/CHANGELOG.md index 7e50ea0b14a..f24dab03359 100644 --- a/packages/amplify_api/CHANGELOG.md +++ b/packages/amplify_api/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.1 (2022-02-28) + +- chore: clean up some code to limit analysis infos (#1404) + ## 0.4.0 (2022-02-17) - chore: bump Kotlin version to 1.6.10 (#1346) diff --git a/packages/amplify_api/example/integration_test/graphql_tests.dart b/packages/amplify_api/example/integration_test/graphql_tests.dart index 00294ac7e3d..9e1e3105480 100644 --- a/packages/amplify_api/example/integration_test/graphql_tests.dart +++ b/packages/amplify_api/example/integration_test/graphql_tests.dart @@ -44,7 +44,10 @@ void main() { final req = GraphQLRequest( document: graphQLDocument, variables: {'id': id}); final response = await Amplify.API.mutate(request: req).response; - Map data = jsonDecode(response.data!); + if (response.errors.isNotEmpty) { + fail( + 'GraphQL error while deleting a blog: ${response.errors.toString()}'); + } return true; } @@ -171,12 +174,12 @@ void main() { testWidgets('should LIST blogs with Model helper', (WidgetTester tester) async { - String blog_1_name = 'Integration Test Blog 1'; - String blog_2_name = 'Integration Test Blog 2'; - String blog_3_name = 'Integration Test Blog 3'; - Blog blog_1 = await addBlog(blog_1_name); - Blog blog_2 = await addBlog(blog_2_name); - Blog blog_3 = await addBlog(blog_3_name); + String blog1Name = 'Integration Test Blog 1'; + String blog2Name = 'Integration Test Blog 2'; + String blog3Name = 'Integration Test Blog 3'; + Blog blog1 = await addBlog(blog1Name); + Blog blog2 = await addBlog(blog2Name); + Blog blog3 = await addBlog(blog3Name); var req = ModelQueries.list(Blog.classType); var _r = Amplify.API.query(request: req); @@ -184,7 +187,7 @@ void main() { var res = await _r.response; var data = res.data; - final blogs = [blog_1, blog_2, blog_3]; + final blogs = [blog1, blog2, blog3]; expect(data?.items, containsAll(blogs)); }); @@ -241,6 +244,23 @@ void main() { expect(postFromResponse?.blog?.id, createdPost.blog?.id); }); + testWidgets('should LIST posts by parent ID', + (WidgetTester tester) async { + final title = 'Lorem Ipsum Test Post: ${UUID.getUUID()}'; + const rating = 0; + final createdPost = await addPostAndBlogWithModelHelper(title, rating); + final blogId = createdPost.blog?.id; + + final req = + ModelQueries.list(Post.classType, where: Post.BLOG.eq(blogId)); + final res = await Amplify.API.query(request: req).response; + final postFromResponse = res.data?.items[0]; + + expect(postFromResponse?.blog?.id, isNotNull); + expect(postFromResponse?.blog?.id, createdPost.blog?.id); + expect(postFromResponse?.title, title); + }); + testWidgets( 'should parse a deeply nested response if modelType and decodePath included in request', (WidgetTester tester) async { diff --git a/packages/amplify_api/example/pubspec.yaml b/packages/amplify_api/example/pubspec.yaml index a170a5103c3..f9f734c5b49 100644 --- a/packages/amplify_api/example/pubspec.yaml +++ b/packages/amplify_api/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # the parent directory to use the current plugin's version. path: ../ amplify_auth_cognito: - path: ../../amplify_auth_cognito + path: ../../auth/amplify_auth_cognito amplify_flutter: path: ../../amplify_flutter diff --git a/packages/amplify_api/lib/src/graphql/graphql_request_factory.dart b/packages/amplify_api/lib/src/graphql/graphql_request_factory.dart index 47f70057c2b..2cc6897dc51 100644 --- a/packages/amplify_api/lib/src/graphql/graphql_request_factory.dart +++ b/packages/amplify_api/lib/src/graphql/graphql_request_factory.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +// ignore_for_file: public_member_api_docs + import 'package:amplify_api/amplify_api.dart'; import 'package:amplify_core/amplify_core.dart'; import 'package:flutter/foundation.dart'; @@ -45,28 +47,6 @@ class GraphQLRequestFactory { : schema.name; } - String _getModelType(ModelFieldTypeEnum val) { - switch (val) { - case ModelFieldTypeEnum.string: - return "String"; - case ModelFieldTypeEnum.model: - return "ID"; - case ModelFieldTypeEnum.int: - return "Int"; - case ModelFieldTypeEnum.double: - return "Float"; - case ModelFieldTypeEnum.dateTime: - return "AWSDateTime"; - case ModelFieldTypeEnum.time: - return "AWSTime"; - case ModelFieldTypeEnum.timestamp: - return "AWSTimestamp"; - // TODO: Expand type support: enumeration, collection - default: - return "Error: unsupported type!"; - } - } - String _getSelectionSetFromModelSchema( ModelSchema schema, GraphQLRequestOperation operation, {bool ignoreParents = false}) { @@ -110,26 +90,26 @@ class GraphQLRequestFactory { String _capitalize(String s) => s[0].toUpperCase() + s.substring(1); + String _lowerCaseFirstCharacter(String s) => + s[0].toLowerCase() + s.substring(1); + DocumentInputs _buildDocumentInputs( ModelSchema schema, GraphQLRequestOperation operation) { String upperOutput = ''; String lowerOutput = ''; - List upperList = []; - List lowerList = []; - String modelName = schema.name; // build inputs based on request operation switch (operation) { case GraphQLRequestOperation.get: - upperOutput = r"($id: ID!)"; - lowerOutput = r"(id: $id)"; + upperOutput = r'($id: ID!)'; + lowerOutput = r'(id: $id)'; break; case GraphQLRequestOperation.list: upperOutput = - "(\$filter: Model${modelName}FilterInput, \$limit: Int, \$nextToken: String)"; + '(\$filter: Model${modelName}FilterInput, \$limit: Int, \$nextToken: String)'; lowerOutput = - r"(filter: $filter, limit: $limit, nextToken: $nextToken)"; + r'(filter: $filter, limit: $limit, nextToken: $nextToken)'; break; case GraphQLRequestOperation.create: case GraphQLRequestOperation.update: @@ -137,8 +117,8 @@ class GraphQLRequestFactory { String operationValue = _capitalize(describeEnum(operation)); upperOutput = - "(\$input: ${operationValue}${modelName}Input!, \$condition: Model${modelName}ConditionInput)"; - lowerOutput = r"(input: $input, condition: $condition)"; + '(\$input: $operationValue${modelName}Input!, \$condition: Model${modelName}ConditionInput)'; + lowerOutput = r'(input: $input, condition: $condition)'; break; case GraphQLRequestOperation.onCreate: case GraphQLRequestOperation.onUpdate: @@ -153,10 +133,8 @@ class GraphQLRequestFactory { return DocumentInputs(upperOutput, lowerOutput); } -/** - * Example: - * query getBlog($id: ID!, $content: String) { getBlog(id: $id, content: $content) { id name createdAt } } - */ + /// Example: + /// query getBlog($id: ID!, $content: String) { getBlog(id: $id, content: $content) { id name createdAt } } GraphQLRequest buildRequest( {required ModelType modelType, Model? model, @@ -180,7 +158,7 @@ class GraphQLRequestFactory { // e.g. "id name createdAt" - fields to retrieve String fields = _getSelectionSetFromModelSchema(schema, requestOperation); // e.g. "getBlog" - String requestName = "$requestOperationVal$name"; + String requestName = '$requestOperationVal$name'; // e.g. query getBlog($id: ID!, $content: String) { getBlog(id: $id, content: $content) { id name createdAt } } String document = '''$requestTypeVal $requestName${documentInputs.upper} { $requestName${documentInputs.lower} { $fields } }'''; @@ -225,9 +203,17 @@ class GraphQLRequestFactory { // e.g. { 'name': { 'eq': 'foo }} if (queryPredicate is QueryPredicateOperation) { - // check for the IDs where fieldName set to e.g. "blog.id" and convert to "id" - final isId = queryPredicate.field == '${schema.name.toLowerCase()}.id'; - final fieldName = isId ? idFieldName : queryPredicate.field; + final associatedTargetName = + schema.fields?[queryPredicate.field]?.association?.targetName; + String fieldName = queryPredicate.field; + if (queryPredicate.field == + '${_lowerCaseFirstCharacter(schema.name)}.$idFieldName') { + // check for the IDs where fieldName set to e.g. "blog.id" and convert to "id" + fieldName = idFieldName; + } else if (associatedTargetName != null) { + // when querying for the ID of another model, use the targetName from the schema + fieldName = associatedTargetName; + } return { fieldName: _queryFieldOperatorToPartialGraphQLFilter( @@ -250,7 +236,7 @@ class GraphQLRequestFactory { }; } // Public not() API only allows 1 condition but QueryPredicateGroup - // technically allows multiple conditions so explictly disallow multiple. + // technically allows multiple conditions so explicitly disallow multiple. throw ApiException( 'Unable to translate not() with multiple conditions.'); } diff --git a/packages/amplify_api/lib/src/graphql/graphql_response_decoder.dart b/packages/amplify_api/lib/src/graphql/graphql_response_decoder.dart index d04a2038ac0..18de6676356 100644 --- a/packages/amplify_api/lib/src/graphql/graphql_response_decoder.dart +++ b/packages/amplify_api/lib/src/graphql/graphql_response_decoder.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +// ignore_for_file: public_member_api_docs + import 'dart:convert'; import 'package:amplify_api/amplify_api.dart'; diff --git a/packages/amplify_api/lib/src/graphql/graphql_subscription_transformer.dart b/packages/amplify_api/lib/src/graphql/graphql_subscription_transformer.dart index cb8b3630406..dcf9f897647 100644 --- a/packages/amplify_api/lib/src/graphql/graphql_subscription_transformer.dart +++ b/packages/amplify_api/lib/src/graphql/graphql_subscription_transformer.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +// ignore_for_file: public_member_api_docs + import 'dart:async'; import 'package:amplify_api/amplify_api.dart'; diff --git a/packages/amplify_api/lib/src/graphql/model_mutations_factory.dart b/packages/amplify_api/lib/src/graphql/model_mutations_factory.dart index c2e7683bbee..c3dbe02f47e 100644 --- a/packages/amplify_api/lib/src/graphql/model_mutations_factory.dart +++ b/packages/amplify_api/lib/src/graphql/model_mutations_factory.dart @@ -2,6 +2,8 @@ import 'package:amplify_api/amplify_api.dart'; import 'package:amplify_api/src/graphql/graphql_request_factory.dart'; import 'package:amplify_core/amplify_core.dart'; +// ignore_for_file: public_member_api_docs + class ModelMutationsFactory extends ModelMutationsInterface { // Singleton methods/properties // usage: ModelQueriesFactory.instance; diff --git a/packages/amplify_api/lib/src/graphql/model_queries_factory.dart b/packages/amplify_api/lib/src/graphql/model_queries_factory.dart index 510075f5be2..aeb7138dfd6 100644 --- a/packages/amplify_api/lib/src/graphql/model_queries_factory.dart +++ b/packages/amplify_api/lib/src/graphql/model_queries_factory.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +// ignore_for_file: public_member_api_docs + import 'package:amplify_api/amplify_api.dart'; import 'package:amplify_api/src/graphql/graphql_request_factory.dart'; import 'package:amplify_api/src/graphql/paginated_model_type_impl.dart'; diff --git a/packages/amplify_api/lib/src/graphql/model_subscriptions_factory.dart b/packages/amplify_api/lib/src/graphql/model_subscriptions_factory.dart index 10f22ef5c46..b7c4b048bd1 100644 --- a/packages/amplify_api/lib/src/graphql/model_subscriptions_factory.dart +++ b/packages/amplify_api/lib/src/graphql/model_subscriptions_factory.dart @@ -17,6 +17,8 @@ import 'package:amplify_api/amplify_api.dart'; import 'package:amplify_api/src/graphql/graphql_request_factory.dart'; import 'package:amplify_core/amplify_core.dart'; +// ignore_for_file: public_member_api_docs + class ModelSubscriptionsFactory extends ModelSubscriptionsInterface { // Singleton methods/properties // usage: ModelSubscriptionsFactory.instance; diff --git a/packages/amplify_api/pubspec.yaml b/packages/amplify_api/pubspec.yaml index 8d62a46e972..c7abf77a507 100644 --- a/packages/amplify_api/pubspec.yaml +++ b/packages/amplify_api/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_api description: The Amplify Flutter API category plugin, supporting GraphQL and REST operations. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_api environment: @@ -8,8 +8,8 @@ environment: flutter: ">=1.20.0" dependencies: - amplify_api_plugin_interface: 0.4.0 - amplify_core: 0.4.0 + amplify_api_plugin_interface: 0.4.1 + amplify_core: 0.4.1 collection: ^1.15.0 flutter: sdk: flutter diff --git a/packages/amplify_api/test/amplify_api_mutate_test.dart b/packages/amplify_api/test/amplify_api_mutate_test.dart index 090e6cf5e29..a5d714da5f4 100644 --- a/packages/amplify_api/test/amplify_api_mutate_test.dart +++ b/packages/amplify_api/test/amplify_api_mutate_test.dart @@ -14,7 +14,6 @@ */ import 'package:amplify_api/amplify_api.dart'; -import 'package:amplify_api_plugin_interface/amplify_api_plugin_interface.dart'; import 'package:amplify_core/amplify_core.dart'; import 'package:amplify_test/test_models/ModelProvider.dart'; import 'package:flutter/services.dart'; @@ -92,8 +91,7 @@ void main() { Blog blog = Blog(id: id, name: name, createdAt: dateTime); - var operation = - await api.mutate(request: ModelMutations.create(blog)); + var operation = api.mutate(request: ModelMutations.create(blog)); var response = await operation.response; expect(response.data?.equals(blog), isTrue); @@ -121,8 +119,7 @@ void main() { Blog blog = Blog(id: id, name: name, createdAt: dateTime); - var operation = - await api.mutate(request: ModelMutations.delete(blog)); + var operation = api.mutate(request: ModelMutations.delete(blog)); var response = await operation.response; expect(response.data, equals(blog)); @@ -150,8 +147,7 @@ void main() { Blog blog = Blog(id: id, name: name, createdAt: dateTime); - var operation = - await api.mutate(request: ModelMutations.update(blog)); + var operation = api.mutate(request: ModelMutations.update(blog)); var response = await operation.response; expect(response.data, equals(blog)); diff --git a/packages/amplify_api/test/amplify_api_query_test.dart b/packages/amplify_api/test/amplify_api_query_test.dart index ff4c1d61b96..deaf098d805 100644 --- a/packages/amplify_api/test/amplify_api_query_test.dart +++ b/packages/amplify_api/test/amplify_api_query_test.dart @@ -14,7 +14,6 @@ */ import 'package:amplify_api/amplify_api.dart'; -import 'package:amplify_api_plugin_interface/amplify_api_plugin_interface.dart'; import 'package:amplify_core/amplify_core.dart'; import 'package:amplify_test/test_models/ModelProvider.dart'; import 'package:flutter/services.dart'; @@ -111,7 +110,7 @@ void main() { GraphQLRequest req = ModelQueries.get(Blog.classType, id); - var operation = await api.query(request: req); + var operation = api.query(request: req); var response = await operation.response; @@ -159,7 +158,7 @@ void main() { GraphQLRequest> req = ModelQueries.list(Blog.classType, limit: 4); - var operation = await api.query>(request: req); + var operation = api.query>(request: req); var response = await operation.response; diff --git a/packages/amplify_api/test/amplify_api_subscribe_test.dart b/packages/amplify_api/test/amplify_api_subscribe_test.dart index 93b1981776e..9058aef419e 100644 --- a/packages/amplify_api/test/amplify_api_subscribe_test.dart +++ b/packages/amplify_api/test/amplify_api_subscribe_test.dart @@ -16,7 +16,6 @@ import 'dart:async'; import 'package:amplify_api/amplify_api.dart'; -import 'package:amplify_api_plugin_interface/amplify_api_plugin_interface.dart'; import 'package:amplify_test/test_models/ModelProvider.dart'; import 'package:async/async.dart'; import 'package:flutter/services.dart'; diff --git a/packages/amplify_api/test/graphql_helpers_test.dart b/packages/amplify_api/test/graphql_helpers_test.dart index 40e5fd98438..9d78d58d0b0 100644 --- a/packages/amplify_api/test/graphql_helpers_test.dart +++ b/packages/amplify_api/test/graphql_helpers_test.dart @@ -23,7 +23,7 @@ import 'package:flutter_test/flutter_test.dart'; void main() { group('with ModelProvider', () { - final AmplifyAPI api = AmplifyAPI(modelProvider: ModelProvider.instance); + AmplifyAPI(modelProvider: ModelProvider.instance); const blogSelectionSet = 'id name createdAt file { bucket region key meta { name } } files { bucket region key meta { name } } updatedAt'; @@ -787,9 +787,9 @@ void main() { group('without ModelProvider', () { test('should handle no ModelProvider instance', () { - AmplifyAPI api = AmplifyAPI(); + AmplifyAPI(); try { - GraphQLRequest req = ModelQueries.get(Blog.classType, ''); + ModelQueries.get(Blog.classType, ''); } on ApiException catch (e) { expect(e.message, 'No modelProvider found'); expect(e.recoverySuggestion, diff --git a/packages/amplify_api/test/query_predicate_graphql_filter_test.dart b/packages/amplify_api/test/query_predicate_graphql_filter_test.dart index faeb1fc579e..ae708f1c840 100644 --- a/packages/amplify_api/test/query_predicate_graphql_filter_test.dart +++ b/packages/amplify_api/test/query_predicate_graphql_filter_test.dart @@ -11,9 +11,10 @@ void main() { // helper method for all the tests void _testQueryPredicateTranslation( - QueryPredicate? queryPredicate, Map? expectedFilter) { + QueryPredicate? queryPredicate, Map? expectedFilter, + {ModelType modelType = Blog.classType}) { final resultFilter = GraphQLRequestFactory.instance - .queryPredicateToGraphQLFilter(queryPredicate, Blog.classType); + .queryPredicateToGraphQLFilter(queryPredicate, modelType); expect(resultFilter, expectedFilter); } @@ -197,5 +198,16 @@ void main() { _testQueryPredicateTranslation(queryPredicate, expectedFilter); }); + + test('query child by parent ID', () { + const blogId = 'blog-123'; + final queryPredicate = Post.BLOG.eq(blogId); + final expectedFilter = { + 'blogID': {'eq': blogId} + }; + + _testQueryPredicateTranslation(queryPredicate, expectedFilter, + modelType: Post.classType); + }); }); } diff --git a/packages/amplify_api_plugin_interface/CHANGELOG.md b/packages/amplify_api_plugin_interface/CHANGELOG.md index a557ae9d84c..8ca6bbb1c7d 100644 --- a/packages/amplify_api_plugin_interface/CHANGELOG.md +++ b/packages/amplify_api_plugin_interface/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) ## 0.3.2 (2022-01-21) diff --git a/packages/amplify_api_plugin_interface/pubspec.yaml b/packages/amplify_api_plugin_interface/pubspec.yaml index b9203deb0d3..7d1f9061752 100644 --- a/packages/amplify_api_plugin_interface/pubspec.yaml +++ b/packages/amplify_api_plugin_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_api_plugin_interface description: The platform interface for the API module of Amplify Flutter. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_api_plugin_interface environment: @@ -8,7 +8,7 @@ environment: flutter: ">=1.17.0" dependencies: - amplify_core: 0.4.0 + amplify_core: 0.4.1 collection: ^1.15.0 flutter: sdk: flutter diff --git a/packages/amplify_auth_cognito/android/.settings/org.eclipse.buildship.core.prefs b/packages/amplify_auth_cognito/android/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 4c335467416..00000000000 --- a/packages/amplify_auth_cognito/android/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,13 +0,0 @@ -arguments= -auto.sync=false -build.scans.enabled=false -connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3)) -connection.project.dir= -eclipse.preferences.version=1 -gradle.user.home= -java.home=/Users/dnnoyes/.sdkman/candidates/java/current -jvm.arguments= -offline.mode=false -override.workspace.settings=true -show.console.view=true -show.executions.view=true diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/Info.plist b/packages/amplify_auth_cognito/example/ios/unit_tests/Info.plist deleted file mode 100644 index 64d65ca4957..00000000000 --- a/packages/amplify_auth_cognito/example/ios/unit_tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/packages/amplify_auth_cognito/example/test_driver/integration_test.dart b/packages/amplify_auth_cognito/example/test_driver/integration_test.dart deleted file mode 100644 index dce7b9cc2a9..00000000000 --- a/packages/amplify_auth_cognito/example/test_driver/integration_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -import 'package:integration_test/integration_test_driver.dart'; - -Future main() => integrationDriver(); diff --git a/packages/amplify_auth_cognito/example/tool/provision_integration_test_resources.sh b/packages/amplify_auth_cognito/example/tool/provision_integration_test_resources.sh deleted file mode 100755 index b8cae5365fb..00000000000 --- a/packages/amplify_auth_cognito/example/tool/provision_integration_test_resources.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -e -IFS='|' - -FLUTTERCONFIG="{\ -\"ResDir\":\"./lib/\",\ -}" - -AMPLIFY="{\ -\"projectName\":\"amplifyauthinteg\",\ -\"envName\":\"test\",\ -\"defaultEditor\":\"code\"\ -}" - -FRONTEND="{\ -\"frontend\":\"flutter\",\ -\"config\":$FLUTTERCONFIG\ -}" - -amplify init \ ---amplify $AMPLIFY \ ---frontend $FRONTEND \ ---yes -cat tool/add_auth_request.json | jq -c | amplify add auth --headless -amplify push --yes diff --git a/packages/amplify_authenticator/CHANGELOG.md b/packages/amplify_authenticator/CHANGELOG.md index b8d71cf49d3..e177eddb252 100644 --- a/packages/amplify_authenticator/CHANGELOG.md +++ b/packages/amplify_authenticator/CHANGELOG.md @@ -1,41 +1,3 @@ -## 0.1.0-rc.6 (2022-02-17) +## 0.1.0 (2022-02-24) -- chore: update amplify_flutter dep to >=0.3.0 <0.5.0 (#1361) -- chore: remove support for amplify theme (#1367) - -## 0.1.0-rc.5 (2022-02-04) - -- fix: updates for latest flutter and dart versions (#1333) - -## 0.1.0-rc.4 (2022-01-27) - -### Features - -- Ability to create a custom UI (#1281) -- Ability to protect only a subset of routes (#1281) - -### Fixes - -- Fix bug preventing country code from updating (#1312) - -### Chores - -- Update dependency on amplify_flutter to ^0.3.0 - -## 0.1.0-rc.3 (2022-01-12) - -### Fixes - -- Update dependency on amplify_flutter to ^0.3.0-rc.4 - -## 0.1.0-rc.2 (2022-01-06) - -- Improved support for navigation (#1241) - -## 0.1.0-rc.1 (2021-12-08) - -- Updated README - -## 0.1.0-rc.0 (2021-12-08) - -Initial preview release! Check out the [Getting Started](https://docs.amplify.aws/lib/auth/getting-started/q/platform/flutter/) guide and the [example](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_authenticator/example) project to learn more. +- Initial stable release of the amplify_authenticator package. See https://ui.docs.amplify.aws/components/authenticator?platform=flutter to get started. diff --git a/packages/amplify_authenticator/README.md b/packages/amplify_authenticator/README.md index dd1a817c31b..e39f692b0c2 100644 --- a/packages/amplify_authenticator/README.md +++ b/packages/amplify_authenticator/README.md @@ -12,9 +12,9 @@ To get started, add the Authenticator to a project which has the [Auth category] ```yaml dependencies: - amplify_auth_cognito: ^0.4.0 + amplify_auth_cognito: ^0.4.1 amplify_authenticator: ^0.1.0 - amplify_flutter: ^0.4.0 + amplify_flutter: ^0.4.1 ``` Then, wrap your app's logged in component with an `Authenticator` widget, and you're good to go. You can use the `SignOutButton` to sign out the user from anywhere in your app. diff --git a/packages/amplify_authenticator/dartdoc_options.yaml b/packages/amplify_authenticator/dartdoc_options.yaml index 9722b34c039..0b6cdc0e3c1 100644 --- a/packages/amplify_authenticator/dartdoc_options.yaml +++ b/packages/amplify_authenticator/dartdoc_options.yaml @@ -1,5 +1,5 @@ dartdoc: categories: "Prebuilt Widgets": - markdown: docs/prebuilt-widgets.md + markdown: doc/prebuilt-widgets.md name: Prebuilt Widgets diff --git a/packages/amplify_authenticator/docs/prebuilt-widgets.md b/packages/amplify_authenticator/doc/prebuilt-widgets.md similarity index 100% rename from packages/amplify_authenticator/docs/prebuilt-widgets.md rename to packages/amplify_authenticator/doc/prebuilt-widgets.md diff --git a/packages/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart b/packages/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart index ce0b2691803..3359d9cc7e2 100644 --- a/packages/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart +++ b/packages/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart @@ -80,21 +80,24 @@ class SignInView extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( - child: Padding( - padding: const EdgeInsets.all(16), - child: Column( - children: [ - // app logo (flutter logo used for example) - const Center(child: FlutterLogo(size: 100)), + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + children: [ + // app logo (flutter logo used for example) + const Center(child: FlutterLogo(size: 100)), - // prebuilt sign in form from amplify_authenticator package - SignInForm(), + // prebuilt sign in form from amplify_authenticator package + SignInForm(), - const Spacer(), + const SizedBox(height: 16), + const Divider(), - // custom button to take the user to sign up - NavigateToSignUpButton(state: state), - ], + // custom button to take the user to sign up + NavigateToSignUpButton(state: state), + ], + ), ), ), ); @@ -112,43 +115,48 @@ class SignUpView extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( - child: Padding( - padding: const EdgeInsets.all(16), + child: SingleChildScrollView( child: AuthenticatorForm( - child: Column( - children: [ - // app logo (flutter logo used for example) - const Center(child: FlutterLogo(size: 100)), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + children: [ + // app logo (flutter logo used for example) + const Center(child: FlutterLogo(size: 100)), - // prebuilt fields for username, email, and password from - // amplify_authenticator package - SignUpFormField.username(), - SignUpFormField.email(required: true), - SignUpFormField.password(), - SignUpFormField.passwordConfirmation(), + // prebuilt fields for username, email, and password from + // amplify_authenticator package + SignUpFormField.username(), + SignUpFormField.email(required: true), + SignUpFormField.password(), + SignUpFormField.passwordConfirmation(), - // custom field for a terms and conditions checkbox - // - // this will set a custom user attribute named `custom:terms-and-conditions` - // to "true" if the checkbox has been checked - // - // custom form validation will prevent sign up if the checkbox is not - // checked, and a custom error message will be displayed. - TermsAndConditionsCheckBox( - onChanged: (value) => state.setCustomAttribute( - const CognitoUserAttributeKey.custom('terms-and-conditions'), - value.toString(), + // custom field for a terms and conditions checkbox + // + // this will set a custom user attribute named `custom:terms-and-conditions` + // to "true" if the checkbox has been checked + // + // custom form validation will prevent sign up if the checkbox is not + // checked, and a custom error message will be displayed. + TermsAndConditionsCheckBox( + onChanged: (value) => state.setCustomAttribute( + const CognitoUserAttributeKey.custom( + 'terms-and-conditions', + ), + value.toString(), + ), ), - ), - // prebuilt sign up button from amplify_authenticator package - const SignUpButton(), + // prebuilt sign up button from amplify_authenticator package + const SignUpButton(), - const Spacer(), + const SizedBox(height: 16), + const Divider(), - // custom button to take the user to sign in - NavigateToSignInButton(state: state), - ], + // custom button to take the user to sign in + NavigateToSignInButton(state: state), + ], + ), ), ), ), diff --git a/packages/amplify_authenticator/example/lib/main.dart b/packages/amplify_authenticator/example/lib/main.dart index c0c16f62917..ea8d27bd03c 100644 --- a/packages/amplify_authenticator/example/lib/main.dart +++ b/packages/amplify_authenticator/example/lib/main.dart @@ -95,11 +95,18 @@ class _MyAppState extends State { SignUpFormField.username( validator: _validateUsername, ), + SignUpFormField.email(required: true), SignUpFormField.password(), SignUpFormField.passwordConfirmation(), - SignUpFormField.address( - required: false, + SignUpFormField.address(), + SignUpFormField.custom( + title: 'Bio', + attributeKey: const CognitoUserAttributeKey.custom('bio'), ), + SignUpFormField.custom( + title: 'Age', + attributeKey: const CognitoUserAttributeKey.custom('age'), + ) ], ), diff --git a/packages/amplify_authenticator/example/test_driver/integration_test.dart b/packages/amplify_authenticator/example/test_driver/integration_test.dart deleted file mode 100644 index 7db05c05b45..00000000000 --- a/packages/amplify_authenticator/example/test_driver/integration_test.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:integration_test/integration_test_driver.dart'; - -void main() => integrationDriver(); diff --git a/packages/amplify_authenticator/lib/src/mixins/authenticator_username_field.dart b/packages/amplify_authenticator/lib/src/mixins/authenticator_username_field.dart index f1b6d56be99..663b9e6e0bd 100644 --- a/packages/amplify_authenticator/lib/src/mixins/authenticator_username_field.dart +++ b/packages/amplify_authenticator/lib/src/mixins/authenticator_username_field.dart @@ -18,6 +18,7 @@ import 'package:amplify_authenticator/src/l10n/auth_strings_resolver.dart'; import 'package:amplify_authenticator/src/models/username_input.dart'; import 'package:amplify_authenticator/src/utils/validators.dart'; import 'package:amplify_authenticator/src/widgets/component.dart'; +import 'package:amplify_authenticator/src/widgets/form.dart'; import 'package:amplify_authenticator/src/widgets/form_field.dart'; import 'package:flutter/material.dart'; @@ -271,7 +272,7 @@ mixin AuthenticatorUsernameField> +mixin UsernameAttributes on AuthenticatorComponentState { late final Set usernameAttributes = () { final authConfig = config.amplifyConfig?.auth?.awsPlugin?.auth?.default$; diff --git a/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart b/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart index ad4a58eb088..6ee69370a8b 100644 --- a/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart +++ b/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart @@ -18,7 +18,6 @@ import 'dart:async'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:collection/collection.dart'; -import 'package:collection/src/iterable_extensions.dart'; abstract class AuthService { Future signIn(String username, String password); diff --git a/packages/amplify_authenticator/lib/src/widgets/authenticator_banner.dart b/packages/amplify_authenticator/lib/src/widgets/authenticator_banner.dart index 98a9ba0ae25..da18cf33ae4 100644 --- a/packages/amplify_authenticator/lib/src/widgets/authenticator_banner.dart +++ b/packages/amplify_authenticator/lib/src/widgets/authenticator_banner.dart @@ -45,8 +45,12 @@ SnackBar createSnackBar( required Widget content, }) { final theme = Theme.of(context); - final foregroundColor = theme.snackBarTheme.contentTextStyle?.color ?? - theme.colorScheme.onInverseSurface; + + // if contentTextStyle is null, colorScheme.surface is used as a fallback + // since SnackBarThemeData.backgroundColor uses colorScheme.onSurface as a fall back + final foregroundColor = + theme.snackBarTheme.contentTextStyle?.color ?? theme.colorScheme.surface; + return SnackBar( key: keyAuthenticatorBanner, content: Row( diff --git a/packages/amplify_authenticator/lib/src/widgets/button.dart b/packages/amplify_authenticator/lib/src/widgets/button.dart index b28e7788ded..cc4bbeb6ca5 100644 --- a/packages/amplify_authenticator/lib/src/widgets/button.dart +++ b/packages/amplify_authenticator/lib/src/widgets/button.dart @@ -232,19 +232,25 @@ class ConfirmSignInMFAButton extends AuthenticatorElevatedButton { /// /// Uses [ButtonResolverKey.signout] for localization /// {@endtemplate} -class SignOutButton extends AuthenticatorElevatedButton { +class SignOutButton extends StatelessAuthenticatorComponent { /// {@macro amplify_authenticator.sign_out_button} - const SignOutButton({Key? key}) - : super( - key: key ?? keyConfirmSignInButton, - ); + const SignOutButton({Key? key = keySignOutButton}) : super(key: key); @override - ButtonResolverKey get labelKey => ButtonResolverKey.signout; + Widget builder( + BuildContext context, + AuthenticatorState state, + AuthStringResolver stringResolver, + ) { + final ButtonResolver buttonResolver = stringResolver.buttons; - @override - void onPressed(BuildContext context, AuthenticatorState state) => - state.signOut(); + return ElevatedButton( + onPressed: state.signOut, + child: Text( + buttonResolver.signout(context), + ), + ); + } } /// {@category Prebuilt Widgets} diff --git a/packages/amplify_authenticator/lib/src/widgets/component.dart b/packages/amplify_authenticator/lib/src/widgets/component.dart index c5c9b784140..89aee0115a0 100644 --- a/packages/amplify_authenticator/lib/src/widgets/component.dart +++ b/packages/amplify_authenticator/lib/src/widgets/component.dart @@ -50,7 +50,7 @@ abstract class StatelessAuthenticatorComponent extends StatelessWidget { /// {@template amplify_authenticator.authenticator_component} /// Base class for all stateful Authenticator components. /// {@endtemplate} -abstract class AuthenticatorComponent> +abstract class AuthenticatorComponent extends StatefulWidget { /// {@macro amplify_authenticator.authenticator_component} const AuthenticatorComponent({Key? key}) : super(key: key); @@ -63,9 +63,9 @@ abstract class AuthenticatorComponent> /// /// Subclasses of [AuthenticatorComponent] must have a [State] object which /// subclasses this class. -abstract class AuthenticatorComponentState> +abstract class AuthenticatorComponentState extends State { - /// The root Autheticator view model. + /// The root Authenticator state. late AuthenticatorState state; /// The root Authenticator string resolver. diff --git a/packages/amplify_authenticator/lib/src/widgets/form.dart b/packages/amplify_authenticator/lib/src/widgets/form.dart index be85fb2f661..864eeb74fb2 100644 --- a/packages/amplify_authenticator/lib/src/widgets/form.dart +++ b/packages/amplify_authenticator/lib/src/widgets/form.dart @@ -15,8 +15,6 @@ library authenticator.form; -import 'dart:collection'; - import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_authenticator/amplify_authenticator.dart'; import 'package:amplify_authenticator/src/mixins/authenticator_username_field.dart'; @@ -29,7 +27,6 @@ import 'package:amplify_authenticator/src/widgets/social/social_button.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; /// Base class for Authenticator forms and ancestor of all Authenticator /// form fields. @@ -75,27 +72,21 @@ class AuthenticatorForm extends AuthenticatorComponent { const AuthenticatorForm({ Key? key, required this.child, - }) : requiredFields = const [], - customFields = const [], + }) : fields = const [], actions = const [], includeDefaultSocialProviders = false, super(key: key); const AuthenticatorForm._({ Key? key, - required this.requiredFields, - required this.customFields, + required this.fields, required this.actions, this.includeDefaultSocialProviders = true, }) : child = null, super(key: key); - /// The form fields required by the form. - final List requiredFields; - - /// The user's custom fields, merged with [requiredFields] and - /// [AuthenticatorFormState]'s `runtimeFields`. - final List customFields; + /// The form fields which are independent of the Auth plugin configuration. + final List fields; /// Buttons and checkboxes to show below the fields. final List actions; @@ -118,8 +109,7 @@ class AuthenticatorForm extends AuthenticatorComponent { } class AuthenticatorFormState - extends AuthenticatorComponentState - with UsernameAttributes { + extends AuthenticatorComponentState with UsernameAttributes { AuthenticatorFormState(); static AuthenticatorFormState of(BuildContext context) { @@ -168,7 +158,7 @@ class AuthenticatorFormState setState(() {}); } - /// Controls optional visibilty of the field. + /// Controls optional visibility of the field. Widget get obscureTextToggle { return ValueListenableBuilder( valueListenable: obscureTextToggleValue, @@ -185,32 +175,12 @@ class AuthenticatorFormState ); } + /// All the fields to display on the form. Implementations of [AuthenticatorFormState] + /// can override this. + /// + /// Defaults to [AuthenticatorForm.fields]. List get allFields { - final fields = LinkedHashSet( - equals: (a, b) { - return a.runtimeType == b.runtimeType && a.field == b.field; - }, - hashCode: (field) => hashValues(field.runtimeType, field.field), - ); - - // Add custom fields first, since they will contain the user's fields and - // should take precedence over the default fields. - fields.addAll(widget.customFields.where( - (el) => el.usernameType != selectedUsernameType, - )); - - // Add remaining fields based in order of their display priority. Duplicate - // fields will not be added again, and this ensures that custom fields - // remain the highest display priority. - fields.addAll([ - ...widget.requiredFields, - ...runtimeFields(context), - ]..sort((a, b) { - // Sort larger priorities first. - return -a.displayPriority.compareTo(b.displayPriority); - })); - - return fields.toList(growable: false); + return widget.fields; } @override @@ -262,28 +232,36 @@ class SignUpForm extends AuthenticatorForm { /// {@macro amplify_authenticator.sign_up_form} SignUpForm({ Key? key, - }) : this.custom( - fields: [], + }) : _includeDefaultFields = true, + super._( key: key, + fields: [ + SignUpFormField.username(), + SignUpFormField.password(), + SignUpFormField.passwordConfirmation(), + ], + actions: const [ + SignUpButton(), + ], ); /// A custom Sign Up form. - SignUpForm.custom({ + const SignUpForm.custom({ Key? key, required List fields, - }) : super._( + }) : _includeDefaultFields = false, + super._( key: key, - requiredFields: [ - SignUpFormField.username(), - SignUpFormField.password(), - SignUpFormField.passwordConfirmation(), - ], - customFields: fields, + fields: fields, actions: const [ SignUpButton(), ], ); + /// Controls whether the default form fields are included, based on settings in + /// the Auth plugin configuration. + final bool _includeDefaultFields; + @override _SignUpFormState createState() => _SignUpFormState(); } @@ -291,6 +269,30 @@ class SignUpForm extends AuthenticatorForm { class _SignUpFormState extends AuthenticatorFormState { _SignUpFormState() : super(); + @override + List get allFields { + if (!widget._includeDefaultFields) { + return widget.fields; + } + + // combine fields + final fields = [ + ...widget.fields, + ...runtimeFields(context), + ]; + + // sort on priority. mergeSort is used for a stable sort + mergeSort( + fields, + compare: (AuthenticatorFormField a, AuthenticatorFormField b) { + // Sort larger priorities first. + return -a.displayPriority.compareTo(b.displayPriority); + }, + ); + + return fields.toList(growable: false); + } + @override List runtimeFields(BuildContext context) { final authConfig = InheritedConfig.of(context) @@ -299,10 +301,10 @@ class _SignUpFormState extends AuthenticatorFormState { ?.awsPlugin ?.auth ?.default$; - final runtimeAttributes = [ + final Set runtimeAttributes = { ...?authConfig?.signupAttributes, ...?authConfig?.verificationMechanisms, - ]; + }; if (runtimeAttributes.isEmpty) { return const []; } @@ -365,24 +367,27 @@ class SignInForm extends AuthenticatorForm { SignInForm({ Key? key, bool includeDefaultSocialProviders = true, - }) : this.custom( + }) : super._( key: key, - fields: const [], + fields: [ + SignInFormField.username(), + SignInFormField.password(), + ], + actions: const [ + SignInButton(), + ForgotPasswordButton(), + ], includeDefaultSocialProviders: includeDefaultSocialProviders, ); /// A custom Sign In form. - SignInForm.custom({ + const SignInForm.custom({ Key? key, required List fields, bool includeDefaultSocialProviders = true, }) : super._( key: key, - customFields: fields, - requiredFields: [ - SignInFormField.username(), - SignInFormField.password(), - ], + fields: fields, actions: const [ SignInButton(), ForgotPasswordButton(), @@ -453,23 +458,27 @@ class ConfirmSignUpForm extends AuthenticatorForm { /// {@macro amplify_authenticator.confirm_sign_up_form} ConfirmSignUpForm({ Key? key, - }) : this.custom( + }) : resendCodeButton = null, + super._( key: key, - fields: const [], + fields: [ + ConfirmSignUpFormField.username(), + ConfirmSignUpFormField.verificationCode(), + ], + actions: const [ + ConfirmSignUpButton(), + BackToSignInButton(), + ], ); /// A custom Confirm Sign Up form. - ConfirmSignUpForm.custom({ + const ConfirmSignUpForm.custom({ Key? key, required List fields, this.resendCodeButton, }) : super._( key: key, - customFields: fields, - requiredFields: [ - ConfirmSignUpFormField.username(), - ConfirmSignUpFormField.verificationCode(), - ], + fields: fields, actions: const [ ConfirmSignUpButton(), BackToSignInButton(), @@ -495,8 +504,7 @@ class ConfirmSignInMFAForm extends AuthenticatorForm { ConfirmSignInMFAForm({Key? key}) : super._( key: key, - customFields: const [], - requiredFields: [ + fields: [ ConfirmSignInFormField.verificationCode(), ], actions: const [ @@ -520,22 +528,25 @@ class ConfirmSignInNewPasswordForm extends AuthenticatorForm { /// {@macro amplify_authenticator.confirm_sign_in_new_password_form} ConfirmSignInNewPasswordForm({ Key? key, - }) : this.custom( + }) : super._( key: key, - fields: const [], + fields: [ + ConfirmSignInFormField.newPassword(), + ConfirmSignInFormField.confirmNewPassword(), + ], + actions: const [ + ConfirmSignInNewPasswordButton(), + BackToSignInButton(), + ], ); /// A custom Confirm Sign In with New Password form. - ConfirmSignInNewPasswordForm.custom({ + const ConfirmSignInNewPasswordForm.custom({ Key? key, required List fields, }) : super._( key: key, - customFields: fields, - requiredFields: [ - ConfirmSignInFormField.newPassword(), - ConfirmSignInFormField.confirmNewPassword(), - ], + fields: fields, actions: const [ ConfirmSignInNewPasswordButton(), BackToSignInButton(), @@ -557,8 +568,7 @@ class ResetPasswordForm extends AuthenticatorForm { Key? key, }) : super._( key: key, - customFields: const [], - requiredFields: [ + fields: [ SignInFormField.username(), ], actions: const [ @@ -582,8 +592,7 @@ class ConfirmResetPasswordForm extends AuthenticatorForm { Key? key, }) : super._( key: key, - customFields: const [], - requiredFields: const [ + fields: const [ ResetPasswordFormField.verificationCode(), ResetPasswordFormField.newPassword(), ResetPasswordFormField.passwordConfirmation() @@ -609,10 +618,9 @@ class VerifyUserForm extends AuthenticatorForm { Key? key, }) : super._( key: key, - requiredFields: [ + fields: [ VerifyUserFormField.verifyAttribute(), ], - customFields: const [], actions: const [ VerifyUserButton(), SkipVerifyUserButton(), @@ -634,10 +642,9 @@ class ConfirmVerifyUserForm extends AuthenticatorForm { Key? key, }) : super._( key: key, - requiredFields: [ + fields: [ VerifyUserFormField.confirmVerifyAttribute(), ], - customFields: const [], actions: const [ ConfirmVerifyUserButton(), SkipVerifyUserButton(), diff --git a/packages/amplify_authenticator/lib/src/widgets/form_fields/confirm_sign_up_form_field.dart b/packages/amplify_authenticator/lib/src/widgets/form_fields/confirm_sign_up_form_field.dart index 2b7ef794fd9..07411d94b4b 100644 --- a/packages/amplify_authenticator/lib/src/widgets/form_fields/confirm_sign_up_form_field.dart +++ b/packages/amplify_authenticator/lib/src/widgets/form_fields/confirm_sign_up_form_field.dart @@ -43,7 +43,7 @@ abstract class ConfirmSignUpFormField validator: validator, ); - /// Creates a username component. + /// {@macro amplify_authenticator.username_form_field} static ConfirmSignUpFormField username({ Key? key, FormFieldValidator? validator, diff --git a/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart b/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart index 2ec6c402f74..da3ee93ae37 100644 --- a/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart +++ b/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart @@ -48,7 +48,7 @@ abstract class SignInFormField extends AuthenticatorFormField< requiredOverride: required, ); - /// Creates a username FormField for the sign in step. + /// {@macro amplify_authenticator.username_form_field} static SignInFormField username({ Key? key, FormFieldValidator? validator, diff --git a/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_up_form_field.dart b/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_up_form_field.dart index 1bb6cb8742f..b7d5cea06d2 100644 --- a/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_up_form_field.dart +++ b/packages/amplify_authenticator/lib/src/widgets/form_fields/sign_up_form_field.dart @@ -46,7 +46,16 @@ abstract class SignUpFormField extends AuthenticatorFormField< requiredOverride: required, ); - /// Creates a username component. + /// {@template amplify_authenticator.username_form_field} + /// Creates a username component based on your app's configuration. + /// + /// The look and behavior of this widget will depend on your app's auth configuration. + /// The `usernameAttributes` will be used to determine if the field is a standard + /// username field, and email field, or a phone number field. + /// {@endtemplate} + /// + /// If your app is configured to use email or phone, the value provided for this widget + /// will be saved as the user's email or phone number in addition to their username. static SignUpFormField username({ Key? key, FormFieldValidator? validator, diff --git a/packages/amplify_authenticator/pubspec.yaml b/packages/amplify_authenticator/pubspec.yaml index c1f67ab505a..58ad0727b0e 100644 --- a/packages/amplify_authenticator/pubspec.yaml +++ b/packages/amplify_authenticator/pubspec.yaml @@ -1,11 +1,12 @@ name: amplify_authenticator description: A prebuilt Sign In and Sign Up experience for the Amplify Auth category -version: 0.1.0-rc.6 -homepage: https://github.com/aws-amplify/amplify-flutter/tree/release-candidate/packages/amplify_authenticator/ +version: 0.1.0 +homepage: https://ui.docs.amplify.aws/components/authenticator?platform=flutter +issue_tracker: https://github.com/aws-amplify/amplify-flutter/issues environment: sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.17.0" + flutter: ">=2.0.0" dependencies: amplify_auth_cognito: ">=0.3.0 <0.5.0" diff --git a/packages/amplify_core/CHANGELOG.md b/packages/amplify_core/CHANGELOG.md index e4f8dfc65d5..4341bc867dd 100644 --- a/packages/amplify_core/CHANGELOG.md +++ b/packages/amplify_core/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.1 (2022-02-28) + +- fix: Implement Result in AtomicResult (#1393) +- fix: android atomic result (#1376) + ## 0.4.0 (2022-02-17) - chore: Many model-related type definitions moved from amplify_datastore_plugin_interface to amplify_core. diff --git a/packages/amplify_core/android/src/main/kotlin/com/amazonaws/amplify/amplify_core/AtomicResult.kt b/packages/amplify_core/android/src/main/kotlin/com/amazonaws/amplify/amplify_core/AtomicResult.kt index 8028ad91489..8d59c05b671 100644 --- a/packages/amplify_core/android/src/main/kotlin/com/amazonaws/amplify/amplify_core/AtomicResult.kt +++ b/packages/amplify_core/android/src/main/kotlin/com/amazonaws/amplify/amplify_core/AtomicResult.kt @@ -51,7 +51,7 @@ class AtomicResult(private val result: MethodChannel.Result, private val operati } } - override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) { + override fun error(errorCode: String, errorMessage: String?, errorDetails: Any?) { scope.launch { if (isSent.getAndSet(true)) { Log.w( diff --git a/packages/amplify_core/android/src/test/kotlin/com/amazonaws/amplify/amplify_core/AtomicResultTest.kt b/packages/amplify_core/android/src/test/kotlin/com/amazonaws/amplify/amplify_core/AtomicResultTest.kt index 27c9380738b..2684d7aa12e 100644 --- a/packages/amplify_core/android/src/test/kotlin/com/amazonaws/amplify/amplify_core/AtomicResultTest.kt +++ b/packages/amplify_core/android/src/test/kotlin/com/amazonaws/amplify/amplify_core/AtomicResultTest.kt @@ -46,8 +46,8 @@ class AtomicResultTest { @Test fun errorIsForwarded() = coroutinesTestRule.testDispatcher.runBlockingTest { val atomicResult = AtomicResult(mockResult, "errorIsForwarded") - atomicResult.error(null, null, null) - verify(mockResult).error(null, null, null) + atomicResult.error("", null, null) + verify(mockResult).error("", null, null) } @Test diff --git a/packages/amplify_core/pubspec.yaml b/packages/amplify_core/pubspec.yaml index 49a15412ae8..897556431df 100644 --- a/packages/amplify_core/pubspec.yaml +++ b/packages/amplify_core/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_core description: The base package containing common types and utilities that are shared across the Amplify Flutter packages. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_core environment: diff --git a/packages/amplify_datastore/CHANGELOG.md b/packages/amplify_datastore/CHANGELOG.md index 1b8e34125a4..827f131f121 100644 --- a/packages/amplify_datastore/CHANGELOG.md +++ b/packages/amplify_datastore/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.1 (2022-02-28) + +- fix: delete default predicate causes deletion failure (#1409) +- fix: observe may receive duplicate events in Android (#1339) + ## 0.4.0 (2022-02-17) - feat(datastore): Add QueryPredicate to Save/Delete (#1336) diff --git a/packages/amplify_datastore/example/integration_test/save_test.dart b/packages/amplify_datastore/example/integration_test/save_test.dart index 877914fc8ca..742ebd92272 100644 --- a/packages/amplify_datastore/example/integration_test/save_test.dart +++ b/packages/amplify_datastore/example/integration_test/save_test.dart @@ -13,6 +13,7 @@ * permissions and limitations under the License. */ +import 'package:amplify_datastore/amplify_datastore.dart'; import 'package:amplify_datastore_example/models/ModelProvider.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -71,12 +72,14 @@ void main() { await Amplify.DataStore.save(testBlog); var updatedBlog = testBlog.copyWith(name: 'changed name'); - await Amplify.DataStore.save(updatedBlog, - where: Blog.NAME.contains("Predicate")); - var blogs = await Amplify.DataStore.query(Blog.classType); - expect(blogs.length, 1); - expect(blogs[0].name, originalBlogName); + expect( + () => Amplify.DataStore.save(updatedBlog, + where: Blog.NAME.contains("Predicate")), + throwsA(predicate((e) => + e is DataStoreException && + e.message.contains( + "condition did not match existing model instance")))); }); testWidgets('predicate should not prevent save for matching model', @@ -89,7 +92,7 @@ void main() { const matchingBlogName = 'matching blog name'; var updatedBlog = testBlog.copyWith(name: matchingBlogName); await Amplify.DataStore.save(updatedBlog, - where: Blog.NAME.contains("matching")); + where: Blog.NAME.contains("original")); var blogs = await Amplify.DataStore.query(Blog.classType); expect(blogs.length, 1); diff --git a/packages/amplify_datastore/ios/Classes/SwiftAmplifyDataStorePlugin.swift b/packages/amplify_datastore/ios/Classes/SwiftAmplifyDataStorePlugin.swift index 6f29585e8ce..736bb298c91 100644 --- a/packages/amplify_datastore/ios/Classes/SwiftAmplifyDataStorePlugin.swift +++ b/packages/amplify_datastore/ios/Classes/SwiftAmplifyDataStorePlugin.swift @@ -325,7 +325,8 @@ public class SwiftAmplifyDataStorePlugin: NSObject, FlutterPlugin { modelSchemaRegistry: modelSchemaRegistry, modelName: modelName ) - let queryPredicates = try QueryPredicateBuilder.fromSerializedMap(args["queryPredicate"] as? [String : Any]) + let queryPredicatesMap = args["queryPredicate"] as? [String : Any]; + let queryPredicates = queryPredicatesMap != nil ? try QueryPredicateBuilder.fromSerializedMap(queryPredicatesMap) : nil; let serializedModelData = try FlutterDataStoreRequestUtils.getSerializedModelData(methodChannelArguments: args) let modelID = try FlutterDataStoreRequestUtils.getModelID(serializedModelData: serializedModelData) diff --git a/packages/amplify_datastore/pubspec.yaml b/packages/amplify_datastore/pubspec.yaml index 14d9e7f951b..64457dd0202 100644 --- a/packages/amplify_datastore/pubspec.yaml +++ b/packages/amplify_datastore/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_datastore description: The Amplify Flutter DataStore category plugin, providing a queryable, on-device data store. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_datastore environment: @@ -10,8 +10,8 @@ environment: dependencies: flutter: sdk: flutter - amplify_datastore_plugin_interface: 0.4.0 - amplify_core: 0.4.0 + amplify_datastore_plugin_interface: 0.4.1 + amplify_core: 0.4.1 plugin_platform_interface: ^2.0.0 meta: ^1.1.8 collection: ^1.14.13 diff --git a/packages/amplify_datastore_plugin_interface/CHANGELOG.md b/packages/amplify_datastore_plugin_interface/CHANGELOG.md index adf78a6114d..56ab20c5b54 100644 --- a/packages/amplify_datastore_plugin_interface/CHANGELOG.md +++ b/packages/amplify_datastore_plugin_interface/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) - chore: Many model-related type definitions moved from amplify_datastore_plugin_interface to amplify_core. diff --git a/packages/amplify_datastore_plugin_interface/pubspec.yaml b/packages/amplify_datastore_plugin_interface/pubspec.yaml index 0ea6ea4ebc0..3c09108ff26 100644 --- a/packages/amplify_datastore_plugin_interface/pubspec.yaml +++ b/packages/amplify_datastore_plugin_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_datastore_plugin_interface description: The platform interface for the DataStore module of Amplify Flutter. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_datastore_plugin_interface environment: @@ -12,7 +12,7 @@ dependencies: sdk: flutter meta: ^1.3.0 collection: ^1.15.0 - amplify_core: 0.4.0 + amplify_core: 0.4.1 dev_dependencies: amplify_test: diff --git a/packages/amplify_flutter/CHANGELOG.md b/packages/amplify_flutter/CHANGELOG.md index b83d983ab83..8cc4fbe0dcf 100644 --- a/packages/amplify_flutter/CHANGELOG.md +++ b/packages/amplify_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.1 (2022-02-28) + +- fix: Export category interfaces + ## 0.4.0 (2022-02-17) - chore(flutter): Fix AtomicResultTest (#1363) diff --git a/packages/amplify_flutter/example/pubspec.yaml b/packages/amplify_flutter/example/pubspec.yaml index 5f89d3b77c4..cdd2880897c 100644 --- a/packages/amplify_flutter/example/pubspec.yaml +++ b/packages/amplify_flutter/example/pubspec.yaml @@ -26,7 +26,7 @@ dev_dependencies: amplify_api: path: ../../amplify_api amplify_auth_cognito: - path: ../../amplify_auth_cognito + path: ../../auth/amplify_auth_cognito amplify_datastore: path: ../../amplify_datastore amplify_lints: ^1.0.0 diff --git a/packages/amplify_flutter/example/test_driver/integration_test.dart b/packages/amplify_flutter/example/test_driver/integration_test.dart deleted file mode 100644 index dce7b9cc2a9..00000000000 --- a/packages/amplify_flutter/example/test_driver/integration_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -import 'package:integration_test/integration_test_driver.dart'; - -Future main() => integrationDriver(); diff --git a/packages/amplify_flutter/lib/src/method_channel_amplify.dart b/packages/amplify_flutter/lib/src/method_channel_amplify.dart index 969badf2614..7b9bbb6d55d 100644 --- a/packages/amplify_flutter/lib/src/method_channel_amplify.dart +++ b/packages/amplify_flutter/lib/src/method_channel_amplify.dart @@ -167,6 +167,6 @@ class MethodChannelAmplify extends AmplifyClass { } String _getVersion() { - return '0.4.0'; + return '0.4.1'; } } diff --git a/packages/amplify_flutter/pubspec.yaml b/packages/amplify_flutter/pubspec.yaml index c93dc4c42a7..3d9f2f84969 100644 --- a/packages/amplify_flutter/pubspec.yaml +++ b/packages/amplify_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_flutter description: The top level Flutter package for the AWS Amplify libraries. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_flutter environment: @@ -8,12 +8,12 @@ environment: flutter: ">=2.0.0" dependencies: - amplify_analytics_plugin_interface: 0.4.0 - amplify_api_plugin_interface: 0.4.0 - amplify_auth_plugin_interface: 0.4.0 - amplify_core: 0.4.0 - amplify_datastore_plugin_interface: 0.4.0 - amplify_storage_plugin_interface: 0.4.0 + amplify_analytics_plugin_interface: 0.4.1 + amplify_api_plugin_interface: 0.4.1 + amplify_auth_plugin_interface: 0.4.1 + amplify_core: 0.4.1 + amplify_datastore_plugin_interface: 0.4.1 + amplify_storage_plugin_interface: 0.4.1 collection: ^1.15.0 flutter: sdk: flutter @@ -47,12 +47,12 @@ dependencies: # path: ../amplify_storage_s3 dev_dependencies: - amplify_analytics_pinpoint: 0.4.0 - amplify_api: 0.4.0 - amplify_auth_cognito: 0.4.0 - amplify_datastore: 0.4.0 + amplify_analytics_pinpoint: 0.4.1 + amplify_api: 0.4.1 + amplify_auth_cognito: 0.4.1 + amplify_datastore: 0.4.1 amplify_lints: ^1.0.0 - amplify_storage_s3: 0.4.0 + amplify_storage_s3: 0.4.1 amplify_test: path: ../amplify_test build_runner: ^2.0.0 diff --git a/packages/amplify_storage_plugin_interface/CHANGELOG.md b/packages/amplify_storage_plugin_interface/CHANGELOG.md index 356fb06067c..ac99207dadd 100644 --- a/packages/amplify_storage_plugin_interface/CHANGELOG.md +++ b/packages/amplify_storage_plugin_interface/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) ## 0.3.2 (2022-01-21) diff --git a/packages/amplify_storage_plugin_interface/pubspec.yaml b/packages/amplify_storage_plugin_interface/pubspec.yaml index 4ada5e8eeea..899b32ce8a3 100644 --- a/packages/amplify_storage_plugin_interface/pubspec.yaml +++ b/packages/amplify_storage_plugin_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_storage_plugin_interface description: The platform interface for the storage module of Amplify Flutter. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_storage_plugin_interface environment: @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter meta: ^1.1.8 - amplify_core: 0.4.0 + amplify_core: 0.4.1 dev_dependencies: amplify_test: diff --git a/packages/amplify_storage_s3/CHANGELOG.md b/packages/amplify_storage_s3/CHANGELOG.md index d7fb50e64ed..968c3e0cae1 100644 --- a/packages/amplify_storage_s3/CHANGELOG.md +++ b/packages/amplify_storage_s3/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) - chore: bump Kotlin version to 1.6.10 (#1346) diff --git a/packages/amplify_storage_s3/example/test_driver/integration_test.dart b/packages/amplify_storage_s3/example/test_driver/integration_test.dart deleted file mode 100644 index dce7b9cc2a9..00000000000 --- a/packages/amplify_storage_s3/example/test_driver/integration_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -import 'package:integration_test/integration_test_driver.dart'; - -Future main() => integrationDriver(); diff --git a/packages/amplify_storage_s3/pubspec.yaml b/packages/amplify_storage_s3/pubspec.yaml index 561816b81f9..a88232c6b18 100644 --- a/packages/amplify_storage_s3/pubspec.yaml +++ b/packages/amplify_storage_s3/pubspec.yaml @@ -1,6 +1,6 @@ name: amplify_storage_s3 description: The Amplify Flutter Storage category plugin using the AWS S3 provider. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_storage_s3 environment: @@ -10,9 +10,9 @@ environment: dependencies: flutter: sdk: flutter - amplify_storage_plugin_interface: 0.4.0 + amplify_storage_plugin_interface: 0.4.1 plugin_platform_interface: ^2.0.0 - amplify_core: 0.4.0 + amplify_core: 0.4.1 dev_dependencies: amplify_test: diff --git a/packages/amplify_test/lib/src/integration_test_utils/auth_cognito/integration_test_auth_utils.dart b/packages/amplify_test/lib/src/integration_test_utils/auth_cognito/integration_test_auth_utils.dart index 442cb4a92d6..8e967e7adfd 100644 --- a/packages/amplify_test/lib/src/integration_test_utils/auth_cognito/integration_test_auth_utils.dart +++ b/packages/amplify_test/lib/src/integration_test_utils/auth_cognito/integration_test_auth_utils.dart @@ -16,7 +16,9 @@ import 'dart:async'; import 'dart:convert'; import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; +// ignore: depend_on_referenced_packages import 'package:flutter_test/flutter_test.dart'; import 'package:stream_transform/stream_transform.dart'; @@ -35,8 +37,8 @@ const deleteDocument = '''mutation DeleteUser(\$Username: String!) { /// A GraphQL document used by the [adminCreateUser] test utility method. const adminCreateUserDocument = - '''mutation CreateUser(\$Username: String!, \$Password: String!, \$AutoConfirm: Boolean!, \$EnableMFA: Boolean!, \$VerifyAttributes: Boolean!) { - adminCreateUser(Username: \$Username, Password: \$Password, AutoConfirm: \$AutoConfirm, EnableMFA: \$EnableMFA, VerifyAttributes: \$VerifyAttributes) { + '''mutation CreateUser(\$Username: String!, \$Password: String!, \$AutoConfirm: Boolean!, \$EnableMFA: Boolean!, \$VerifyAttributes: Boolean!, \$Name: String, \$Given_Name: String, \$Email: String, \$Phone_Number: String) { + adminCreateUser(Username: \$Username, Password: \$Password, AutoConfirm: \$AutoConfirm, EnableMFA: \$EnableMFA, VerifyAttributes: \$VerifyAttributes, Given_Name: \$Given_Name, Name: \$Name, Email: \$Email, Phone_Number: \$Phone_Number) { error success } @@ -74,11 +76,15 @@ Future deleteUser(String username) async { /// The [enableMFA] flag will opt-in the user to using SMS MFA. /// The [verifyAttributes] flag will verify the email and phone, and should be used /// if tests need to bypass the verification step. +/// The [attributes] list passes additional attributes. Future adminCreateUser( - String username, String password, - {bool autoConfirm = false, - bool enableMfa = false, - bool verifyAttributes = false}) async { + String username, + String password, { + bool autoConfirm = false, + bool enableMfa = false, + bool verifyAttributes = false, + List attributes = const [], +}) async { var res = await Amplify.API .mutate( request: GraphQLRequest( @@ -88,6 +94,39 @@ Future adminCreateUser( 'Password': password, 'AutoConfirm': autoConfirm, 'EnableMFA': enableMfa, + 'Name': attributes + .firstWhere( + (el) => el.userAttributeKey == CognitoUserAttributeKey.name, + orElse: () => const AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.name, + value: 'default_name')) + .value, + 'Given_Name': attributes + .firstWhere( + (el) => + el.userAttributeKey == + CognitoUserAttributeKey.givenName, + orElse: () => const AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.givenName, + value: 'default_given_name')) + .value, + 'Email': attributes + .firstWhere( + (el) => + el.userAttributeKey == CognitoUserAttributeKey.email, + orElse: () => const AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.email, + value: 'example@example.com')) + .value, + 'Phone_Number': attributes + .firstWhere( + (el) => + el.userAttributeKey == + CognitoUserAttributeKey.phoneNumber, + orElse: () => const AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.phoneNumber, + value: '+15555555')) + .value, 'VerifyAttributes': verifyAttributes, })) .response; diff --git a/packages/amplify_test/pubspec.yaml b/packages/amplify_test/pubspec.yaml index 6648fdda9f4..22cf3879ac9 100644 --- a/packages/amplify_test/pubspec.yaml +++ b/packages/amplify_test/pubspec.yaml @@ -12,8 +12,9 @@ dependencies: path: ../amplify_core flutter: sdk: flutter - amplify_api: ^0.3.1 - amplify_flutter: ^0.3.1 + amplify_api: ^0.4.1 + amplify_auth_cognito: ^0.4.1 + amplify_flutter: ^0.4.1 stream_transform: ^2.0.0 dev_dependencies: diff --git a/packages/amplify_auth_cognito/.gitignore b/packages/auth/amplify_auth_cognito/.gitignore similarity index 100% rename from packages/amplify_auth_cognito/.gitignore rename to packages/auth/amplify_auth_cognito/.gitignore diff --git a/packages/amplify_auth_cognito/.metadata b/packages/auth/amplify_auth_cognito/.metadata similarity index 100% rename from packages/amplify_auth_cognito/.metadata rename to packages/auth/amplify_auth_cognito/.metadata diff --git a/packages/amplify_auth_cognito/CHANGELOG.md b/packages/auth/amplify_auth_cognito/CHANGELOG.md similarity index 98% rename from packages/amplify_auth_cognito/CHANGELOG.md rename to packages/auth/amplify_auth_cognito/CHANGELOG.md index f4494990718..d9af02f9559 100644 --- a/packages/amplify_auth_cognito/CHANGELOG.md +++ b/packages/auth/amplify_auth_cognito/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.1 (2022-02-28) + +- chore: adds API for auth integ tests + minor fixes (#1302) + ## 0.4.0 (2022-02-17) - chore: bump Kotlin version to 1.6.10 (#1346) diff --git a/packages/amplify_auth_cognito/LICENSE b/packages/auth/amplify_auth_cognito/LICENSE similarity index 100% rename from packages/amplify_auth_cognito/LICENSE rename to packages/auth/amplify_auth_cognito/LICENSE diff --git a/packages/amplify_auth_cognito/README.md b/packages/auth/amplify_auth_cognito/README.md similarity index 100% rename from packages/amplify_auth_cognito/README.md rename to packages/auth/amplify_auth_cognito/README.md diff --git a/packages/amplify_auth_cognito/example/.gitignore b/packages/auth/amplify_auth_cognito/example/.gitignore similarity index 97% rename from packages/amplify_auth_cognito/example/.gitignore rename to packages/auth/amplify_auth_cognito/example/.gitignore index f2544a3f90d..218082d361e 100644 --- a/packages/amplify_auth_cognito/example/.gitignore +++ b/packages/auth/amplify_auth_cognito/example/.gitignore @@ -8,6 +8,7 @@ .buildlog/ .history .svn/ +**/adminCreateUser.zip # IntelliJ related *.iml @@ -49,7 +50,6 @@ amplify/.config/local-* amplify/logs amplify/mock-data amplify/backend/amplify-meta.json -amplify/backend/awscloudformation amplify/backend/.temp build/ dist/ diff --git a/packages/amplify_auth_cognito/example/.metadata b/packages/auth/amplify_auth_cognito/example/.metadata similarity index 100% rename from packages/amplify_auth_cognito/example/.metadata rename to packages/auth/amplify_auth_cognito/example/.metadata diff --git a/packages/amplify_auth_cognito/example/README.md b/packages/auth/amplify_auth_cognito/example/README.md similarity index 100% rename from packages/amplify_auth_cognito/example/README.md rename to packages/auth/amplify_auth_cognito/example/README.md diff --git a/packages/amplify_auth_cognito/example/android/.gitignore b/packages/auth/amplify_auth_cognito/example/android/.gitignore similarity index 100% rename from packages/amplify_auth_cognito/example/android/.gitignore rename to packages/auth/amplify_auth_cognito/example/android/.gitignore diff --git a/packages/amplify_auth_cognito/example/android/.project b/packages/auth/amplify_auth_cognito/example/android/.project similarity index 100% rename from packages/amplify_auth_cognito/example/android/.project rename to packages/auth/amplify_auth_cognito/example/android/.project diff --git a/packages/amplify_auth_cognito/example/android/app/build.gradle b/packages/auth/amplify_auth_cognito/example/android/app/build.gradle similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/build.gradle rename to packages/auth/amplify_auth_cognito/example/android/app/build.gradle diff --git a/packages/amplify_auth_cognito/example/android/app/src/debug/AndroidManifest.xml b/packages/auth/amplify_auth_cognito/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/debug/AndroidManifest.xml rename to packages/auth/amplify_auth_cognito/example/android/app/src/debug/AndroidManifest.xml diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/AndroidManifest.xml b/packages/auth/amplify_auth_cognito/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/AndroidManifest.xml rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/AndroidManifest.xml diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito_example/MainActivity.kt b/packages/auth/amplify_auth_cognito/example/android/app/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito_example/MainActivity.kt similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito_example/MainActivity.kt rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito_example/MainActivity.kt diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/drawable/launch_background.xml b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/drawable/launch_background.xml rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/drawable/launch_background.xml diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/packages/amplify_auth_cognito/example/android/app/src/main/res/values/styles.xml b/packages/auth/amplify_auth_cognito/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/main/res/values/styles.xml rename to packages/auth/amplify_auth_cognito/example/android/app/src/main/res/values/styles.xml diff --git a/packages/amplify_auth_cognito/example/android/app/src/profile/AndroidManifest.xml b/packages/auth/amplify_auth_cognito/example/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from packages/amplify_auth_cognito/example/android/app/src/profile/AndroidManifest.xml rename to packages/auth/amplify_auth_cognito/example/android/app/src/profile/AndroidManifest.xml diff --git a/packages/amplify_auth_cognito/example/android/build.gradle b/packages/auth/amplify_auth_cognito/example/android/build.gradle similarity index 100% rename from packages/amplify_auth_cognito/example/android/build.gradle rename to packages/auth/amplify_auth_cognito/example/android/build.gradle diff --git a/packages/amplify_auth_cognito/android/gradle.properties b/packages/auth/amplify_auth_cognito/example/android/gradle.properties similarity index 100% rename from packages/amplify_auth_cognito/android/gradle.properties rename to packages/auth/amplify_auth_cognito/example/android/gradle.properties diff --git a/packages/amplify_auth_cognito/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/auth/amplify_auth_cognito/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from packages/amplify_auth_cognito/example/android/gradle/wrapper/gradle-wrapper.properties rename to packages/auth/amplify_auth_cognito/example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/packages/amplify_auth_cognito/example/android/settings.gradle b/packages/auth/amplify_auth_cognito/example/android/settings.gradle similarity index 100% rename from packages/amplify_auth_cognito/example/android/settings.gradle rename to packages/auth/amplify_auth_cognito/example/android/settings.gradle diff --git a/packages/amplify_auth_cognito/example/android/settings_aar.gradle b/packages/auth/amplify_auth_cognito/example/android/settings_aar.gradle similarity index 100% rename from packages/amplify_auth_cognito/example/android/settings_aar.gradle rename to packages/auth/amplify_auth_cognito/example/android/settings_aar.gradle diff --git a/packages/amplify_auth_cognito/example/integration_test/delete_user_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/delete_user_test.dart similarity index 96% rename from packages/amplify_auth_cognito/example/integration_test/delete_user_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/delete_user_test.dart index ca3a5be0329..c22f14499c3 100644 --- a/packages/amplify_auth_cognito/example/integration_test/delete_user_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/delete_user_test.dart @@ -107,6 +107,12 @@ void main() { }, skip: !Platform.isIOS); group('deleteUser (Android)', () { + setUpAll(() async { + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); + await signOutUser(); + }); testWidgets('should throw an UnimplementedError on Android', (WidgetTester tester) async { try { diff --git a/packages/amplify_auth_cognito/example/integration_test/fetch_session_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/fetch_session_test.dart similarity index 85% rename from packages/amplify_auth_cognito/example/integration_test/fetch_session_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/fetch_session_test.dart index d0e8b362fe6..475f08df616 100644 --- a/packages/amplify_auth_cognito/example/integration_test/fetch_session_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/fetch_session_test.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_test/amplify_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; @@ -30,16 +32,17 @@ void main() { group('fetchSession', () { setUpAll(() async { - await configureAuth(); + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); - // create one user for all tests - await Amplify.Auth.signUp( - username: username, - password: password, - options: CognitoSignUpOptions(userAttributes: { - CognitoUserAttributeKey.email: generateEmail(), - CognitoUserAttributeKey.phoneNumber: mockPhoneNumber - })); + // create one confirmed user for all tests + await adminCreateUser( + username, + password, + autoConfirm: true, + verifyAttributes: true, + ); }); // sign in prior to each test @@ -78,7 +81,7 @@ void main() { testWidgets('should return isSignedIn as false if the user is signed out', (WidgetTester tester) async { await Amplify.Auth.signOut(); - var res = await Amplify.Auth.fetchAuthSession() as CognitoAuthSession; + var res = await Amplify.Auth.fetchAuthSession(); expect(res.isSignedIn, isFalse); }); }); diff --git a/packages/amplify_auth_cognito/example/integration_test/get_current_user_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/get_current_user_test.dart similarity index 86% rename from packages/amplify_auth_cognito/example/integration_test/get_current_user_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/get_current_user_test.dart index a8ede0d59c2..31c55fa3c81 100644 --- a/packages/amplify_auth_cognito/example/integration_test/get_current_user_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/get_current_user_test.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_test/amplify_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; @@ -30,16 +32,17 @@ void main() { group('getCurrentUser', () { setUpAll(() async { - await configureAuth(); + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); // create one user for all tests - await Amplify.Auth.signUp( - username: username, - password: password, - options: CognitoSignUpOptions(userAttributes: { - CognitoUserAttributeKey.email: generateEmail(), - CognitoUserAttributeKey.phoneNumber: mockPhoneNumber - })); + await adminCreateUser( + username, + password, + autoConfirm: true, + verifyAttributes: true, + ); }); // sign in prior to each test diff --git a/packages/amplify_auth_cognito/example/integration_test/hub_events_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/hub_events_test.dart similarity index 84% rename from packages/amplify_auth_cognito/example/integration_test/hub_events_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/hub_events_test.dart index cbc8e149e80..6ecb0f06b95 100644 --- a/packages/amplify_auth_cognito/example/integration_test/hub_events_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/hub_events_test.dart @@ -94,33 +94,37 @@ void main() { 'should broadcast events for deleteUser', (WidgetTester tester) async { // setup - var nextEvent; + var signinEvent; + var deleteEvent; + var signoutEvent; var event; var eventCount = 0; var authEventStream = Amplify.Hub.availableStreams[HubChannel.Auth]!; authEventStream.listen((event) => eventCount++); // assert sign in event is broadcast - nextEvent = authEventStream.first; + signinEvent = + authEventStream.firstWhere((el) => el.eventName == 'SIGNED_IN'); + deleteEvent = + authEventStream.firstWhere((el) => el.eventName == 'USER_DELETED'); + signoutEvent = + authEventStream.firstWhere((el) => el.eventName == 'SIGNED_OUT'); + await Amplify.Auth.signIn( username: username, password: password, ); - event = await nextEvent; - expect(event.eventName, 'SIGNED_IN'); + var event1 = await signinEvent; + expect(event1.eventName, 'SIGNED_IN'); // assert signed out event is broadcast - nextEvent = authEventStream.first; await Amplify.Auth.deleteUser(); - event = await nextEvent; - expect(event.eventName, 'SIGNED_OUT'); + var event2 = await signoutEvent; + var event3 = await deleteEvent; + expect(event2.eventName, 'SIGNED_OUT'); - // assert delete user event is broadcast - nextEvent = authEventStream.first; - event = await nextEvent; - expect(event.eventName, 'USER_DELETED'); + expect(event3.eventName, 'USER_DELETED'); - // assert 3 total events are broadcast expect(eventCount, 3); }, skip: !Platform.isIOS, diff --git a/packages/amplify_auth_cognito/example/integration_test/main_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/main_test.dart similarity index 90% rename from packages/amplify_auth_cognito/example/integration_test/main_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/main_test.dart index 20d2c95ad32..19016051369 100644 --- a/packages/amplify_auth_cognito/example/integration_test/main_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/main_test.dart @@ -32,12 +32,6 @@ void main() async { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('amplify_auth_cognito', () { - setUpAll(() async { - final authPlugin = AmplifyAuthCognito(); - await Amplify.addPlugins([authPlugin]); - await Amplify.configure(amplifyconfig); - }); - sign_in_sign_out_tests.main(); sign_up_tests.main(); user_attributes_tests.main(); diff --git a/packages/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart similarity index 82% rename from packages/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart index bf1561073ba..4526e0b1ec4 100644 --- a/packages/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_test/amplify_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; @@ -23,24 +25,24 @@ import 'utils/setup_utils.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - + late String username; + late String password; group('signIn', () { - late String username; - late String password; setUp(() async { - await configureAuth(); + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); // create new user for each test username = generateUsername(); password = generatePassword(); - await Amplify.Auth.signUp( - username: username, - password: password, - options: CognitoSignUpOptions(userAttributes: { - CognitoUserAttributeKey.email: generateEmail(), - CognitoUserAttributeKey.phoneNumber: mockPhoneNumber - })); + await adminCreateUser( + username, + password, + autoConfirm: true, + verifyAttributes: true, + ); await signOutUser(); }); @@ -99,17 +101,6 @@ void main() { }); testWidgets('should sign a user out', (WidgetTester tester) async { - // sign up user - final username = generateUsername(); - final password = generatePassword(); - await Amplify.Auth.signUp( - username: username, - password: password, - options: CognitoSignUpOptions(userAttributes: { - CognitoUserAttributeKey.email: generateEmail(), - CognitoUserAttributeKey.phoneNumber: mockPhoneNumber - })); - // Ensure signed in before testing signOut. await Amplify.Auth.signIn(username: username, password: password); final authSession = await Amplify.Auth.fetchAuthSession(); diff --git a/packages/amplify_auth_cognito/example/integration_test/sign_up_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/sign_up_test.dart similarity index 97% rename from packages/amplify_auth_cognito/example/integration_test/sign_up_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/sign_up_test.dart index edd406fbd23..4696a4f16d5 100644 --- a/packages/amplify_auth_cognito/example/integration_test/sign_up_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/sign_up_test.dart @@ -13,6 +13,7 @@ * permissions and limitations under the License. */ +import 'package:amplify_api/amplify_api.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; @@ -26,7 +27,9 @@ void main() { group('signUp', () { setUpAll(() async { - await configureAuth(); + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); await signOutUser(); }); diff --git a/packages/amplify_auth_cognito/example/integration_test/update_password_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/update_password_test.dart similarity index 90% rename from packages/amplify_auth_cognito/example/integration_test/update_password_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/update_password_test.dart index 50fe7bb0a96..7aea8053e72 100644 --- a/packages/amplify_auth_cognito/example/integration_test/update_password_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/update_password_test.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_test/amplify_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; @@ -29,20 +31,21 @@ void main() { group('updatePassword', () { setUpAll(() async { - await configureAuth(); + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); }); setUp(() async { // create new user for each test username = generateUsername(); password = generatePassword(); - await Amplify.Auth.signUp( - username: username, - password: password, - options: CognitoSignUpOptions(userAttributes: { - CognitoUserAttributeKey.email: generateEmail(), - CognitoUserAttributeKey.phoneNumber: mockPhoneNumber - })); + await adminCreateUser( + username, + password, + autoConfirm: true, + verifyAttributes: true, + ); await signOutUser(); // sign in with current password diff --git a/packages/amplify_auth_cognito/example/integration_test/user_attributes_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart similarity index 90% rename from packages/amplify_auth_cognito/example/integration_test/user_attributes_test.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart index b83d2d6de5f..a101d4839ce 100644 --- a/packages/amplify_auth_cognito/example/integration_test/user_attributes_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_test/amplify_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; @@ -46,16 +48,22 @@ void main() { group('User Attributes', () { setUpAll(() async { - await configureAuth(); + await configureAuth(additionalPlugins: [ + AmplifyAPI(), + ]); await signOutUser(); - await Amplify.Auth.signUp( - username: username, - password: password, - options: CognitoSignUpOptions(userAttributes: { - emailAttributeKey: email, - phoneNumberAttributeKey: phoneNumber, - nameAttributeKey: name - })); + await adminCreateUser(username, password, + autoConfirm: true, + verifyAttributes: true, + attributes: [ + AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.name, value: name), + AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.email, value: email), + AuthUserAttribute( + userAttributeKey: CognitoUserAttributeKey.phoneNumber, + value: mockPhoneNumber) + ]); await Amplify.Auth.signIn(username: username, password: password); }); diff --git a/packages/amplify_auth_cognito/example/integration_test/utils/mock_data.dart b/packages/auth/amplify_auth_cognito/example/integration_test/utils/mock_data.dart similarity index 100% rename from packages/amplify_auth_cognito/example/integration_test/utils/mock_data.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/utils/mock_data.dart diff --git a/packages/amplify_auth_cognito/example/integration_test/utils/setup_utils.dart b/packages/auth/amplify_auth_cognito/example/integration_test/utils/setup_utils.dart similarity index 100% rename from packages/amplify_auth_cognito/example/integration_test/utils/setup_utils.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/utils/setup_utils.dart diff --git a/packages/amplify_auth_cognito/example/integration_test/utils/validation_utils.dart b/packages/auth/amplify_auth_cognito/example/integration_test/utils/validation_utils.dart similarity index 100% rename from packages/amplify_auth_cognito/example/integration_test/utils/validation_utils.dart rename to packages/auth/amplify_auth_cognito/example/integration_test/utils/validation_utils.dart diff --git a/packages/amplify_auth_cognito/example/ios/.gitignore b/packages/auth/amplify_auth_cognito/example/ios/.gitignore similarity index 100% rename from packages/amplify_auth_cognito/example/ios/.gitignore rename to packages/auth/amplify_auth_cognito/example/ios/.gitignore diff --git a/packages/amplify_auth_cognito/example/ios/Flutter/AppFrameworkInfo.plist b/packages/auth/amplify_auth_cognito/example/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from packages/amplify_auth_cognito/example/ios/Flutter/AppFrameworkInfo.plist rename to packages/auth/amplify_auth_cognito/example/ios/Flutter/AppFrameworkInfo.plist diff --git a/packages/amplify_auth_cognito/example/ios/Flutter/Debug.xcconfig b/packages/auth/amplify_auth_cognito/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from packages/amplify_auth_cognito/example/ios/Flutter/Debug.xcconfig rename to packages/auth/amplify_auth_cognito/example/ios/Flutter/Debug.xcconfig diff --git a/packages/amplify_auth_cognito/example/ios/Flutter/Release.xcconfig b/packages/auth/amplify_auth_cognito/example/ios/Flutter/Release.xcconfig similarity index 100% rename from packages/amplify_auth_cognito/example/ios/Flutter/Release.xcconfig rename to packages/auth/amplify_auth_cognito/example/ios/Flutter/Release.xcconfig diff --git a/packages/auth/amplify_auth_cognito/example/ios/Podfile b/packages/auth/amplify_auth_cognito/example/ios/Podfile new file mode 100644 index 00000000000..10f3c9b470e --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.pbxproj b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..aac30793170 --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,590 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 26AECB412893A7A959622364 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE1727BF3FA0D464713D41A3 /* Pods_Runner.framework */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0D7A73413D1932957B42A25E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 142C31D59F09B92E6B391241 /* Pods-unit_tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.debug.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.debug.xcconfig"; sourceTree = ""; }; + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3D23EF9D73AD2AD9798E569E /* Pods-amplify_auth_cognito_exampleTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_exampleTests.profile.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_exampleTests/Pods-amplify_auth_cognito_exampleTests.profile.xcconfig"; sourceTree = ""; }; + 3D2AB19942AD94335DB089EE /* Pods_unit_tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_unit_tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 77E8D0F580AB656481259C9E /* Pods-amplify_auth_cognito_exampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_exampleTests.release.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_exampleTests/Pods-amplify_auth_cognito_exampleTests.release.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7F732F1CF7D7EF9EA74B414F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 8438DFB604CC96F8F9D6DAF2 /* Pods-unit_tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.release.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.release.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B9187703880B15C5125F5D1F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + BCC22CF2A7736B5F1AA4E0A1 /* Pods-unit_tests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.profile.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.profile.xcconfig"; sourceTree = ""; }; + D3CF4B029A33413539369E68 /* Pods-amplify_auth_cognito_exampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_exampleTests.debug.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_exampleTests/Pods-amplify_auth_cognito_exampleTests.debug.xcconfig"; sourceTree = ""; }; + EE1727BF3FA0D464713D41A3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 26AECB412893A7A959622364 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + DEFD1397E6D457FBCF57AA48 /* Pods */, + F0E8B898AFD29D60F8C1EEDC /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + DEFD1397E6D457FBCF57AA48 /* Pods */ = { + isa = PBXGroup; + children = ( + 0D7A73413D1932957B42A25E /* Pods-Runner.debug.xcconfig */, + B9187703880B15C5125F5D1F /* Pods-Runner.release.xcconfig */, + 7F732F1CF7D7EF9EA74B414F /* Pods-Runner.profile.xcconfig */, + D3CF4B029A33413539369E68 /* Pods-amplify_auth_cognito_exampleTests.debug.xcconfig */, + 77E8D0F580AB656481259C9E /* Pods-amplify_auth_cognito_exampleTests.release.xcconfig */, + 3D23EF9D73AD2AD9798E569E /* Pods-amplify_auth_cognito_exampleTests.profile.xcconfig */, + 142C31D59F09B92E6B391241 /* Pods-unit_tests.debug.xcconfig */, + 8438DFB604CC96F8F9D6DAF2 /* Pods-unit_tests.release.xcconfig */, + BCC22CF2A7736B5F1AA4E0A1 /* Pods-unit_tests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + F0E8B898AFD29D60F8C1EEDC /* Frameworks */ = { + isa = PBXGroup; + children = ( + EE1727BF3FA0D464713D41A3 /* Pods_Runner.framework */, + 3D2AB19942AD94335DB089EE /* Pods_unit_tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 24D41A5CC7E22178A374BFD2 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + AB8785FB87889321150A6CED /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1170; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 24D41A5CC7E22178A374BFD2 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + AB8785FB87889321150A6CED /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 99% rename from packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 07709d9cce5..8ee99942b86 100644 --- a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/auth/amplify_auth_cognito/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ ", + "defaultAuthType": { + "mode": "API_KEY", + "expirationTime": 365 + } + } + } diff --git a/packages/amplify_auth_cognito/example/tool/add_auth_request.json b/packages/auth/amplify_auth_cognito/example/tool/add_auth_request.json similarity index 88% rename from packages/amplify_auth_cognito/example/tool/add_auth_request.json rename to packages/auth/amplify_auth_cognito/example/tool/add_auth_request.json index 5f2b41346b8..acf118d6fae 100644 --- a/packages/amplify_auth_cognito/example/tool/add_auth_request.json +++ b/packages/auth/amplify_auth_cognito/example/tool/add_auth_request.json @@ -7,6 +7,6 @@ "signinMethod": "USERNAME", "requiredSignupAttributes": ["EMAIL", "PHONE_NUMBER"] }, - "includeIdentityPool": false + "includeIdentityPool": true } } diff --git a/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/cloudformation.json b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/cloudformation.json new file mode 100644 index 00000000000..43036ffced0 --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/cloudformation.json @@ -0,0 +1,255 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "CloudWatchRule": { + "Type": "String", + "Default": "NONE", + "Description": " Schedule Expression" + }, + "deploymentBucketName": { + "Type": "String" + }, + "env": { + "Type": "String" + }, + "s3Key": { + "Type": "String" + }, + "stackId": { + "Type": "String" + }, + "authauthintegrationtestUserPoolId": { + "Type": "String", + "Default": "authauthintegrationtestUserPoolId" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "LambdaFunction": { + "Type": "AWS::Lambda::Function", + "Metadata": { + "aws:asset:path": "./src", + "aws:asset:property": "Code" + }, + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "deploymentBucketName" + }, + "S3Key": { + "Ref": "s3Key" + } + }, + "Handler": "index.handler", + "FunctionName": { + "Fn::Join": [ + "", + [ + "amplifyintegrationtestAdminCreateUser", + "-", + { + "Ref": "env" + } + ] + ] + }, + "Environment": { + "Variables": { + "ENV": { + "Ref": "env" + }, + "REGION": { + "Ref": "AWS::Region" + }, + "AUTH_USERPOOLID": { + "Ref": "authauthintegrationtestUserPoolId" + } + } + }, + "Role": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + }, + "Runtime": "nodejs14.x", + "Layers": [], + "Timeout": 25 + } + }, + "LambdaExecutionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "amplifyauthintegLambdaRoleAdminCreateUser", + { + "Fn::Join": [ + "", + [ + "amplifyauthintegLambdaRole", + { + "Ref": "stackId" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + } + } + }, + "lambdaexecutionpolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": { + "Fn::Sub": [ + "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", + { + "region": { + "Ref": "AWS::Region" + }, + "account": { + "Ref": "AWS::AccountId" + }, + "lambda": { + "Ref": "LambdaFunction" + } + } + ] + } + } + ] + } + } + }, + "AmplifyResourcesPolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "amplify-lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "cognito-idp:AdminCreateUser", + "cognito-idp:AdminSetUserSettings", + "cognito-idp:AdminConfirmSignUp", + "cognito-idp:AdminSetUserPassword", + "cognito-idp:AdminEnableUser", + "cognito-idp:AdminUpdateDeviceStatus", + "cognito-idp:AdminSetUserMFAPreference", + "cognito-idp:AdminResetUserPassword", + "cognito-idp:AdminUpdateUserAttributes", + "cognito-idp:AdminUpdateAuthEventFeedback" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:cognito-idp:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":userpool/", + { + "Ref": "authauthintegrationtestUserPoolId" + } + ] + ] + } + ] + } + ] + } + } + } + }, + "Outputs": { + "Name": { + "Value": { + "Ref": "LambdaFunction" + } + }, + "Arn": { + "Value": { + "Fn::GetAtt": [ + "LambdaFunction", + "Arn" + ] + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "LambdaExecutionRole": { + "Value": { + "Ref": "LambdaExecutionRole" + } + } + } + } diff --git a/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/event.json b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/event.json new file mode 100644 index 00000000000..fa794d86a1f --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/event.json @@ -0,0 +1,5 @@ +{ + "key1": "value1", + "key2": "value2", + "key3": "value3" + } diff --git a/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/index.js b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/index.js new file mode 100644 index 00000000000..06343d0fbc7 --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/index.js @@ -0,0 +1,90 @@ +/* Amplify Params - DO NOT EDIT + AUTH_USERPOOLID + ENV + REGION +Amplify Params - DO NOT EDIT */ +var aws = require('aws-sdk'); +var cognitoidentityserviceprovider = new aws.CognitoIdentityServiceProvider({ + "region": process.env.REGION, +}); + +exports.handler = async (event) => { + var response = {success: false } + var baseParams = { + UserPoolId: process.env.AUTH_USERPOOLID, + Username: event.arguments.Username + } + + var createUserParams = Object.assign({ + TemporaryPassword: event.arguments.Password + }, baseParams); + + var attributes = []; + + for (const [k, v] of Object.entries(event.arguments)) { + if (['Given_Name','Name', 'Email', 'Phone_Number'].includes(k)) { + attributes.push({"Name": k.toLowerCase(), "Value": v}) + } + } + + if (attributes.length > 0) { + createUserParams["UserAttributes"] = attributes + } + + + await cognitoidentityserviceprovider.adminCreateUser(createUserParams).promise().catch(function(err) { + response['error'] = err.toString(); + return response; + }); + + if (event.arguments.AutoConfirm) { + var passwordParams = Object.assign({ + Password: event.arguments.Password, + Permanent: true, + }, baseParams); + + await cognitoidentityserviceprovider.adminSetUserPassword(passwordParams).promise().catch(function(err) { + response['error'] = err.toString(); + return response; + }) + } + + if (event.arguments.EnableMFA) { + var mfaParams = Object.assign({ + MFAOptions: [ + { + AttributeName: 'phone_number', + DeliveryMedium: 'SMS' + } + ] + }, baseParams); + + await cognitoidentityserviceprovider.adminSetUserSettings(mfaParams).promise().then().catch(function(err) { + response['error'] = err.toString(); + return response; + }) + } + + if (event.arguments.VerifyAttributes) { + var verifyParams = Object.assign({ + UserAttributes: [ + { + Name: 'phone_number_verified', + Value: 'true' + }, + { + Name: 'email_verified', + Value: 'true' + } + ] + }, baseParams); + + await cognitoidentityserviceprovider.adminUpdateUserAttributes(verifyParams).promise().then().catch(function(err) { + response['error'] = err.toString(); + return response; + }) + } + + response['success'] = true; + return response; +}; diff --git a/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/package.json b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/package.json new file mode 100644 index 00000000000..72690e238b2 --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/tool/adminCreateUserLambda/src/package.json @@ -0,0 +1,7 @@ +{ + "name": "amplifyintegrationtestAdminCreateUser", + "version": "2.0.0", + "description": "Lambda function generated by Amplify", + "main": "index.js", + "license": "Apache-2.0" + } diff --git a/packages/auth/amplify_auth_cognito/example/tool/provision_integration_test_resources.sh b/packages/auth/amplify_auth_cognito/example/tool/provision_integration_test_resources.sh new file mode 100755 index 00000000000..cb23510867c --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/tool/provision_integration_test_resources.sh @@ -0,0 +1,94 @@ +#!/bin/bash +set -e +IFS='|' + +[ "$AWS_PROFILE" ] && profileName="$AWS_PROFILE" || profileName="default"; + +FLUTTERCONFIG="{\ +\"ResDir\":\"./lib/\",\ +}" + +AMPLIFY="{\ +\"projectName\":\"amplifyauthinteg\",\ +\"envName\":\"test\",\ +\"defaultEditor\":\"code\"\ +}" + +FRONTEND="{\ +\"frontend\":\"flutter\",\ +\"config\":$FLUTTERCONFIG\ +}" + +AWSCLOUDFORMATIONCONFIG="{\ +\"configLevel\":\"project\",\ +\"useProfile\":"true",\ +\"profileName\":\"$profileName\",\ +\"region\":\"us-west-2\"\ +}" +PROVIDERS="{\ +\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG\ +}" + +# read the request template and the schema +requestTemplate=`cat tool/add_api_request.json` +schema=`cat tool/schema.graphql` + +# escape quotes and remove new lines from schema +schema=${schema//$'"'/'\"'} +schema=${schema//$'\n'/} + +# create the request with the actual schema +request="${requestTemplate//$schema}" + +amplify init \ +--amplify $AMPLIFY \ +--frontend $FRONTEND \ +--providers $PROVIDERS \ +--yes +cat tool/add_auth_request.json | jq -c | amplify add auth --headless +amplify push --yes + +# get the deployment bucket to use as destination for lambda code +deploymentBucket=($(jq -r '.test.awscloudformation.DeploymentBucketName' ./amplify/team-provider-info.json)) +s3Key=amplify-builds/adminCreateUser.zip +userpoolId=($(jq -r '.auth.authintegrationtest.output.UserPoolId' ./amplify/backend/amplify-meta.json)) +stackId=($(jq -r '.test.awscloudformation.StackName' ./amplify/team-provider-info.json)) +stackId=$(echo "$stackId" | sed 's/.*-//' ) + +# check for old stacks/roles +{ + echo "attempting to delete admin-create-user-stack" + aws cloudformation delete-stack --profile=$profileName --stack-name admin-create-user-stack + aws cloudformation wait stack-delete-complete --profile=$profileName --stack-name admin-create-user-stack +} || { + echo "admin-create-user-stack does not exist or could not be deleted." + echo "We will attempt to create the stack." +} + +{ + echo "attempting to delete amplifyauthintegLambdaRoleAdminCreateUser IAM role" + aws iam delete-role --profile=$profileName --role-name amplifyauthintegLambdaRole${appId}-test +} || { + echo "amplifyauthintegLambdaRoleAdminCreateUser does not exist or could not be deleted." + echo "We will attempt to create the role." +} + +# create zip of lambda code from source +cd tool/adminCreateUserLambda/src +zip -r ../adminCreateUser.zip * +cd ../../.. + +# put lambda code into bucket +echo "adding lambda code to S3..." +aws s3api put-object --profile=$profileName --bucket $deploymentBucket --key $s3Key --body ./tool/adminCreateUserLambda/adminCreateUser.zip + +# remove zip file +rm ./tool/adminCreateUserLambda/adminCreateUser.zip + +# create lambda function for adminCreateUser +echo "creating lambda with cloudformation..." +aws cloudformation deploy --profile=$profileName --template-file ./tool/adminCreateUserLambda/cloudformation.json --stack-name admin-create-user-stack --parameter-overrides deploymentBucketName=$deploymentBucket s3Key=$s3Key env=test authauthintegrationtestUserPoolId=$userpoolId stackId=$stackId --capabilities CAPABILITY_NAMED_IAM + +# create api (which uses lambda in mutation) +echo "$request" | jq -c | amplify add api --headless +amplify push --yes diff --git a/packages/auth/amplify_auth_cognito/example/tool/schema.graphql b/packages/auth/amplify_auth_cognito/example/tool/schema.graphql new file mode 100644 index 00000000000..f221c5b47cf --- /dev/null +++ b/packages/auth/amplify_auth_cognito/example/tool/schema.graphql @@ -0,0 +1,19 @@ +type Mutation { + adminCreateUser( + Username: String! + Password: String! + AutoConfirm: Boolean + EnableMFA: Boolean + VerifyAttributes: Boolean + Email: String + Phone_Number: String + Name: String + Given_Name: String + ): CreateUserResponse + @function(name: "amplifyintegrationtestAdminCreateUser-${env}") +} + +type CreateUserResponse @model { + success: Boolean! + error: String +} diff --git a/packages/amplify_auth_cognito/lib/amplify_auth_cognito.dart b/packages/auth/amplify_auth_cognito/lib/amplify_auth_cognito.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/amplify_auth_cognito.dart rename to packages/auth/amplify_auth_cognito/lib/amplify_auth_cognito.dart diff --git a/packages/amplify_auth_cognito/lib/amplify_auth_cognito_stream_controller.dart b/packages/auth/amplify_auth_cognito/lib/amplify_auth_cognito_stream_controller.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/amplify_auth_cognito_stream_controller.dart rename to packages/auth/amplify_auth_cognito/lib/amplify_auth_cognito_stream_controller.dart diff --git a/packages/amplify_auth_cognito/lib/amplify_auth_error_handling.dart b/packages/auth/amplify_auth_cognito/lib/amplify_auth_error_handling.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/amplify_auth_error_handling.dart rename to packages/auth/amplify_auth_cognito/lib/amplify_auth_error_handling.dart diff --git a/packages/amplify_auth_cognito/lib/method_channel_auth_cognito.dart b/packages/auth/amplify_auth_cognito/lib/method_channel_auth_cognito.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/method_channel_auth_cognito.dart rename to packages/auth/amplify_auth_cognito/lib/method_channel_auth_cognito.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoResendUserAttributeConfirmationCodeOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoResendUserAttributeConfirmationCodeOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoResendUserAttributeConfirmationCodeOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoResendUserAttributeConfirmationCodeOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributeOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributeOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributeOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributeOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributesOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributesOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributesOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoAttribute/CognitoUpdateUserAttributesOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoDevice/cognito_device.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoDevice/cognito_device.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoDevice/cognito_device.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoDevice/cognito_device.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoHubEvents/AuthHubEvent.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoHubEvents/AuthHubEvent.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoHubEvents/AuthHubEvent.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoHubEvents/AuthHubEvent.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoConfirmResetPasswordOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoConfirmResetPasswordOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoConfirmResetPasswordOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoConfirmResetPasswordOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordResult.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordResult.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordResult.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoResetPasswordResult.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoUpdatePasswordOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoUpdatePasswordOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoUpdatePasswordOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoPasswords/CognitoUpdatePasswordOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSession/AWSCognitoUserPoolTokens.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSession/AWSCognitoUserPoolTokens.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSession/AWSCognitoUserPoolTokens.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSession/AWSCognitoUserPoolTokens.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSession/AWSCredentials.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSession/AWSCredentials.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSession/AWSCredentials.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSession/AWSCredentials.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSession/CognitoAuthSession.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSession/CognitoAuthSession.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSession/CognitoAuthSession.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSession/CognitoAuthSession.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSession/CognitoSessionOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSession/CognitoSessionOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSession/CognitoSessionOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSession/CognitoSessionOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoConfirmSignInOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoConfirmSignInOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoConfirmSignInOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoConfirmSignInOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInResult.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInResult.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInResult.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInResult.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInWithWebUIOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInWithWebUIOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInWithWebUIOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignIn/CognitoSignInWithWebUIOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoConfirmSignUpOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoConfirmSignUpOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoConfirmSignUpOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoConfirmSignUpOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeResult.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeResult.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeResult.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoResendSignUpCodeResult.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpOptions.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpOptions.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpOptions.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpOptions.dart diff --git a/packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpResult.dart b/packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpResult.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpResult.dart rename to packages/auth/amplify_auth_cognito/lib/src/CognitoSignUp/CognitoSignUpResult.dart diff --git a/packages/amplify_auth_cognito/lib/src/types.dart b/packages/auth/amplify_auth_cognito/lib/src/types.dart similarity index 100% rename from packages/amplify_auth_cognito/lib/src/types.dart rename to packages/auth/amplify_auth_cognito/lib/src/types.dart diff --git a/packages/amplify_auth_cognito/pubspec.yaml b/packages/auth/amplify_auth_cognito/pubspec.yaml similarity index 57% rename from packages/amplify_auth_cognito/pubspec.yaml rename to packages/auth/amplify_auth_cognito/pubspec.yaml index 9277ec5b89a..09d964a00ec 100644 --- a/packages/amplify_auth_cognito/pubspec.yaml +++ b/packages/auth/amplify_auth_cognito/pubspec.yaml @@ -1,7 +1,7 @@ name: amplify_auth_cognito description: The Amplify Flutter Auth category plugin using the AWS Cognito provider. -version: 0.4.0 -homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_auth_cognito +version: 0.4.1 +homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/auth/amplify_auth_cognito environment: sdk: ">=2.12.0 <3.0.0" @@ -10,14 +10,17 @@ environment: dependencies: flutter: sdk: flutter - amplify_auth_plugin_interface: 0.4.0 - amplify_core: 0.4.0 + amplify_auth_plugin_interface: 0.4.1 + amplify_core: 0.4.1 + amplify_auth_cognito_android: 0.4.1 + amplify_auth_cognito_ios: 0.4.1 collection: ^1.15.0 plugin_platform_interface: ^2.0.0 dev_dependencies: + amplify_lints: ^1.0.0 amplify_test: - path: ../amplify_test + path: ../../amplify_test flutter_test: sdk: flutter @@ -25,7 +28,6 @@ flutter: plugin: platforms: android: - package: com.amazonaws.amplify.amplify_auth_cognito - pluginClass: AuthCognito + default_package: amplify_auth_cognito_android ios: - pluginClass: AuthCognito + default_package: amplify_auth_cognito_ios diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_authExceptions_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_authExceptions_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_authExceptions_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_authExceptions_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmResetPassword_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmResetPassword_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmResetPassword_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmResetPassword_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignIn_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignIn_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignIn_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignIn_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignup_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignup_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignup_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmSignup_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmUserAttribute_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmUserAttribute_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_confirmUserAttribute_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_confirmUserAttribute_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_fetchSession_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_fetchSession_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_fetchSession_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_fetchSession_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_fetchUserAttributes_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_fetchUserAttributes_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_fetchUserAttributes_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_fetchUserAttributes_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_getCurrentUser_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_getCurrentUser_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_getCurrentUser_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_getCurrentUser_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_resendSignUpCode_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_resendSignUpCode_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_resendSignUpCode_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_resendSignUpCode_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_resendUserAttributeConfirmationCode_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_resendUserAttributeConfirmationCode_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_resendUserAttributeConfirmationCode_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_resendUserAttributeConfirmationCode_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_resetPassword_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_resetPassword_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_resetPassword_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_resetPassword_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_signInWithWebUI_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signInWithWebUI_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_signInWithWebUI_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signInWithWebUI_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_signOut_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signOut_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_signOut_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signOut_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_signin_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signin_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_signin_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signin_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_signup_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signup_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_signup_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_signup_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_stream_controller_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_stream_controller_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_stream_controller_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_stream_controller_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_updatePassword_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_updatePassword_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_updatePassword_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_updatePassword_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttribute_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttribute_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttribute_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttribute_test.dart diff --git a/packages/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttributes_test.dart b/packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttributes_test.dart similarity index 100% rename from packages/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttributes_test.dart rename to packages/auth/amplify_auth_cognito/test/amplify_auth_cognito_updateUserAttributes_test.dart diff --git a/packages/amplify_auth_cognito/test/resources/hub/sessionExpiredEvent.json b/packages/auth/amplify_auth_cognito/test/resources/hub/sessionExpiredEvent.json similarity index 100% rename from packages/amplify_auth_cognito/test/resources/hub/sessionExpiredEvent.json rename to packages/auth/amplify_auth_cognito/test/resources/hub/sessionExpiredEvent.json diff --git a/packages/amplify_auth_cognito/test/resources/hub/signedInEvent.json b/packages/auth/amplify_auth_cognito/test/resources/hub/signedInEvent.json similarity index 100% rename from packages/amplify_auth_cognito/test/resources/hub/signedInEvent.json rename to packages/auth/amplify_auth_cognito/test/resources/hub/signedInEvent.json diff --git a/packages/amplify_auth_cognito/test/resources/hub/signedOutEvent.json b/packages/auth/amplify_auth_cognito/test/resources/hub/signedOutEvent.json similarity index 100% rename from packages/amplify_auth_cognito/test/resources/hub/signedOutEvent.json rename to packages/auth/amplify_auth_cognito/test/resources/hub/signedOutEvent.json diff --git a/packages/amplify_auth_cognito/test/resources/hub/unknownEvent.json b/packages/auth/amplify_auth_cognito/test/resources/hub/unknownEvent.json similarity index 100% rename from packages/amplify_auth_cognito/test/resources/hub/unknownEvent.json rename to packages/auth/amplify_auth_cognito/test/resources/hub/unknownEvent.json diff --git a/packages/auth/amplify_auth_cognito_android/.gitignore b/packages/auth/amplify_auth_cognito_android/.gitignore new file mode 100644 index 00000000000..9be145fde98 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/packages/auth/amplify_auth_cognito_android/.metadata b/packages/auth/amplify_auth_cognito_android/.metadata new file mode 100644 index 00000000000..02d9fe853d8 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c + channel: stable + +project_type: plugin diff --git a/packages/auth/amplify_auth_cognito_android/CHANGELOG.md b/packages/auth/amplify_auth_cognito_android/CHANGELOG.md new file mode 100644 index 00000000000..ea4771a36ce --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.4.1 + +- Initial release diff --git a/packages/auth/amplify_auth_cognito_android/LICENSE b/packages/auth/amplify_auth_cognito_android/LICENSE new file mode 100644 index 00000000000..67db8588217 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/packages/auth/amplify_auth_cognito_android/README.md b/packages/auth/amplify_auth_cognito_android/README.md new file mode 100644 index 00000000000..cbdad563274 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/README.md @@ -0,0 +1,7 @@ +# amplify_auth_cognito_android + +The method channel implementation for amplify_auth_cognito on Android + +## Usage + +This package is an endorsed plugin of amplify_auth_cognito and will be included as a transitive dependency. It does not need to be imported manually. diff --git a/packages/amplify_auth_cognito/android/.classpath b/packages/auth/amplify_auth_cognito_android/android/.classpath similarity index 100% rename from packages/amplify_auth_cognito/android/.classpath rename to packages/auth/amplify_auth_cognito_android/android/.classpath diff --git a/packages/amplify_auth_cognito/android/.gitignore b/packages/auth/amplify_auth_cognito_android/android/.gitignore similarity index 100% rename from packages/amplify_auth_cognito/android/.gitignore rename to packages/auth/amplify_auth_cognito_android/android/.gitignore diff --git a/packages/amplify_auth_cognito/android/.project b/packages/auth/amplify_auth_cognito_android/android/.project similarity index 100% rename from packages/amplify_auth_cognito/android/.project rename to packages/auth/amplify_auth_cognito_android/android/.project diff --git a/packages/amplify_auth_cognito/android/build.gradle b/packages/auth/amplify_auth_cognito_android/android/build.gradle similarity index 95% rename from packages/amplify_auth_cognito/android/build.gradle rename to packages/auth/amplify_auth_cognito_android/android/build.gradle index d1882f4f9cc..fca7d5aaa63 100644 --- a/packages/amplify_auth_cognito/android/build.gradle +++ b/packages/auth/amplify_auth_cognito_android/android/build.gradle @@ -33,7 +33,7 @@ android { sourceSets { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' - test.resources.srcDirs += '../test/resources' + test.resources.srcDirs += '../../amplify_auth_cognito/test/resources' } defaultConfig { minSdkVersion 21 diff --git a/packages/amplify_auth_cognito/android/coverage.gradle b/packages/auth/amplify_auth_cognito_android/android/coverage.gradle similarity index 100% rename from packages/amplify_auth_cognito/android/coverage.gradle rename to packages/auth/amplify_auth_cognito_android/android/coverage.gradle diff --git a/packages/amplify_auth_cognito/example/android/gradle.properties b/packages/auth/amplify_auth_cognito_android/android/gradle.properties similarity index 100% rename from packages/amplify_auth_cognito/example/android/gradle.properties rename to packages/auth/amplify_auth_cognito_android/android/gradle.properties diff --git a/packages/amplify_auth_cognito/android/gradle/wrapper/gradle-wrapper.properties b/packages/auth/amplify_auth_cognito_android/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from packages/amplify_auth_cognito/android/gradle/wrapper/gradle-wrapper.properties rename to packages/auth/amplify_auth_cognito_android/android/gradle/wrapper/gradle-wrapper.properties diff --git a/packages/amplify_auth_cognito/android/settings.gradle b/packages/auth/amplify_auth_cognito_android/android/settings.gradle similarity index 100% rename from packages/amplify_auth_cognito/android/settings.gradle rename to packages/auth/amplify_auth_cognito_android/android/settings.gradle diff --git a/packages/amplify_auth_cognito/android/src/main/AndroidManifest.xml b/packages/auth/amplify_auth_cognito_android/android/src/main/AndroidManifest.xml similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/AndroidManifest.xml rename to packages/auth/amplify_auth_cognito_android/android/src/main/AndroidManifest.xml diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognito.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognito.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognito.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognito.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognitoHubEventStreamHandler.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognitoHubEventStreamHandler.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognitoHubEventStreamHandler.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognitoHubEventStreamHandler.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthErrorHandler.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthErrorHandler.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthErrorHandler.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthErrorHandler.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/FlutterNextStepUtility.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/FlutterNextStepUtility.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/FlutterNextStepUtility.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/FlutterNextStepUtility.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/Device.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/Device.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/Device.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/Device.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/DeviceHandler.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/DeviceHandler.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/DeviceHandler.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/device/DeviceHandler.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterAuthUser.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterAuthUser.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterAuthUser.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterAuthUser.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmResetPasswordRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmResetPasswordRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmResetPasswordRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmResetPasswordRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignInRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignInRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignInRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignInRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignUpRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignUpRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignUpRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmSignUpRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmUserAttributeRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmUserAttributeRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmUserAttributeRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterConfirmUserAttributeRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchAuthSessionResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchCognitoAuthSessionResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchCognitoAuthSessionResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchCognitoAuthSessionResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchCognitoAuthSessionResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchUserAttributesResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchUserAttributesResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchUserAttributesResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterFetchUserAttributesResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterInvalidStateException.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterInvalidStateException.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterInvalidStateException.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterInvalidStateException.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendSignUpCodeResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResendUserAttributeConfirmationCodeResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInWithWebUIRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInWithWebUIRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInWithWebUIRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInWithWebUIRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignOutRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignOutRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignOutRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignOutRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignUpResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdatePasswordRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdatePasswordRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdatePasswordRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdatePasswordRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributeResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesRequest.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesRequest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesRequest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesRequest.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesResult.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesResult.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesResult.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterUpdateUserAttributesResult.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/AuthCodeDeliveryDetailsSerialization.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/AuthCodeDeliveryDetailsSerialization.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/AuthCodeDeliveryDetailsSerialization.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/AuthCodeDeliveryDetailsSerialization.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/IsRedirectActivityDeclared.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/IsRedirectActivityDeclared.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/IsRedirectActivityDeclared.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/IsRedirectActivityDeclared.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeDeserialization.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeDeserialization.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeDeserialization.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeDeserialization.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeSerialization.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeSerialization.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeSerialization.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeSerialization.kt diff --git a/packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeValidation.kt b/packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeValidation.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeValidation.kt rename to packages/auth/amplify_auth_cognito_android/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/utils/UserAttributeValidation.kt diff --git a/packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoHubTest.kt b/packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoHubTest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoHubTest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoHubTest.kt diff --git a/packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoPluginTest.kt b/packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoPluginTest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoPluginTest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthCognitoPluginTest.kt diff --git a/packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthErrorHandlerTest.kt b/packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthErrorHandlerTest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthErrorHandlerTest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AmplifyAuthErrorHandlerTest.kt diff --git a/packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/IsRedirectActivityDeclaredTest.kt b/packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/IsRedirectActivityDeclaredTest.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/IsRedirectActivityDeclaredTest.kt rename to packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/IsRedirectActivityDeclaredTest.kt diff --git a/packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/Latch.kt b/packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/Latch.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/Latch.kt rename to packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/Latch.kt diff --git a/packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/TestResourcesReadUtil.kt b/packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/TestResourcesReadUtil.kt similarity index 100% rename from packages/amplify_auth_cognito/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/TestResourcesReadUtil.kt rename to packages/auth/amplify_auth_cognito_android/android/src/test/kotlin/com/amazonaws/amplify/amplify_auth_cognito/TestResourcesReadUtil.kt diff --git a/packages/auth/amplify_auth_cognito_android/example/.gitignore b/packages/auth/amplify_auth_cognito_android/example/.gitignore new file mode 100644 index 00000000000..0fa6b675c0a --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/auth/amplify_auth_cognito_android/example/.metadata b/packages/auth/amplify_auth_cognito_android/example/.metadata new file mode 100644 index 00000000000..7539b439330 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c + channel: stable + +project_type: app diff --git a/packages/auth/amplify_auth_cognito_android/example/README.md b/packages/auth/amplify_auth_cognito_android/example/README.md new file mode 100644 index 00000000000..471ea9184a9 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/README.md @@ -0,0 +1,3 @@ +# amplify_auth_cognito_android_example + +This app is a test bed for amplify_auth_cognito_android, which is not meant to be consumed directly. This example should not be used as a guide for using the amplify_auth_cognito APIs. The app-facing `amplify_auth_cognito` package contains an example application which demonstrates how to consume the APIs. diff --git a/packages/auth/amplify_auth_cognito_android/example/analysis_options.yaml b/packages/auth/amplify_auth_cognito_android/example/analysis_options.yaml new file mode 100644 index 00000000000..cb0315f3dc0 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/analysis_options.yaml @@ -0,0 +1,8 @@ +include: package:amplify_lints/flutter_lib.yaml + +analyzer: + exclude: + - "**/*.mocks.dart" + errors: + # TODO: Renable when logging library is finished + avoid_print: ignore diff --git a/packages/auth/amplify_auth_cognito_android/example/android/.gitignore b/packages/auth/amplify_auth_cognito_android/example/android/.gitignore new file mode 100644 index 00000000000..6f568019d3c --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/build.gradle b/packages/auth/amplify_auth_cognito_android/example/android/app/build.gradle new file mode 100644 index 00000000000..0a62a51609e --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/build.gradle @@ -0,0 +1,68 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.amplify_auth_cognito_android_example" + minSdkVersion 21 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/debug/AndroidManifest.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000000..4eb4168aa06 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/AndroidManifest.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..a02dee9e5f9 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/packages/amplify_datastore/example/test_driver/integration_test.dart b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/kotlin/com/example/amplify_auth_cognito_android_example/MainActivity.kt similarity index 70% rename from packages/amplify_datastore/example/test_driver/integration_test.dart rename to packages/auth/amplify_auth_cognito_android/example/android/app/src/main/kotlin/com/example/amplify_auth_cognito_android_example/MainActivity.kt index dce7b9cc2a9..976979326fd 100644 --- a/packages/amplify_datastore/example/test_driver/integration_test.dart +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/kotlin/com/example/amplify_auth_cognito_android_example/MainActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,6 +13,9 @@ * permissions and limitations under the License. */ -import 'package:integration_test/integration_test_driver.dart'; +package com.example.amplify_auth_cognito_android_example -Future main() => integrationDriver(); +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000000..f74085f3f6a --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/drawable/launch_background.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000000..304732f8842 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000000..db77bb4b7b0 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000000..17987b79bb8 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000000..09d4391482b Binary files /dev/null and b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000000..d5f1c8d34e7 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000000..4d6372eebdb Binary files /dev/null and b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/values-night/styles.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000000..3db14bb5391 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/values/styles.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000000..d460d1e9215 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_android/example/android/app/src/profile/AndroidManifest.xml b/packages/auth/amplify_auth_cognito_android/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000000..4eb4168aa06 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/auth/amplify_auth_cognito_android/example/android/build.gradle b/packages/auth/amplify_auth_cognito_android/example/android/build.gradle new file mode 100644 index 00000000000..0945d7648d1 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.6.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.0.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/packages/auth/amplify_auth_cognito_android/example/android/gradle.properties b/packages/auth/amplify_auth_cognito_android/example/android/gradle.properties new file mode 100644 index 00000000000..94adc3a3f97 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/auth/amplify_auth_cognito_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/auth/amplify_auth_cognito_android/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..bc6a58afdda --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/packages/auth/amplify_auth_cognito_android/example/android/settings.gradle b/packages/auth/amplify_auth_cognito_android/example/android/settings.gradle new file mode 100644 index 00000000000..44e62bcf06a --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/auth/amplify_auth_cognito_android/example/lib/main.dart b/packages/auth/amplify_auth_cognito_android/example/lib/main.dart new file mode 100644 index 00000000000..e092f5c6468 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/lib/main.dart @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text( + 'This application serves as a test bed for the Android implementation of the amplify_auth_cognito method channel. Please see the example app in the main amplify_auth_cognito repository for a functional example app.'), + ), + ), + ); + } +} diff --git a/packages/auth/amplify_auth_cognito_android/example/pubspec.yaml b/packages/auth/amplify_auth_cognito_android/example/pubspec.yaml new file mode 100644 index 00000000000..6044ef5fd4f --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/example/pubspec.yaml @@ -0,0 +1,27 @@ +name: amplify_auth_cognito_android_example +description: Test bed for amplify_auth_cognito_ios + +publish_to: "none" # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ">=2.12.0 <3.0.0" + flutter: ">=2.2.0" + +dependencies: + flutter: + sdk: flutter + amplify_auth_cognito_android: + path: ../ + amplify_core: + path: ../../../amplify_core + + cupertino_icons: ^1.0.2 + +dev_dependencies: + amplify_lints: ^1.0.0 + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + +flutter: + uses-material-design: true diff --git a/packages/auth/amplify_auth_cognito_android/pubspec.yaml b/packages/auth/amplify_auth_cognito_android/pubspec.yaml new file mode 100644 index 00000000000..4e580200b02 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_android/pubspec.yaml @@ -0,0 +1,25 @@ +name: amplify_auth_cognito_android +description: The method channel implementation for amplify_auth_cognito on Android +version: 0.4.1 +homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/auth/amplify_auth_cognito_android + +environment: + sdk: ">=2.12.0 <3.0.0" + flutter: ">=1.20.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + amplify_lints: ^1.0.0 + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + +flutter: + plugin: + platforms: + android: + package: com.amazonaws.amplify.amplify_auth_cognito + pluginClass: AuthCognito diff --git a/packages/auth/amplify_auth_cognito_ios/.gitignore b/packages/auth/amplify_auth_cognito_ios/.gitignore new file mode 100644 index 00000000000..9be145fde98 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/packages/auth/amplify_auth_cognito_ios/.metadata b/packages/auth/amplify_auth_cognito_ios/.metadata new file mode 100644 index 00000000000..02d9fe853d8 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c + channel: stable + +project_type: plugin diff --git a/packages/auth/amplify_auth_cognito_ios/CHANGELOG.md b/packages/auth/amplify_auth_cognito_ios/CHANGELOG.md new file mode 100644 index 00000000000..ea4771a36ce --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.4.1 + +- Initial release diff --git a/packages/auth/amplify_auth_cognito_ios/LICENSE b/packages/auth/amplify_auth_cognito_ios/LICENSE new file mode 100644 index 00000000000..67db8588217 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/packages/auth/amplify_auth_cognito_ios/README.md b/packages/auth/amplify_auth_cognito_ios/README.md new file mode 100644 index 00000000000..3a1f3a304e1 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/README.md @@ -0,0 +1,7 @@ +# amplify_auth_cognito_ios + +The method channel implementation for amplify_auth_cognito on iOS + +## Usage + +This package is an endorsed plugin of amplify_auth_cognito and will be included as a transitive dependency. It does not need to be imported manually diff --git a/packages/auth/amplify_auth_cognito_ios/example/.gitignore b/packages/auth/amplify_auth_cognito_ios/example/.gitignore new file mode 100644 index 00000000000..0fa6b675c0a --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/auth/amplify_auth_cognito_ios/example/.metadata b/packages/auth/amplify_auth_cognito_ios/example/.metadata new file mode 100644 index 00000000000..7539b439330 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c + channel: stable + +project_type: app diff --git a/packages/auth/amplify_auth_cognito_ios/example/README.md b/packages/auth/amplify_auth_cognito_ios/example/README.md new file mode 100644 index 00000000000..f89ddb40358 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/README.md @@ -0,0 +1,3 @@ +# amplify_auth_cognito_ios_example + +This app is a test bed for amplify_auth_cognito_ios, which is not meant to be consumed directly. This example should not be used as a guide for using the amplify_auth_cognito APIs. The app-facing `amplify_auth_cognito` package contains an example application which demonstrates how to consume the APIs. diff --git a/packages/auth/amplify_auth_cognito_ios/example/analysis_options.yaml b/packages/auth/amplify_auth_cognito_ios/example/analysis_options.yaml new file mode 100644 index 00000000000..cb0315f3dc0 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/analysis_options.yaml @@ -0,0 +1,8 @@ +include: package:amplify_lints/flutter_lib.yaml + +analyzer: + exclude: + - "**/*.mocks.dart" + errors: + # TODO: Renable when logging library is finished + avoid_print: ignore diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/.gitignore b/packages/auth/amplify_auth_cognito_ios/example/ios/.gitignore new file mode 100644 index 00000000000..7a7f9873ad7 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/AppFrameworkInfo.plist b/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000000..8d4492f977a --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/Debug.xcconfig b/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000000..ec97fc6f302 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/Release.xcconfig b/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000000..c4855bfe200 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/amplify_auth_cognito/example/ios/Podfile b/packages/auth/amplify_auth_cognito_ios/example/ios/Podfile similarity index 99% rename from packages/amplify_auth_cognito/example/ios/Podfile rename to packages/auth/amplify_auth_cognito_ios/example/ios/Podfile index 93a53a2e785..69cf396d26d 100644 --- a/packages/amplify_auth_cognito/example/ios/Podfile +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Podfile @@ -38,6 +38,7 @@ target 'unit_tests' do use_frameworks! use_modular_headers! + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end diff --git a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.pbxproj b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.pbxproj similarity index 73% rename from packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.pbxproj rename to packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.pbxproj index 4776bd483e0..a1f7a296bee 100644 --- a/packages/amplify_auth_cognito/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,20 +8,31 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 26AECB412893A7A959622364 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE1727BF3FA0D464713D41A3 /* Pods_Runner.framework */; }; + 339628D48ABE8C6D14F537C0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9651AC6E3A34D2E32F76E448 /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9674FCEAE95127916BA4C1B4 /* Pods_unit_tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D2AB19942AD94335DB089EE /* Pods_unit_tests.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 9C3D802825C1F52600728B7B /* amplify_auth_error_handling_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C3D802725C1F52600728B7B /* amplify_auth_error_handling_tests.swift */; }; - 9C3D802B25C1F82800728B7B /* MockErrorConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C3D802A25C1F82800728B7B /* MockErrorConstants.swift */; }; - 9C404087251AA2430036C5FE /* MockAuthSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C404086251AA2430036C5FE /* MockAuthSession.swift */; }; - 9CC45C2425A4F7E90055E103 /* amplify_auth_cognito_hub_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CC45C2325A4F7E90055E103 /* amplify_auth_cognito_hub_tests.swift */; }; - B43589BD2581AA9600789DEE /* amplify_auth_cognito_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B43589BC2581AA9600789DEE /* amplify_auth_cognito_tests.swift */; }; + 9C69351827B58C0000EEA5BF /* amplify_auth_cognito_error_handler_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C69351727B58C0000EEA5BF /* amplify_auth_cognito_error_handler_tests.swift */; }; + 9C9BEE6927B33B4100BFA30D /* amplify_auth_cognito_ios_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEE6827B33B4100BFA30D /* amplify_auth_cognito_ios_tests.swift */; }; + 9C9BEE7127B43E2C00BFA30D /* MockAuthSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEE7027B43E2C00BFA30D /* MockAuthSession.swift */; }; + 9C9BEE7327B43E4F00BFA30D /* MockErrorConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEE7227B43E4F00BFA30D /* MockErrorConstants.swift */; }; + 9C9BEE7527B43F1400BFA30D /* amplify_auth_utils_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEE7427B43F1400BFA30D /* amplify_auth_utils_tests.swift */; }; + 9C9BEE7727B43F6D00BFA30D /* amplify_auth_cognito_hub_tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEE7627B43F6D00BFA30D /* amplify_auth_cognito_hub_tests.swift */; }; + B28E12945B3CFC02E68F6F49 /* Pods_unit_tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5AD500386A764A733E257E8 /* Pods_unit_tests.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 9C9BEE6A27B33B4100BFA30D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -36,19 +47,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0D7A73413D1932957B42A25E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 142C31D59F09B92E6B391241 /* Pods-unit_tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.debug.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3D23EF9D73AD2AD9798E569E /* Pods-amplify_auth_cognito_exampleTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_exampleTests.profile.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_exampleTests/Pods-amplify_auth_cognito_exampleTests.profile.xcconfig"; sourceTree = ""; }; - 3D2AB19942AD94335DB089EE /* Pods_unit_tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_unit_tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 48A4DDBFA8A7B9B0A5541ED1 /* Pods-amplify_auth_cognito_ios_tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_ios_tests.debug.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_ios_tests/Pods-amplify_auth_cognito_ios_tests.debug.xcconfig"; sourceTree = ""; }; + 4B9AEE0BE61CAEEA6B376F26 /* Pods-unit_tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.release.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.release.xcconfig"; sourceTree = ""; }; + 4F933B9C9DF1FEE656B2F072 /* Pods-unit_tests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.profile.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.profile.xcconfig"; sourceTree = ""; }; + 6C8479076E71237A2C228FAA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 77E8D0F580AB656481259C9E /* Pods-amplify_auth_cognito_exampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_exampleTests.release.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_exampleTests/Pods-amplify_auth_cognito_exampleTests.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7F732F1CF7D7EF9EA74B414F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 8438DFB604CC96F8F9D6DAF2 /* Pods-unit_tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.release.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.release.xcconfig"; sourceTree = ""; }; + 9651AC6E3A34D2E32F76E448 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -56,17 +65,19 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9C3D802725C1F52600728B7B /* amplify_auth_error_handling_tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = amplify_auth_error_handling_tests.swift; sourceTree = ""; }; - 9C3D802A25C1F82800728B7B /* MockErrorConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockErrorConstants.swift; sourceTree = ""; }; - 9C404086251AA2430036C5FE /* MockAuthSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockAuthSession.swift; sourceTree = ""; }; - 9CC45C2325A4F7E90055E103 /* amplify_auth_cognito_hub_tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = amplify_auth_cognito_hub_tests.swift; sourceTree = ""; }; - 9CEFDF1225113C2F001481FC /* unit_tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = unit_tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CEFDF1625113C2F001481FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B43589BC2581AA9600789DEE /* amplify_auth_cognito_tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = amplify_auth_cognito_tests.swift; sourceTree = ""; }; - B9187703880B15C5125F5D1F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - BCC22CF2A7736B5F1AA4E0A1 /* Pods-unit_tests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.profile.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.profile.xcconfig"; sourceTree = ""; }; - D3CF4B029A33413539369E68 /* Pods-amplify_auth_cognito_exampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_exampleTests.debug.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_exampleTests/Pods-amplify_auth_cognito_exampleTests.debug.xcconfig"; sourceTree = ""; }; - EE1727BF3FA0D464713D41A3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9B718B1A53547EED9E2EB037 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 9C69351727B58C0000EEA5BF /* amplify_auth_cognito_error_handler_tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = amplify_auth_cognito_error_handler_tests.swift; sourceTree = ""; }; + 9C9BEE6627B33B4100BFA30D /* unit_tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = unit_tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 9C9BEE6827B33B4100BFA30D /* amplify_auth_cognito_ios_tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = amplify_auth_cognito_ios_tests.swift; sourceTree = ""; }; + 9C9BEE7027B43E2C00BFA30D /* MockAuthSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockAuthSession.swift; sourceTree = ""; }; + 9C9BEE7227B43E4F00BFA30D /* MockErrorConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockErrorConstants.swift; sourceTree = ""; }; + 9C9BEE7427B43F1400BFA30D /* amplify_auth_utils_tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = amplify_auth_utils_tests.swift; sourceTree = ""; }; + 9C9BEE7627B43F6D00BFA30D /* amplify_auth_cognito_hub_tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = amplify_auth_cognito_hub_tests.swift; sourceTree = ""; }; + A5AD500386A764A733E257E8 /* Pods_unit_tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_unit_tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AD8C9C3C4A64505A6DD45D6B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + B68EA2D2B84E4A2FB81CA820 /* Pods-unit_tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.debug.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.debug.xcconfig"; sourceTree = ""; }; + EF17EF14E0202CC5A4EA0B71 /* Pods-amplify_auth_cognito_ios_tests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_ios_tests.profile.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_ios_tests/Pods-amplify_auth_cognito_ios_tests.profile.xcconfig"; sourceTree = ""; }; + F54C03E51BA38D9E102EF2B0 /* Pods-amplify_auth_cognito_ios_tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-amplify_auth_cognito_ios_tests.release.xcconfig"; path = "Target Support Files/Pods-amplify_auth_cognito_ios_tests/Pods-amplify_auth_cognito_ios_tests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,15 +85,15 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 26AECB412893A7A959622364 /* Pods_Runner.framework in Frameworks */, + 339628D48ABE8C6D14F537C0 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9CEFDF0F25113C2F001481FC /* Frameworks */ = { + 9C9BEE6327B33B4100BFA30D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9674FCEAE95127916BA4C1B4 /* Pods_unit_tests.framework in Frameworks */, + B28E12945B3CFC02E68F6F49 /* Pods_unit_tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -105,10 +116,10 @@ children = ( 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, - 9CEFDF1325113C2F001481FC /* unit_tests */, + 9C9BEE6727B33B4100BFA30D /* unit_tests */, 97C146EF1CF9000F007C117D /* Products */, - DEFD1397E6D457FBCF57AA48 /* Pods */, - F0E8B898AFD29D60F8C1EEDC /* Frameworks */, + D64AB42BC43734BFC935987A /* Pods */, + C16A44E8FE13650B630BC327 /* Frameworks */, ); sourceTree = ""; }; @@ -116,7 +127,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, - 9CEFDF1225113C2F001481FC /* unit_tests.xctest */, + 9C9BEE6627B33B4100BFA30D /* unit_tests.xctest */, ); name = Products; sourceTree = ""; @@ -136,42 +147,42 @@ path = Runner; sourceTree = ""; }; - 9CEFDF1325113C2F001481FC /* unit_tests */ = { + 9C9BEE6727B33B4100BFA30D /* unit_tests */ = { isa = PBXGroup; children = ( - 9C3D802725C1F52600728B7B /* amplify_auth_error_handling_tests.swift */, - 9C404086251AA2430036C5FE /* MockAuthSession.swift */, - B43589BC2581AA9600789DEE /* amplify_auth_cognito_tests.swift */, - 9CEFDF1625113C2F001481FC /* Info.plist */, - 9CC45C2325A4F7E90055E103 /* amplify_auth_cognito_hub_tests.swift */, - 9C3D802A25C1F82800728B7B /* MockErrorConstants.swift */, + 9C69351727B58C0000EEA5BF /* amplify_auth_cognito_error_handler_tests.swift */, + 9C9BEE7627B43F6D00BFA30D /* amplify_auth_cognito_hub_tests.swift */, + 9C9BEE7427B43F1400BFA30D /* amplify_auth_utils_tests.swift */, + 9C9BEE6827B33B4100BFA30D /* amplify_auth_cognito_ios_tests.swift */, + 9C9BEE7027B43E2C00BFA30D /* MockAuthSession.swift */, + 9C9BEE7227B43E4F00BFA30D /* MockErrorConstants.swift */, ); path = unit_tests; sourceTree = ""; }; - DEFD1397E6D457FBCF57AA48 /* Pods */ = { + C16A44E8FE13650B630BC327 /* Frameworks */ = { isa = PBXGroup; children = ( - 0D7A73413D1932957B42A25E /* Pods-Runner.debug.xcconfig */, - B9187703880B15C5125F5D1F /* Pods-Runner.release.xcconfig */, - 7F732F1CF7D7EF9EA74B414F /* Pods-Runner.profile.xcconfig */, - D3CF4B029A33413539369E68 /* Pods-amplify_auth_cognito_exampleTests.debug.xcconfig */, - 77E8D0F580AB656481259C9E /* Pods-amplify_auth_cognito_exampleTests.release.xcconfig */, - 3D23EF9D73AD2AD9798E569E /* Pods-amplify_auth_cognito_exampleTests.profile.xcconfig */, - 142C31D59F09B92E6B391241 /* Pods-unit_tests.debug.xcconfig */, - 8438DFB604CC96F8F9D6DAF2 /* Pods-unit_tests.release.xcconfig */, - BCC22CF2A7736B5F1AA4E0A1 /* Pods-unit_tests.profile.xcconfig */, + 9651AC6E3A34D2E32F76E448 /* Pods_Runner.framework */, + A5AD500386A764A733E257E8 /* Pods_unit_tests.framework */, ); - path = Pods; + name = Frameworks; sourceTree = ""; }; - F0E8B898AFD29D60F8C1EEDC /* Frameworks */ = { + D64AB42BC43734BFC935987A /* Pods */ = { isa = PBXGroup; children = ( - EE1727BF3FA0D464713D41A3 /* Pods_Runner.framework */, - 3D2AB19942AD94335DB089EE /* Pods_unit_tests.framework */, + 6C8479076E71237A2C228FAA /* Pods-Runner.debug.xcconfig */, + AD8C9C3C4A64505A6DD45D6B /* Pods-Runner.release.xcconfig */, + 9B718B1A53547EED9E2EB037 /* Pods-Runner.profile.xcconfig */, + 48A4DDBFA8A7B9B0A5541ED1 /* Pods-amplify_auth_cognito_ios_tests.debug.xcconfig */, + F54C03E51BA38D9E102EF2B0 /* Pods-amplify_auth_cognito_ios_tests.release.xcconfig */, + EF17EF14E0202CC5A4EA0B71 /* Pods-amplify_auth_cognito_ios_tests.profile.xcconfig */, + B68EA2D2B84E4A2FB81CA820 /* Pods-unit_tests.debug.xcconfig */, + 4B9AEE0BE61CAEEA6B376F26 /* Pods-unit_tests.release.xcconfig */, + 4F933B9C9DF1FEE656B2F072 /* Pods-unit_tests.profile.xcconfig */, ); - name = Frameworks; + path = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -181,14 +192,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 24D41A5CC7E22178A374BFD2 /* [CP] Check Pods Manifest.lock */, + 4ACF86902D2B3223D3A49141 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - AB8785FB87889321150A6CED /* [CP] Embed Pods Frameworks */, + 66768DF8C2211A25FE26B948 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -199,23 +210,24 @@ productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; }; - 9CEFDF1125113C2F001481FC /* unit_tests */ = { + 9C9BEE6527B33B4100BFA30D /* unit_tests */ = { isa = PBXNativeTarget; - buildConfigurationList = 9CEFDF1A25113C2F001481FC /* Build configuration list for PBXNativeTarget "unit_tests" */; + buildConfigurationList = 9C9BEE6C27B33B4100BFA30D /* Build configuration list for PBXNativeTarget "unit_tests" */; buildPhases = ( - B82B703D06162671DAB1462F /* [CP] Check Pods Manifest.lock */, - 9CEFDF0E25113C2F001481FC /* Sources */, - 9CEFDF0F25113C2F001481FC /* Frameworks */, - 9CEFDF1025113C2F001481FC /* Resources */, - 4F5064AE80E09E74329C1F8A /* [CP] Embed Pods Frameworks */, + A8E851DE3A67B4ABC792091E /* [CP] Check Pods Manifest.lock */, + 9C9BEE6227B33B4100BFA30D /* Sources */, + 9C9BEE6327B33B4100BFA30D /* Frameworks */, + 9C9BEE6427B33B4100BFA30D /* Resources */, + D7DE959BFDFAA43A088CF3A0 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( + 9C9BEE6B27B33B4100BFA30D /* PBXTargetDependency */, ); name = unit_tests; - productName = amplify_auth_cognito_exampleTests; - productReference = 9CEFDF1225113C2F001481FC /* unit_tests.xctest */; + productName = amplify_auth_cognito_ios_tests; + productReference = 9C9BEE6627B33B4100BFA30D /* unit_tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -224,16 +236,17 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1170; - LastUpgradeCheck = 1020; + LastSwiftUpdateCheck = 1320; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 1100; }; - 9CEFDF1125113C2F001481FC = { - CreatedOnToolsVersion = 11.7; + 9C9BEE6527B33B4100BFA30D = { + CreatedOnToolsVersion = 13.2.1; + TestTargetID = 97C146ED1CF9000F007C117D; }; }; }; @@ -251,7 +264,7 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, - 9CEFDF1125113C2F001481FC /* unit_tests */, + 9C9BEE6527B33B4100BFA30D /* unit_tests */, ); }; /* End PBXProject section */ @@ -268,7 +281,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9CEFDF1025113C2F001481FC /* Resources */ = { + 9C9BEE6427B33B4100BFA30D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -278,57 +291,57 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 24D41A5CC7E22178A374BFD2 /* [CP] Check Pods Manifest.lock */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( ); + name = "Thin Binary"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 4ACF86902D2B3223D3A49141 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Thin Binary"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 4F5064AE80E09E74329C1F8A /* [CP] Embed Pods Frameworks */ = { + 66768DF8C2211A25FE26B948 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 9740EEB61CF901F6004384FC /* Run Script */ = { @@ -345,43 +358,43 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - AB8785FB87889321150A6CED /* [CP] Embed Pods Frameworks */ = { + A8E851DE3A67B4ABC792091E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-unit_tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - B82B703D06162671DAB1462F /* [CP] Check Pods Manifest.lock */ = { + D7DE959BFDFAA43A088CF3A0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-unit_tests-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -396,20 +409,29 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9CEFDF0E25113C2F001481FC /* Sources */ = { + 9C9BEE6227B33B4100BFA30D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9C3D802825C1F52600728B7B /* amplify_auth_error_handling_tests.swift in Sources */, - 9CC45C2425A4F7E90055E103 /* amplify_auth_cognito_hub_tests.swift in Sources */, - 9C404087251AA2430036C5FE /* MockAuthSession.swift in Sources */, - 9C3D802B25C1F82800728B7B /* MockErrorConstants.swift in Sources */, - B43589BD2581AA9600789DEE /* amplify_auth_cognito_tests.swift in Sources */, + 9C9BEE7727B43F6D00BFA30D /* amplify_auth_cognito_hub_tests.swift in Sources */, + 9C9BEE7127B43E2C00BFA30D /* MockAuthSession.swift in Sources */, + 9C69351827B58C0000EEA5BF /* amplify_auth_cognito_error_handler_tests.swift in Sources */, + 9C9BEE6927B33B4100BFA30D /* amplify_auth_cognito_ios_tests.swift in Sources */, + 9C9BEE7527B43F1400BFA30D /* amplify_auth_utils_tests.swift in Sources */, + 9C9BEE7327B43E4F00BFA30D /* MockErrorConstants.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 9C9BEE6B27B33B4100BFA30D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 9C9BEE6A27B33B4100BFA30D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -487,22 +509,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = W3DRXD72QU; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoExample; + PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoIosExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -624,22 +638,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = W3DRXD72QU; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoExample; + PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoIosExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -655,22 +661,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = W3DRXD72QU; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoExample; + PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.amplify.amplifyAuthCognitoIosExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -678,87 +676,90 @@ }; name = Release; }; - 9CEFDF1725113C2F001481FC /* Debug */ = { + 9C9BEE6D27B33B4100BFA30D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 142C31D59F09B92E6B391241 /* Pods-unit_tests.debug.xcconfig */; + baseConfigurationReference = B68EA2D2B84E4A2FB81CA820 /* Pods-unit_tests.debug.xcconfig */; buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = W3DRXD72QU; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JZA2CXWBN4; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = unit_tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.3; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.amazonaws.amplify.amplify-auth-cognito-exampleTests"; + PRODUCT_BUNDLE_IDENTIFIER = "com.amazonaws.AWSDataStoreCategoryPluginFlutterIntegrationTests.amplify-auth-cognito-ios-tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/Runner"; }; name = Debug; }; - 9CEFDF1825113C2F001481FC /* Release */ = { + 9C9BEE6E27B33B4100BFA30D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8438DFB604CC96F8F9D6DAF2 /* Pods-unit_tests.release.xcconfig */; + baseConfigurationReference = 4B9AEE0BE61CAEEA6B376F26 /* Pods-unit_tests.release.xcconfig */; buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = W3DRXD72QU; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JZA2CXWBN4; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = unit_tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.3; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.amazonaws.amplify.amplify-auth-cognito-exampleTests"; + PRODUCT_BUNDLE_IDENTIFIER = "com.amazonaws.AWSDataStoreCategoryPluginFlutterIntegrationTests.amplify-auth-cognito-ios-tests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/Runner"; }; name = Release; }; - 9CEFDF1925113C2F001481FC /* Profile */ = { + 9C9BEE6F27B33B4100BFA30D /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BCC22CF2A7736B5F1AA4E0A1 /* Pods-unit_tests.profile.xcconfig */; + baseConfigurationReference = 4F933B9C9DF1FEE656B2F072 /* Pods-unit_tests.profile.xcconfig */; buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = W3DRXD72QU; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JZA2CXWBN4; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = unit_tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.3; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.amazonaws.amplify.amplify-auth-cognito-exampleTests"; + PRODUCT_BUNDLE_IDENTIFIER = "com.amazonaws.AWSDataStoreCategoryPluginFlutterIntegrationTests.amplify-auth-cognito-ios-tests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/Runner"; }; name = Profile; }; @@ -785,12 +786,12 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9CEFDF1A25113C2F001481FC /* Build configuration list for PBXNativeTarget "unit_tests" */ = { + 9C9BEE6C27B33B4100BFA30D /* Build configuration list for PBXNativeTarget "unit_tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9CEFDF1725113C2F001481FC /* Debug */, - 9CEFDF1825113C2F001481FC /* Release */, - 9CEFDF1925113C2F001481FC /* Profile */, + 9C9BEE6D27B33B4100BFA30D /* Debug */, + 9C9BEE6E27B33B4100BFA30D /* Release */, + 9C9BEE6F27B33B4100BFA30D /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000000..f9b0d7c5ea1 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000000..ea8c5ed2d3b --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..21a3cc14c74 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000000..f9b0d7c5ea1 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/AppDelegate.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000000..70693e4a8c1 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..d36b1fab2d9 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000000..dc9ada4725e Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000000..28c6bf03016 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000000..2ccbfd967d9 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000000..f091b6b0bca Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000000..4cde12118dd Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000000..d0ef06e7edb Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000000..dcdc2306c28 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000000..2ccbfd967d9 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000000..c8f9ed8f5ce Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000000..a6d6b8609df Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000000..a6d6b8609df Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000000..75b2d164a5a Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000000..c4df70d39da Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000000..6a84f41e14e Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000000..d0e1f585360 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000000..0bedcf2fd46 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000000..9da19eacad3 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000000..9da19eacad3 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000000..9da19eacad3 Binary files /dev/null and b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000000..89c2725b70f --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..f2e259c7c93 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Base.lproj/Main.storyboard b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000000..f3c28516fb3 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Info.plist b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Info.plist new file mode 100644 index 00000000000..240fc68cfcf --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Amplify Auth Cognito Ios + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + amplify_auth_cognito_ios_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Runner-Bridging-Header.h b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000000..308a2a560b4 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/MockAuthSession.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/MockAuthSession.swift similarity index 100% rename from packages/amplify_auth_cognito/example/ios/unit_tests/MockAuthSession.swift rename to packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/MockAuthSession.swift diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/MockErrorConstants.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/MockErrorConstants.swift similarity index 100% rename from packages/amplify_auth_cognito/example/ios/unit_tests/MockErrorConstants.swift rename to packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/MockErrorConstants.swift diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_error_handling_tests.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_error_handler_tests.swift similarity index 99% rename from packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_error_handling_tests.swift rename to packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_error_handler_tests.swift index 0d6fc51c2e4..fcaecc9feff 100644 --- a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_error_handling_tests.swift +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_error_handler_tests.swift @@ -17,7 +17,7 @@ import XCTest import Amplify @testable import AmplifyPlugins @testable import AWSPluginsCore -@testable import amplify_auth_cognito +@testable import amplify_auth_cognito_ios class amplify_auth_cognito_error_handler_tests: XCTestCase { @@ -34,7 +34,7 @@ class amplify_auth_cognito_error_handler_tests: XCTestCase { XCTAssertEqual( MockErrorConstants.aliasExistsError, details?["recoverySuggestion"]) XCTAssertEqual( "Could not deliver code", details?["message"]) } else { - XCTFail() + XCTFail() } }) } diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_cognito_hub_tests.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_hub_tests.swift similarity index 98% rename from packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_cognito_hub_tests.swift rename to packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_hub_tests.swift index 761b5bb8a7e..3637a7e8047 100644 --- a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_cognito_hub_tests.swift +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_hub_tests.swift @@ -18,7 +18,7 @@ import Amplify import Combine @testable import AmplifyPlugins @testable import AWSPluginsCore -@testable import amplify_auth_cognito +@testable import amplify_auth_cognito_ios class amplify_auth_cognito_hub_tests: XCTestCase { diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_cognito_tests.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_ios_tests.swift similarity index 99% rename from packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_cognito_tests.swift rename to packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_ios_tests.swift index bce65cfa2ec..7e289d3e4a2 100644 --- a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_cognito_tests.swift +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_cognito_ios_tests.swift @@ -19,7 +19,7 @@ import AmplifyPlugins import AWSPluginsCore import AWSCore import AWSMobileClient -@testable import amplify_auth_cognito +@testable import amplify_auth_cognito_ios // Test Data var _data: NSMutableDictionary = [:] diff --git a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_utils_tests.swift b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_utils_tests.swift similarity index 97% rename from packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_utils_tests.swift rename to packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_utils_tests.swift index 2d2fc756885..7ade1b95d8a 100644 --- a/packages/amplify_auth_cognito/example/ios/unit_tests/amplify_auth_utils_tests.swift +++ b/packages/auth/amplify_auth_cognito_ios/example/ios/unit_tests/amplify_auth_utils_tests.swift @@ -15,7 +15,7 @@ import XCTest import Amplify -@testable import amplify_auth_cognito +@testable import amplify_auth_cognito_ios class amplify_auth_utils_tests: XCTestCase { diff --git a/packages/auth/amplify_auth_cognito_ios/example/lib/main.dart b/packages/auth/amplify_auth_cognito_ios/example/lib/main.dart new file mode 100644 index 00000000000..814e1bd1022 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/lib/main.dart @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text( + 'This application serves as a test bed for the iOS implementation of the amplify_auth_cognito method channel. Please see the example app in the main amplify_auth_cognito repository for a functional example app.'), + ), + ), + ); + } +} diff --git a/packages/auth/amplify_auth_cognito_ios/example/pubspec.yaml b/packages/auth/amplify_auth_cognito_ios/example/pubspec.yaml new file mode 100644 index 00000000000..3dbd4afcd64 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/example/pubspec.yaml @@ -0,0 +1,25 @@ +name: amplify_auth_cognito_ios_example +description: Test bed for amplify_auth_cognito_ios + +publish_to: "none" # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ">=2.12.0 <3.0.0" + flutter: ">=2.2.0" + +dependencies: + flutter: + sdk: flutter + amplify_auth_cognito_ios: + path: ../ + + cupertino_icons: ^1.0.2 + +dev_dependencies: + amplify_lints: ^1.0.0 + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + +flutter: + uses-material-design: true diff --git a/packages/amplify_auth_cognito/ios/.gitignore b/packages/auth/amplify_auth_cognito_ios/ios/.gitignore similarity index 100% rename from packages/amplify_auth_cognito/ios/.gitignore rename to packages/auth/amplify_auth_cognito_ios/ios/.gitignore diff --git a/packages/amplify_auth_cognito/ios/Assets/.gitkeep b/packages/auth/amplify_auth_cognito_ios/ios/Assets/.gitkeep similarity index 100% rename from packages/amplify_auth_cognito/ios/Assets/.gitkeep rename to packages/auth/amplify_auth_cognito_ios/ios/Assets/.gitkeep diff --git a/packages/amplify_auth_cognito/ios/Classes/AuthCognito.h b/packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognito.h similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/AuthCognito.h rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognito.h diff --git a/packages/amplify_auth_cognito/ios/Classes/AuthCognito.m b/packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognito.m similarity index 69% rename from packages/amplify_auth_cognito/ios/Classes/AuthCognito.m rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognito.m index cd7fb74fd23..b11614b2cb2 100644 --- a/packages/amplify_auth_cognito/ios/Classes/AuthCognito.m +++ b/packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognito.m @@ -1,11 +1,11 @@ #import "AuthCognito.h" -#if __has_include() -#import +#if __has_include() +#import #else // Support project import fallback if the generated compatibility header // is not copied when this plugin is created as a library. // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "amplify_auth_cognito-Swift.h" +#import "amplify_auth_cognito_ios-Swift.h" #endif @implementation AuthCognito diff --git a/packages/amplify_auth_cognito/ios/Classes/AuthCognitoBridge.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognitoBridge.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/AuthCognitoBridge.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognitoBridge.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/AuthCognitoHubEventStreamHandler.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognitoHubEventStreamHandler.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/AuthCognitoHubEventStreamHandler.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthCognitoHubEventStreamHandler.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/AuthErrorHandler.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthErrorHandler.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/AuthErrorHandler.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/AuthErrorHandler.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/Device/AWSAuthDevice+Codable.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/Device/AWSAuthDevice+Codable.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/Device/AWSAuthDevice+Codable.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/Device/AWSAuthDevice+Codable.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/Device/DeviceHandler.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/Device/DeviceHandler.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/Device/DeviceHandler.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/Device/DeviceHandler.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterAuthUserResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterAuthUserResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterAuthUserResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterAuthUserResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterConfirmResetPasswordRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmResetPasswordRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterConfirmResetPasswordRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmResetPasswordRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterConfirmSignInRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmSignInRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterConfirmSignInRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmSignInRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterConfirmSignUpRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmSignUpRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterConfirmSignUpRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmSignUpRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterConfirmUserAttributeRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmUserAttributeRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterConfirmUserAttributeRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterConfirmUserAttributeRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterFetchCognitoSessionResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchCognitoSessionResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterFetchCognitoSessionResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchCognitoSessionResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterFetchSessionRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchSessionRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterFetchSessionRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchSessionRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterFetchSessionResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchSessionResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterFetchSessionResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchSessionResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterFetchUserAttributesResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchUserAttributesResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterFetchUserAttributesResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterFetchUserAttributesResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterResendSignUpCodeRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendSignUpCodeRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterResendSignUpCodeRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendSignUpCodeRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterResendSignUpCodeResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendSignUpCodeResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterResendSignUpCodeResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendSignUpCodeResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterResendUserAttributeConfirmationCodeRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendUserAttributeConfirmationCodeRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterResendUserAttributeConfirmationCodeRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendUserAttributeConfirmationCodeRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterResendUserAttributeConfirmationCodeResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendUserAttributeConfirmationCodeResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterResendUserAttributeConfirmationCodeResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResendUserAttributeConfirmationCodeResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterResetPasswordRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResetPasswordRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterResetPasswordRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResetPasswordRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterResetPasswordResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResetPasswordResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterResetPasswordResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterResetPasswordResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignInRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignInRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignInResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignInResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignInWithWebUIRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInWithWebUIRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignInWithWebUIRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInWithWebUIRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignOutRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignOutRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignOutRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignOutRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignOutResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignOutResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignOutResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignOutResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignUpRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignUpRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignUpRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignUpRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterSignUpResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignUpResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterSignUpResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignUpResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterUpdatePasswordRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdatePasswordRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterUpdatePasswordRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdatePasswordRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributeRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributeRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributeRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributeRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributeResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributeResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributeResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributeResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributesRequest.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributesRequest.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributesRequest.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributesRequest.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributesResult.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributesResult.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/FlutterUpdateUserAttributesResult.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterUpdateUserAttributesResult.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/SwiftAuthCognito.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/SwiftAuthCognito.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/SwiftAuthCognito.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/SwiftAuthCognito.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/Utils/AuthCodeDeliveryDetailsSerialization.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/AuthCodeDeliveryDetailsSerialization.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/Utils/AuthCodeDeliveryDetailsSerialization.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/AuthCodeDeliveryDetailsSerialization.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeDeserialization.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/UserAttributeDeserialization.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeDeserialization.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/UserAttributeDeserialization.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeSerialization.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/UserAttributeSerialization.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeSerialization.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/UserAttributeSerialization.swift diff --git a/packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeValidation.swift b/packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/UserAttributeValidation.swift similarity index 100% rename from packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeValidation.swift rename to packages/auth/amplify_auth_cognito_ios/ios/Classes/Utils/UserAttributeValidation.swift diff --git a/packages/amplify_auth_cognito/ios/amplify_auth_cognito.podspec b/packages/auth/amplify_auth_cognito_ios/ios/amplify_auth_cognito_ios.podspec similarity index 95% rename from packages/amplify_auth_cognito/ios/amplify_auth_cognito.podspec rename to packages/auth/amplify_auth_cognito_ios/ios/amplify_auth_cognito_ios.podspec index 67a3b031473..30f0ee2e4de 100644 --- a/packages/amplify_auth_cognito/ios/amplify_auth_cognito.podspec +++ b/packages/auth/amplify_auth_cognito_ios/ios/amplify_auth_cognito_ios.podspec @@ -3,7 +3,7 @@ # Run `pod lib lint amplify_auth_cognito.podspec' to validate before publishing. # Pod::Spec.new do |s| - s.name = 'amplify_auth_cognito' + s.name = 'amplify_auth_cognito_ios' s.version = '0.0.1' s.summary = 'The auth module for Amplify Flutter.' s.description = <<-DESC diff --git a/packages/auth/amplify_auth_cognito_ios/pubspec.yaml b/packages/auth/amplify_auth_cognito_ios/pubspec.yaml new file mode 100644 index 00000000000..004815aa049 --- /dev/null +++ b/packages/auth/amplify_auth_cognito_ios/pubspec.yaml @@ -0,0 +1,25 @@ +name: amplify_auth_cognito_ios +description: The method channel implementation for amplify_auth_cognito on iOS +version: 0.4.1 +homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/auth/amplify_auth_cognito_ios + +environment: + sdk: ">=2.12.0 <3.0.0" + flutter: ">=1.20.0" + +dependencies: + amplify_core: 0.4.1 + flutter: + sdk: flutter + +dev_dependencies: + amplify_lints: ^1.0.0 + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + +flutter: + plugin: + platforms: + ios: + pluginClass: AuthCognito diff --git a/packages/amplify_auth_plugin_interface/.gitignore b/packages/auth/amplify_auth_plugin_interface/.gitignore similarity index 100% rename from packages/amplify_auth_plugin_interface/.gitignore rename to packages/auth/amplify_auth_plugin_interface/.gitignore diff --git a/packages/amplify_auth_plugin_interface/.metadata b/packages/auth/amplify_auth_plugin_interface/.metadata similarity index 100% rename from packages/amplify_auth_plugin_interface/.metadata rename to packages/auth/amplify_auth_plugin_interface/.metadata diff --git a/packages/amplify_auth_plugin_interface/CHANGELOG.md b/packages/auth/amplify_auth_plugin_interface/CHANGELOG.md similarity index 99% rename from packages/amplify_auth_plugin_interface/CHANGELOG.md rename to packages/auth/amplify_auth_plugin_interface/CHANGELOG.md index 77a27353b43..2ee03a0aac4 100644 --- a/packages/amplify_auth_plugin_interface/CHANGELOG.md +++ b/packages/auth/amplify_auth_plugin_interface/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.1 (2022-02-28) + ## 0.4.0 (2022-02-17) ## 0.3.2 (2022-01-21) diff --git a/packages/amplify_auth_plugin_interface/LICENSE b/packages/auth/amplify_auth_plugin_interface/LICENSE similarity index 100% rename from packages/amplify_auth_plugin_interface/LICENSE rename to packages/auth/amplify_auth_plugin_interface/LICENSE diff --git a/packages/amplify_auth_plugin_interface/README.md b/packages/auth/amplify_auth_plugin_interface/README.md similarity index 100% rename from packages/amplify_auth_plugin_interface/README.md rename to packages/auth/amplify_auth_plugin_interface/README.md diff --git a/packages/amplify_auth_plugin_interface/lib/amplify_auth_plugin_interface.dart b/packages/auth/amplify_auth_plugin_interface/lib/amplify_auth_plugin_interface.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/amplify_auth_plugin_interface.dart rename to packages/auth/amplify_auth_plugin_interface/lib/amplify_auth_plugin_interface.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/AuthNextUpdateAttributeStep.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/AuthNextUpdateAttributeStep.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/AuthNextUpdateAttributeStep.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/AuthNextUpdateAttributeStep.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/AuthUserAttribute.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/AuthUserAttribute.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/AuthUserAttribute.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/AuthUserAttribute.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ConfirmUserAttributeResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/FetchUserAttributesRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/ResendUserAttributeConfirmationCodeResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributeResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/UpdateUserAttributesRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Attribute/user_attribute_key.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/user_attribute_key.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Attribute/user_attribute_key.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Attribute/user_attribute_key.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/AliasExistsException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/AliasExistsException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/AliasExistsException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/AliasExistsException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/AuthException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/AuthException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/AuthException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/AuthException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/CodeDeliveryFailureException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/CodeDeliveryFailureException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/CodeDeliveryFailureException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/CodeDeliveryFailureException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/CodeExpiredException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/CodeExpiredException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/CodeExpiredException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/CodeExpiredException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/CodeMismatchException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/CodeMismatchException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/CodeMismatchException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/CodeMismatchException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/FailedAttemptsLimitExceededException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/FailedAttemptsLimitExceededException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/FailedAttemptsLimitExceededException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/FailedAttemptsLimitExceededException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/InternalErrorException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InternalErrorException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/InternalErrorException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InternalErrorException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidAccountTypeException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidAccountTypeException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidAccountTypeException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidAccountTypeException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidParameterException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidParameterException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidParameterException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidParameterException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidPasswordException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidPasswordException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidPasswordException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidPasswordException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidStateException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidStateException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidStateException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/InvalidStateException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/LambdaException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/LambdaException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/LambdaException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/LambdaException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/LimitExceededException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/LimitExceededException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/LimitExceededException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/LimitExceededException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/MFAMethodNotFoundException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/MFAMethodNotFoundException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/MFAMethodNotFoundException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/MFAMethodNotFoundException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/NotAuthorizedException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/NotAuthorizedException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/NotAuthorizedException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/NotAuthorizedException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/PasswordResetRequiredException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/PasswordResetRequiredException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/PasswordResetRequiredException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/PasswordResetRequiredException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/ResourceNotFoundException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/ResourceNotFoundException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/ResourceNotFoundException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/ResourceNotFoundException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/SessionExpiredException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SessionExpiredException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/SessionExpiredException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SessionExpiredException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableOfflineException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableOfflineException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableOfflineException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableOfflineException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableServiceException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableServiceException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableServiceException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SessionUnavailableServiceException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/SignedOutException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SignedOutException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/SignedOutException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SignedOutException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/SoftwareTokenMFANotFoundException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SoftwareTokenMFANotFoundException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/SoftwareTokenMFANotFoundException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/SoftwareTokenMFANotFoundException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyFailedAttemptsException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyFailedAttemptsException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyFailedAttemptsException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyFailedAttemptsException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyRequestsException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyRequestsException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyRequestsException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/TooManyRequestsException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/UnknownException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UnknownException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/UnknownException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UnknownException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/UserCancelledException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UserCancelledException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/UserCancelledException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UserCancelledException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotConfirmedException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotConfirmedException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotConfirmedException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotConfirmedException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotFoundException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotFoundException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotFoundException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UserNotFoundException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/UsernameExistsException.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UsernameExistsException.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/UsernameExistsException.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/UsernameExistsException.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/device_not_tracked_exception.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/device_not_tracked_exception.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/device_not_tracked_exception.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/device_not_tracked_exception.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Exceptions/invalid_user_pool_configuration_exception.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/invalid_user_pool_configuration_exception.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Exceptions/invalid_user_pool_configuration_exception.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Exceptions/invalid_user_pool_configuration_exception.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/ConfirmResetPasswordRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordStep.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordStep.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordStep.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/ResetPasswordStep.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Password/UpdatePasswordResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Session/AuthSession.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthSession.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Session/AuthSession.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthSession.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Session/AuthSessionOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthSessionOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Session/AuthSessionOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthSessionOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Session/AuthSessionRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthSessionRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Session/AuthSessionRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthSessionRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Session/AuthUser.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthUser.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Session/AuthUser.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthUser.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Session/AuthUserOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthUserOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Session/AuthUserOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthUserOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/Session/AuthUserRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthUserRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/Session/AuthUserRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/Session/AuthUserRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/AuthNextSignInStep.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/AuthNextSignInStep.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/AuthNextSignInStep.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/AuthNextSignInStep.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/AuthProvider.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/AuthProvider.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/AuthProvider.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/AuthProvider.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/ConfirmSignInRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignIn/SignInWithWebUIRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignOut/SignOutOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignOut/SignOutOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignOut/SignOutOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignOut/SignOutOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignOut/SignOutRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignOut/SignOutRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignOut/SignOutRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignOut/SignOutRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignOut/SignOutResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignOut/SignOutResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignOut/SignOutResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignOut/SignOutResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/AuthNextSignUpStep.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/AuthNextSignUpStep.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/AuthNextSignUpStep.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/AuthNextSignUpStep.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ConfirmSignUpRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/ResendSignUpCodeResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/SignUpOptions.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/SignUpOptions.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/SignUpOptions.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/SignUpOptions.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/SignUpRequest.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/SignUpRequest.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/SignUpRequest.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/SignUpRequest.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/SignUp/SignUpResult.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/SignUpResult.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/SignUp/SignUpResult.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/SignUp/SignUpResult.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/types.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/types.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/types.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/types.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/types/AuthCodeDeliveryDetails.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/types/AuthCodeDeliveryDetails.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/types/AuthCodeDeliveryDetails.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/types/AuthCodeDeliveryDetails.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/types/AuthNextStep.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/types/AuthNextStep.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/types/AuthNextStep.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/types/AuthNextStep.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/types/auth_device.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/types/auth_device.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/types/auth_device.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/types/auth_device.dart diff --git a/packages/amplify_auth_plugin_interface/lib/src/types/cognito_user_attribute_key.dart b/packages/auth/amplify_auth_plugin_interface/lib/src/types/cognito_user_attribute_key.dart similarity index 100% rename from packages/amplify_auth_plugin_interface/lib/src/types/cognito_user_attribute_key.dart rename to packages/auth/amplify_auth_plugin_interface/lib/src/types/cognito_user_attribute_key.dart diff --git a/packages/amplify_auth_plugin_interface/pubspec.yaml b/packages/auth/amplify_auth_plugin_interface/pubspec.yaml similarity index 81% rename from packages/amplify_auth_plugin_interface/pubspec.yaml rename to packages/auth/amplify_auth_plugin_interface/pubspec.yaml index bf406b39819..25a509d1625 100644 --- a/packages/amplify_auth_plugin_interface/pubspec.yaml +++ b/packages/auth/amplify_auth_plugin_interface/pubspec.yaml @@ -1,7 +1,7 @@ name: amplify_auth_plugin_interface description: The platform interface for the auth module of Amplify Flutter. -version: 0.4.0 -homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_auth_plugin_interface +version: 0.4.1 +homepage: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/auth/amplify_auth_plugin_interface environment: sdk: ">=2.12.0 <3.0.0" @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter meta: ^1.1.8 - amplify_core: 0.4.0 + amplify_core: 0.4.1 dev_dependencies: amplify_test: