Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Renbran/setup-data-gen-2-android-swift #7195

Closed

Conversation

renebrandel
Copy link
Contributor

Description of changes:

  • Added Android and Swift "Setup Amplify Data" guides

Related GitHub issue #, if available:

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • Swift
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@renebrandel renebrandel requested a review from a team as a code owner April 10, 2024 23:09
Copy link
Member

@tylerjroach tylerjroach left a comment

Choose a reason for hiding this comment

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

I didn't complete a full review as I want to make sure we are on same page of what this documentation is for. If this is for supporting legacy config in gen2, then this documentation may be ok. If this documentation is for our gen2 experience, we need to make a number of changes to this.


<InlineFilter filters={["android"]}>

```bash
Copy link
Member

Choose a reason for hiding this comment

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

I don't think --config-format json-mobile is needed. May not even be an option for GA.

<InlineFilter filters={["android"]}>

```bash
npx amplify sandbox --config-format json-mobile --config-out-dir <path_to_swift_project>
Copy link
Member

Choose a reason for hiding this comment

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

I don't think --config-format json-mobile is needed. May not even be an option for GA.

dependencies {
// Amplify API dependencies
// highlight-start
implementation("com.amplifyframework:aws-api:2.14.11")
Copy link
Member

Choose a reason for hiding this comment

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

These versions need to use the versions.ts so versions are updated all in one place. We also need to be careful in when we merge this due to not currently supporting amplifyoutputs.json until our gen2 release.


Click **Sync Now** in the notification bar above the file editor to sync these dependencies.

Next, configure the Amplify client library with the generated `amplifyconfiguration.json` file to make it aware of the backend API endpoint. *Note: verify that the **amplifyconfiguration.json** file is present in your **res/raw/** folder.
Copy link
Member

Choose a reason for hiding this comment

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

Its going to be amplifyoutputs.json

```

</InlineFilter>

## Connect your application code to the data backend

Once the cloud sandbox is up and running, it will also create an `amplifyconfiguration.json` file, which includes the relevant connection information to your data backend, like your API endpoint URL and API key.
Copy link
Member

Choose a reason for hiding this comment

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

Its going to be amplifyoutputs.json

Amplify.addPlugin(AWSApiPlugin())
// Configures the client library to be aware of your backend API
// endpoint and authorization modes.
Amplify.configure(applicationContext)
Copy link
Member

Choose a reason for hiding this comment

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

Gen2 experience requires proper configuration method.

@renebrandel
Copy link
Contributor Author

Closing in favor of updating when the new outputs are available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants