-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.

  • Did you follow the installation instructions in the documentation? https://docs.expo.dev/versions/latest/sdk/mail-composer/ – jnpdx Apr 09 '23 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. – Noah Duran Apr 09 '23 at 21:56

1 Answers1

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.

Rukt
  • 21
  • 4