Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/fragments/start/getting-started/reactnative/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ When you initialize a new Amplify project, a few things happen:
- It modifies the **.gitignore** file, adding some generated files to the ignore list
- A cloud project is created for you in the AWS Amplify Console that can be accessed by running `amplify console`. The Console provides a list of backend environments, deep links to provisioned resources per Amplify category, status of recent deployments, and instructions on how to promote, clone, pull, and delete backend resources

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplifyconfiguration.json` file to local git repository before running `eas build` command. This is because the `amplifyconfiguration.json` file is not included in the default `.gitignore`, and the `eas build` command will not include untracked files in the build.

</Callout>
</InlineFilter>

## Set up frontend

Next, configure Amplify so it can interact with backend services by adding the following code below the last import:
Expand Down
8 changes: 8 additions & 0 deletions src/pages/[platform]/reference/amplify_outputs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ You can also manually create this file for a specified Amplify app ID and branch

{/* @TODO full type/interface to reference */}

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplify_outputs.json` file to local git repository before running `eas build` command. This is because the `amplify_outputs.json` file is not included in the default `.gitignore`, and the `eas build` command will not include untracked files in the build.
Copy link
Contributor

Choose a reason for hiding this comment

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

this will complicate git merges. Is there another way customers can set this up in EAS build? I'm not terribly familiar with it but it looks like folks can run arbitrary commands in the builds which would enable them to run the generate outputs command, assuming they have the ability to get credentials https://docs.expo.dev/eas/workflows/examples/#deploy-to-production-workflow

or environment variables?

Copy link
Contributor

Choose a reason for hiding this comment

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

force commit ... to local git repository

or is this instructing folks to commit it locally, only?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that's correct, only need to add the config file into a local repo, before running the build command, this file itself doesn't need to be pushed to remote. This is a lowest requirement, developers can use various methods to perform this step before running eas build.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I'm concerned folks will inadvertently commit this file. could they instead use an .easignore file https://docs.expo.dev/build-reference/easignore/

or configure their build artifact paths in eas.json? https://docs.expo.dev/eas/json/#buildartifactpaths

if neither of those are applicable, can we expand on the callout to commit to a local repo/add some color around not pushing to the remote?

Copy link
Member Author

Choose a reason for hiding this comment

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

From my research the lowest requirement for EAS is to ensure all files required for building the app in the version control. easignore is for ignoring files which is opposite to the requirement. buildartifactpaths is for post build steps I believe.

I will expand the callout.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.


</Callout>
</InlineFilter>

## Extending Amplify outputs file

The `amplify_outputs.json` file is not just a static artifact; it is designed to be extendable to suit the evolving needs of your application. By leveraging the `addOutput` method from your `backend`, you can programmatically add configurations. This is particularly useful for customizing outputs that are not directly exposed through the Amplify constructs or for dynamically adjusting your app's configuration in response to changes in your backend strategy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,14 @@ When you initialize a new Amplify project, a few things happen:
- It creates a file called `amplifyconfiguration.json` in your designated **Source Directory Path** that holds all the configuration for the services you create with Amplify. This is how the Amplify JavaScript client library is able to get the necessary information to connect to your backend services.
- It modifies the `.gitignore` file, adding some generated files to the ignore list

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplifyconfiguration.json` file to local git repository before running `eas build` command. This is because the `amplifyconfiguration.json` file is not included in the default `.gitignore`, and the `eas build` command will not include untracked files in the build.

</Callout>
</InlineFilter>

## Install Amplify Libraries

<InlineFilter filters={['react','javascript','vue','angular']}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,14 @@ When you initialize a new Amplify project, a few things happen:
- It modifies the `.gitignore` file, adding some generated files to the ignore list
- A cloud project is created for you in the AWS Amplify Console that can be accessed by running `amplify console`. The Console provides a list of backend environments, deep links to provisioned resources per Amplify category, status of recent deployments, and instructions on how to promote, clone, pull, and delete backend resources.

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplifyconfiguration.json` file to local git repository before running `eas build` command. This is because the `amplifyconfiguration.json` file is not included in the default `.gitignore`, and the `eas build` command will not include untracked files in the build.

</Callout>
</InlineFilter>

As you add or remove categories and make updates to your backend configuration using the Amplify CLI, the configuration in `amplifyconfiguration.json` will update automatically.

## Install Amplify libraries
Expand Down