diff --git a/examples/react-native/ios/Podfile.lock b/examples/react-native/ios/Podfile.lock
index 493f2b3d9e2..a27ba1badc6 100644
--- a/examples/react-native/ios/Podfile.lock
+++ b/examples/react-native/ios/Podfile.lock
@@ -545,6 +545,6 @@ SPEC CHECKSUMS:
RNCAsyncStorage: b90b71f45b8b97be43bc4284e71a6af48ac9f547
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9
-PODFILE CHECKSUM: 5ae40a144d827c45a671b6fb037d2765de522eff
+PODFILE CHECKSUM: 86255707601fa0f502375c1c40775dbd535ed624
COCOAPODS: 1.12.1
diff --git a/examples/react-native/ios/ReactNative.xcodeproj/project.pbxproj b/examples/react-native/ios/ReactNative.xcodeproj/project.pbxproj
index a2f0e0097f1..fbe39270aaa 100644
--- a/examples/react-native/ios/ReactNative.xcodeproj/project.pbxproj
+++ b/examples/react-native/ios/ReactNative.xcodeproj/project.pbxproj
@@ -599,11 +599,7 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-Wl",
- "-ld_classic",
- );
+ OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
@@ -672,11 +668,7 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-Wl",
- "-ld_classic",
- );
+ OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
diff --git a/examples/react-native/src/App/App.tsx b/examples/react-native/src/App/App.tsx
index 8bf8fed20e2..a273f6a936a 100644
--- a/examples/react-native/src/App/App.tsx
+++ b/examples/react-native/src/App/App.tsx
@@ -5,9 +5,9 @@ import { LaunchArguments } from 'react-native-launch-arguments';
import { EXAMPLE_APP_NAME } from '@env';
-// .env file or launch argument passed from Detox
+// prefer launch argument passed from Detox, then local .env file
const getExampleAppName = () =>
- EXAMPLE_APP_NAME ?? LaunchArguments.value().EXAMPLE_APP_NAME;
+ LaunchArguments.value().EXAMPLE_APP_NAME ?? EXAMPLE_APP_NAME;
/**
* `Authenticator` Example and Demo Apps
diff --git a/examples/react-native/src/ui/components/authenticator/sign-in-with-email/Example.tsx b/examples/react-native/src/ui/components/authenticator/sign-in-with-email/Example.tsx
index e9a265d76ba..533d1266231 100644
--- a/examples/react-native/src/ui/components/authenticator/sign-in-with-email/Example.tsx
+++ b/examples/react-native/src/ui/components/authenticator/sign-in-with-email/Example.tsx
@@ -1,52 +1,61 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
-import { Authenticator } from '@aws-amplify/ui-react-native';
+import {
+ Authenticator,
+ AuthenticatorProps,
+} from '@aws-amplify/ui-react-native';
import { Amplify } from 'aws-amplify';
import { SignOutButton } from '../SignOutButton';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);
-const components = {
- Header() {
- return Enter Information:;
- },
- Footer() {
- return Footer Information;
+function Header() {
+ return Enter Information:;
+}
+function Footer() {
+ return Footer Information;
+}
+
+const components: AuthenticatorProps['components'] = {
+ SignIn: ({ fields, ...props }) => {
+ const [username, password] = fields;
+ return (
+
+ );
},
+ VerifyUser: (props) => (
+
+ ),
+ ConfirmVerifyUser: (props) => (
+
+ ),
};
function App() {
return (
- (
-
- ),
- ConfirmVerifyUser: (props) => (
-
- ),
- }}
- >
+
diff --git a/packages/e2e/README.md b/packages/e2e/README.md
index f28de080b30..ede9b7f9723 100644
--- a/packages/e2e/README.md
+++ b/packages/e2e/README.md
@@ -20,7 +20,7 @@ To run existing tests on `react-native` framework, first navigate to the React N
Sign up and reset password flows are mocked by overriding the `Auth` endpoint when calling `Amplify.configure` to point to a local express mock server running on port 9091. The `precucumber` and `postcucumber` scripts in the `package.json` file take care of starting and terminating the mock server.
-**iOS**
+## iOS
If not previously installed locally, install `applesimutils`:
@@ -36,7 +36,7 @@ brew install applesimutils
1. Run `yarn e2e detox:build:ios:debug`
1. Run `yarn e2e detox:e2e:ios:debug`
-**Android**
+## Android
1. Navigate to the _root_ of your local clone of [aws-amplify/amplify-ui](https://github.com/aws-amplify/amplify-ui)
1. Run `yarn setup`
@@ -44,7 +44,7 @@ brew install applesimutils
1. Run `yarn e2e detox:build:android:debug`
1. Run `yarn e2e detox:e2e:android:debug`
-Troubleshooting
+**Troubleshooting**
If the emulator fails to connect to Metro server, run:
diff --git a/packages/e2e/detox/integration/common/shared.ts b/packages/e2e/detox/integration/common/shared.ts
index 10477113f18..7fdf95ca45f 100644
--- a/packages/e2e/detox/integration/common/shared.ts
+++ b/packages/e2e/detox/integration/common/shared.ts
@@ -92,6 +92,10 @@ Then(
}
);
+Then('I see placeholder {string}', async (placeholder: string) => {
+ await expect(element(by.text(placeholder))).toExist();
+});
+
Then(
'I see {string} as a {string} field',
async (label: string, type: string) => {