-1

Error: Cannot find native module 'ExpoMailComposer'

this is the error I get as soon as I insert

import * as MailComposer from "expo-mail-composer";

in my code.

I believe the documentation says it works with managed workflows but it that is not the case can someone please let me know. Also, if there are other workaround for getting IOS UI integration for sending an email from application to report a user would be great.

2
  • Did you follow the installation instructions in the documentation? docs.expo.dev/versions/latest/sdk/mail-composer Commented Apr 9, 2023 at 21:36
  • I do believe so. I used "npx expo install expo-mail-composer". and when I use the import I get the error. also I am using a development build because I couldnt use expo go anymore. Commented Apr 9, 2023 at 21:56

1 Answer 1

0

I just answered a similar question here, although I note that I'm testing on an Android device. I hope that the equivalent iOS steps work for you.

This issue was resolved for me by creating a new development build:

eas build --profile development --platform android

Then download and installing that build on my device:

adb install --user 0 <path_to_apk>

I then ran the app with:

set APP_ENV=development&& npx expo start --dev-client

The app opened as normal after that, and MailComposer.composeAsync() appears to work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.